View Full Version : Plugin error
RobRoy
November 13th, 2002, 11:22 PM
I'm just starting to do my own plugin. I think the function gir_version, gir_name, gir_description, gir_devicenum and gir_requested_api are working good but for gir_open and gir_close I got a problem.
My probleme is when I want to open Girder with my plugin in the plugin directory, Girder show the start picture and close rigth away without error.
What do I forget?? or what do I do wrong?
Thank.
Ron
November 14th, 2002, 12:28 AM
Have you declared the functions as __stdcall or WINAPI ?
RobRoy
November 14th, 2002, 05:47 AM
Which function I have to declare as __stdcall or WINAPI and how you do that?
Mark F
November 14th, 2002, 05:59 AM
All of the functions you export to Girder (gir_*) must be declared as stdcall.
How you do that depends on what tool set you are using. If you are using VC++:
Pull down the project menu
Choose settings
In the "Settings for:" list, choose "All Configurations"
Go to the C/C++ tab
Choose "Code Generation" in the drop down list
In the "Calling convention" list, choose __stdcall
Press OK
You will need to Rebuild All on the project
Ron
November 14th, 2002, 06:00 AM
__stdcall is a calling convention, it makes sure that Girder and the plugin know how to communicate with eachother.
you'll need to define every function that Girder gets ( gir_* ) to be __stdcall or WINAPI (is the same )
int WINAPI gir_requested_api(int maxapi)
Alternativly you can also tell your compiler to simple compiler all functions as stdcall. In VC6 this can be done in Project|Settings|C/C++|Code Generation|Calling Convetion
Hope this helps. What compiler are you using ?
edit: Mark beat me to it :-)
RobRoy
November 14th, 2002, 06:53 AM
"I'm using MS Visual c++."
Thanks all for your help, I'm working right now so I gona try that tonigh.
Girder "RULES"
Powered by vBulletin® Version 4.1.8 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.