Old 12th February 2011, 19:51   #1
Obucinac
Junior Member
 
Join Date: Jan 2004
Location: Serbia
Posts: 17
Problem initializaing WinAmp plugin(s), in_mp3.dll

What I am trying to do is to load in_mp3.dll, and use it to play mp3 file using out_ds.dll.
Apparently, I am missing something, because no example is working for me, they always fail at Init() call. I wrote some code on my own, I tried few examples from web, I tried Delphi, C++ Cygwin and MinGw, and it always fails on Init. Libraries are loaded just fine, manifest is OK, msvcr90 used from private assembly. Please, advise, what am I doing wrong?

E.g. Delphi:
code:

FHandleInDLL := LoadLibrary(PWChar(PathInDLL));

//fp: function: pointer; cdecl;
fp := GetProcAddress(FHandleInDLL, 'winampGetInModule2');

imod := fp();
imod.hMainWindow := Handle; // main window handle
imod.hDllInstance := FHandleInDLL;
imod.Init;


Obucinac is offline   Reply With Quote
Old 13th February 2011, 18:39   #2
SilverBird775
Senior Member
 
SilverBird775's Avatar
 
Join Date: Jan 2009
Location: Russia
Posts: 237
Try simplier plugins from 2.x, not the ones from the 5.x winamp. Once they work proceed with modern versions then. There would be always some incompatibilities and they grew up version to version. There is a WndProc internal messaging you need to take into account. The init call failed because your main window handle is missing the required messaging functionality. See IPC_* (wa_ipc.h) declarations for reference. But that's is just a tip of the iceberg. There is a lot more not official winamp messages which Nullsoft plugins may use. The examples you may found over internet which include the emulation of winamp main window are limited to 2.x plugin versions unless said otherwise. In my opinion MediaMonkey and AIMP have a good emulators but they are closed source.

Hope it helps.
SilverBird775 is offline   Reply With Quote
Old 13th February 2011, 23:01   #3
DrO
 
Join Date: Sep 2003
Posts: 27,873
unless all of the Winamp apis and services are replicated (which is simple to do for the SendMessage(..) based ones, not for the Wasabi based ones which are heavily using in plug-ins from Winamp 5.2 and up), using the official plug-ins will generally not work in a 3rd party solution. part by design, and partly because the official plug-ins are only really meant to be used in Winamp and not piggy-backed into use in other programs.

-daz
DrO is offline   Reply With Quote
Old 14th February 2011, 00:44   #4
Obucinac
Junior Member
 
Join Date: Jan 2004
Location: Serbia
Posts: 17
OK, thank you guys, I realized it is something about differences between 2.x and 5.x plugins. With plugins from 2.91 Init() works fine.
Obucinac is offline   Reply With Quote
Old 14th February 2011, 07:29   #5
DrO
 
Join Date: Sep 2003
Posts: 27,873
there's never been any guarantee of being able to use Winamp's own plug-ins in other programmes and really if you need your own decoding of mp3, there are enough libraries available to do it without trying to bodge support of another media player's dlls - plus i think it's a license violation trying to do it but would have to check on that.

-daz
DrO is offline   Reply With Quote
Old 14th February 2011, 14:45   #6
SilverBird775
Senior Member
 
SilverBird775's Avatar
 
Join Date: Jan 2009
Location: Russia
Posts: 237
Copypasted from Winamp Software Distribution Agreement:


2. License Grant. (a) AOL grants to Licensee, subject to these terms and conditions, a nonexclusive, royalty-free, worldwide, and nontransferable right to (i) reproduce, without change, the version and platform of the Winamp and/or Spinner client software to which these terms are attached ("Products") in executable form only on any media and (ii) distribute by sublicense such Product copies to end users, directly or indirectly through distributors and sub-distributors. Licensee may electronically distribute the Products, in exportable version only, pursuant to the terms and conditions set forth herein. (b) Except as expressly permitted herein or by applicable law, Licensee shall not, and shall not permit any distributor or other person to, re-configure, modify, translate, decompile, reverse engineer, disassemble, or otherwise determine or attempt to determine source code from the Product or to create any derivative works based upon the Products. If Licensee or any distributor fails to comply with this Section 2(b), AOL may immediately (in addition to all other remedies it may have and except for end user licenses) revoke all licenses granted hereunder. (c) Licensee shall use, and is granted during the term hereof a nontransferable, nonexclusive and restricted license (with a right to sublicense to distributors) to use the marks "Spinner.com" name and logo; "Winamp" name and logo; "SHOUTcast" name and logo (collectively, the "Marks") solely on the appropriate Products and on the packaging containing the appropriate Products and in related advertising, marketing and technical material on Licensee's internet site.


So, IMO it's ok to provide links and distribute free version of winamp installation but you can't broke the distribution in parts because it's perfectly fits the case "re-configure" and could potentially harm the AOL interests. However, reading\loading the module from non-Winamp application is fine because it does not involve the reverse engineering or re-configure. You would not get any support in any form either. In fact due to agreement when the the things go wrong the rightholder could easily blame you for improper product usage which lead to damage.
SilverBird775 is offline   Reply With Quote
Reply
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