Prototyping a DLL (OpenInsight 32-Bit)
At 04 MAR 2006 11:31:56PM Steve Epstein wrote:
I would like to prototype an ActiveX DLL. I have several question:
1. Can an ActiveX DLL be prototyped?
2. The definition of the program is: sub health_effect(ByVal input_data As Integer)
2a. There is no return value (it writes an OS file) so what should I do for the return value type?
2b. Do I need to take steps since the parameter definition is ByVal?
2c. What calling convention should I use (stdcall, pascal, cdecl)?
At 07 MAR 2006 11:38AM Colin Rule wrote:
Should be possible to use the DLL calls from ActiveX DLLs.
Dont forget to run the DECLARE_FNCS on SYSPROG and NOT on your application.
You can use a program such as PE Explorer to find out all the DLL calling standards. There is a 30 day (I think) download if you search the web. It allows you to right click on a DLL and enquire about all the calls, and see the type definitions etc that you need.
It is best then to compare a known DLL to the one you refer to, to see the different conventions etc.
At 07 MAR 2006 12:07PM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote:
Steve,
1. Can an ActiveX DLL be prototyped?
Theoretically. You can only prototype it's exported functions. Functionality in an ActiveX DLL is usually exposed via the COM object interface rather than by exported functions in which case you might be able to use OI's OLE capability instead.
2. The definition of the program is: sub health_effect(ByVal input_data As Integer) 2a. There is no return value (it writes an OS file) so what should I do for the return value type? 2b. Do I need to take steps since the parameter definition is ByVal? 2c. What calling convention should I use (stdcall, pascal, cdecl)?
Providing that health_effect is an exported function your prototype will probably be:
VOID STDCALL health_effect( INT )
World leaders in all things RevSoft
At 07 MAR 2006 11:58PM Steve Epstein wrote:
Thanks to both of you.