Go Back   Winamp & Shoutcast Forums > Winamp > Winamp Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 1st July 2006, 16:04   #41
whoami
Junior Member
 
Join Date: Jun 2006
Location: Planet Earth, the Solar system.
Posts: 31
Quote:
Originally posted by dllmain
Sorry, I don't understand the PostMessage() trick.
How does it wait for all plugins being loaded?
Or maybe 10 line example code would help me to understand.
I think DrO means this:
code:

LPARAM ipc_delayed_work = -1; // some invalid number, not 0
int init()
{
...
// register my own ipc message
ipc_delayed_work = SendMessage(...., (WPARAM)&"ItsTimeToDoDelayedWork", IPC_REGISTER_WINAMP_IPCMESSAGE);
...
// subclass Winamp
lpWinampProc=SetWindowLong(...,GWL_WNDPROC,(LONG)WinampSubclassProc);
...
// put ipc_delayed_work to the message queue of Winamp
// the message will be delivered after every standard
// windows messages are treated (except WM_PAINT or something less important)
PostMessage(...., WM_WA_IPC, 0, ipc_delayed_work)
}

LRESULT CALLBACK WinampSubclassProc(...)
{
...
if ( (msg == WM_WA_IPC) && (lParam == ipc_delayed_work)
DoDelayedWork(); // or just put your code here
...
}

whoami is offline   Reply With Quote
Old 2nd July 2006, 16:08   #42
dllmain
Senior Member
 
dllmain's Avatar
 
Join Date: Sep 2005
Location: Berlin, Germany
Posts: 207
thanks for the code. still i am wondering why plugin
loading is related to window messaging at all?
dllmain is offline   Reply With Quote
Old 2nd July 2006, 16:16   #43
DrO
 
Join Date: Sep 2003
Posts: 27,873
because gen_* plugins are loaded once the UI has been created but is still being done in part of the main UI's wndproc and since the gen_* are loaded as FindFirstFile(..)/FindNextFile(..) finds them, to ensure what you're testing for exists, you need to allow Winamp to finish processing it's messages, etc which is why the PostMessage(..) trick will work.

-daz
DrO is offline   Reply With Quote
Old 2nd July 2006, 16:43   #44
dllmain
Senior Member
 
dllmain's Avatar
 
Join Date: Sep 2005
Location: Berlin, Germany
Posts: 207
Thanks for trying but I still don't understand
and I doubt I will ever - let us stop here.

--------------------------

I wrote a cheap tool which could help
fixing a load order problem:


>> plugin_load_order_01.zip

dllmain is offline   Reply With Quote
Old 2nd July 2006, 16:50   #45
DrO
 
Join Date: Sep 2003
Posts: 27,873
removal of the plugin and then adding a new copy can work as you've seen _but_ it's not guaranteed since other factors with the OS will and can affect things e.g. for ntfs it generally provides the files alphabetically (but it's not guaranteed from past experience) whereas for fat32 it can be all over the place.

basically the delay loading method is a decent way to work around the plugin loading order without fiddling with the order of files on different user's machines.

-daz
DrO is offline   Reply With Quote
Old 3rd July 2006, 17:35   #46
whoami
Junior Member
 
Join Date: Jun 2006
Location: Planet Earth, the Solar system.
Posts: 31
Um.. why do you care about plugin loading order? What could it be a problem if Winamp loads plugins randomly?

.. well, I'm just curious.
whoami is offline   Reply With Quote
Old 3rd July 2006, 19:51   #47
dllmain
Senior Member
 
dllmain's Avatar
 
Join Date: Sep 2005
Location: Berlin, Germany
Posts: 207
Quote:
Originally posted by whoami
Um.. why do you care about plugin loading order? What could it be a problem if Winamp loads plugins randomly?

.. well, I'm just curious.
some plugins depend on others. if these do not properly
handle the case that the plugins they depend on are loaded
later their dependencies seem missing although they are not.
 
dllmain is offline   Reply With Quote
Old 18th October 2006, 00:35   #48
jph6t
Major Dude
 
jph6t's Avatar
 
Join Date: May 2004
Location: USA
Posts: 756
I hate to ask a basic question ... but ...

Looking at the install zip, there are seven files contained therein ...
Where should these files be extracted?
Do all seven go in the Winamp plugin folder?

Also, about the nature of the plugin ...
Does the AllMusic page launch within Winamp OR via the default browser?
jph6t is offline   Reply With Quote
Old 18th October 2006, 17:06   #49
dllmain
Senior Member
 
dllmain's Avatar
 
Join Date: Sep 2005
Location: Berlin, Germany
Posts: 207
Quote:
Originally posted by jph6t
Looking at the install zip, there are seven files contained therein ...
Where should these files be extracted?
Do all seven go in the Winamp plugin folder?
You only need gen_allmusic.dll from the Binary
folder. Put that one in your plugins folder.


Quote:
Originally posted by jph6t
Also, about the nature of the plugin ...
Does the AllMusic page launch within Winamp OR via the default browser?
Within Winamp, within Now Playing of the Winamp
library.
dllmain is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Winamp > Winamp Discussion

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