Winamp General Purpose Plugin

Windows specific forum
criobot
User
User
Posts: 10
Joined: Sat Dec 27, 2008 9:42 pm
Location: Bulgaria
Contact:

Winamp General Purpose Plugin

Post by criobot »

Hello,
I tried to create a Winamp plugin, using the specifications of the Winamp SDK and by following the Beginner's Guide, but my plugin isn't shown in the General Purpose plugins list in Winamp. I found 2 plugin examples in the Code Archive from PureArea, but they are for Visualisation and for an Input (decoder) plugin. They work without any problem, and are actually much more complicated that the general purpose plugins. Here is my empty plugin code, which should be loaded in winamp without any problems, but it is not. :(

Code: Select all

Structure winampGeneralPurposePlugin
  version.l
  description.l
  init.l
  config.l
  quit.l
  hwndParent.l
  hDllInstance.l
EndStructure

Global PLUGIN.winampGeneralPurposePlugin

ProcedureDLL.l Init()
  ProcedureReturn 0
EndProcedure

ProcedureDLL Config()
  
EndProcedure

ProcedureDLL Quit()

EndProcedure
  
ProcedureDLL.l winampGetGeneralPurposePlugin()
  ;MessageBox_(0, "", "", #MB_OK)
  PLUGIN\version = $10
  PLUGIN\description = ?Description
  PLUGIN\init = @Init()
  PLUGIN\config = @Config()
  PLUGIN\quit= @Quit()
  PLUGIN\hDllInstance = 0
  PLUGIN\hwndParent = 0
  ProcedureReturn *PLUGIN
EndProcedure

DataSection 
  Description: 
  Data.s "Empty General Purpose Plugin" 
EndDataSection
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Winamp General Purpose Plugin

Post by Fred »

This line is wrong:

Code: Select all

ProcedureReturn *PLUGIN
change it to

Code: Select all

ProcedureReturn @PLUGIN
And you should use ".i" as default type for pointers, or your code won't work on x64.
criobot
User
User
Posts: 10
Joined: Sat Dec 27, 2008 9:42 pm
Location: Bulgaria
Contact:

Re: Winamp General Purpose Plugin

Post by criobot »

Fred wrote:This line is wrong:

Code: Select all

ProcedureReturn *PLUGIN
change it to

Code: Select all

ProcedureReturn @PLUGIN
And you should use ".i" as default type for pointers, or your code won't work on x64.
First I used the .i type for the Structure members and the addressof (@) symbol, but it did not work. I've changed the code so much, that I've forgot how it looked like in the beginning, but perhaps I did something else wrong. Then I used the header converter from the SDK, to convert the headers from the Winamp Plugin SDK, and it put the .l type on the structure members, so I let them stay that way, because I thought it is right that way. After rewriting from scratch the whole code and consulting the "Pointers and memory access" page from the help file helped me a lot. Now the plugin is loaded into winamp's plugin list. Thank you very much for the help, Fred.
User avatar
Rescator
Addict
Addict
Posts: 1769
Joined: Sat Feb 19, 2005 5:05 pm
Location: Norway

Re: Winamp General Purpose Plugin

Post by Rescator »

You would have caught "ProcedureReturn *PLUGIN" if you had used EnableExplicit ;P
arjaycob
New User
New User
Posts: 1
Joined: Mon Feb 15, 2010 2:17 pm

Re: Winamp General Purpose Plugin

Post by arjaycob »

Well I just tried the procedures about Winamp General Purpose Plugin, I think something missing or errors.



_________________
outsource movie | article cycle tv | articles trader | sem philippines
Post Reply