How can BlitzMax access the methods of classes and the class hierarchy that are part of an API in a .DLL file?
For example, suppose a DLL contains numerous classes that each have their own 'Create()' method. How can BlitzMax call the Create() method for a particular class in that DLL?
I know that through the win32 module found in the win32.mod folder, we have access to the LoadLibraryA routine to load a DLL library and receive a reference to it, and then can use GetProcAddress to set up a function pointer to the routine we want to call in the DLL:
But how do we access a specific function (method) of a class that is in a DLL file?
I see the pub folder has entries for the following WinAPI functions:
RegisterClassA
RegisterClassW
GetModuleHandleA
GetModuleHandleW
Where "A" stands for ANSI characters, "W" for Unicode characters.
Has anybody successfully used these functions (or perhaps other ones) to call various methods of classes buried inside a DLL?
For example, suppose a DLL contains numerous classes that each have their own 'Create()' method. How can BlitzMax call the Create() method for a particular class in that DLL?
I know that through the win32 module found in the win32.mod folder, we have access to the LoadLibraryA routine to load a DLL library and receive a reference to it, and then can use GetProcAddress to set up a function pointer to the routine we want to call in the DLL:
Import pub.win32 Global libptr=LoadLibraryA( "DLL_Library_Name" ) Global Function_Name(parameter:Type)=GetProcAddress(libptr,"DLL_Function_Name") ' now can use the function in BMax Function_Name(some_parameter)
But how do we access a specific function (method) of a class that is in a DLL file?
I see the pub folder has entries for the following WinAPI functions:
RegisterClassA
RegisterClassW
GetModuleHandleA
GetModuleHandleW
Where "A" stands for ANSI characters, "W" for Unicode characters.
Has anybody successfully used these functions (or perhaps other ones) to call various methods of classes buried inside a DLL?