Old 8th September 2015, 06:01   #1
Junior Member
Join Date: Oct 2013
Posts: 3
Querying media library

I'm working on my plugin again, and seem to be failing to understand the IPC interface to query the media library. Based on what I read in ml.h I was thinking I could do something along these lines:

wsprintf( queryString, L"(artist == \"%s\")", artistName );
trackQuery.query = queryString;
trackQuery.max_results = 0; // 0 for unlimited
SendMessage( Plugin.hwndWinampParent, WM_ML_IPC, (WPARAM)(&trackQuery), ML_IPC_DB_RUNQUERYW );
wsprintf( queryMsg, L"Query string '%s' got %d matches.", queryString, trackQuery.results.Size );

But it seems like no matter what I put for artistName, I end up with zero matches. Am I missing something fundamental here? I've read through Media Library Plugin and Media Library API on the wiki and I felt like I understood them. My plugin's working; I can attach to process in Visual Studio and step through, etc. Just Size == 0 on my queries.
Ghantu is offline   Reply With Quote
Old 9th September 2015, 18:05   #2
Forum King
thinktink's Avatar
Join Date: May 2009
Location: On the streets of Kings County, CA.
Posts: 3,009
Send a message via Skype™ to thinktink
I thought you had to SendMessage to the ML Window, not the main Winamp window?
thinktink is offline   Reply With Quote
Old 10th September 2015, 02:58   #3
Ben Allison
Former Winamp Developer
Benski's Avatar
Join Date: Jan 2005
Location: Brooklyn, NY
Posts: 1,057
Send the message to
Benski is offline   Reply With Quote
Go Back   Winamp & Shoutcast Forums > Developer Center > Winamp Development

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump