Posted: Wed Sep 05, 2001 10:45 pm
Restored from previous forum. Originally posted by ricardo.
Im new at PB and i have some questions, maybe you can help me
,-------------------------------------------------------------------------------
1.- I NEED TO CALL SOME EXTERNAL DLL (not WINAPI)
i can only get to this point:
modulehandle = LoadLibrary_("test.dll")
*ret = GetProcAddress_( modulehandle, "WAV_initializeWork" )
I have the address of the function, how can i call it, i try
call *ret
but nothing.
The dll documentation says:
A sample:
typedef MERET (*me_init)(void); // prototype declaration
static me_init initfunc; // definition of an initilizing function
initfunc = ( me_init )GetProcAddress( hModule, "WAV_initializeWork" );
if( initfunc == NULL ){
// If you fail to get export
printf( "fail to get the function in gogo.dll\n" );
exit( -1 );
}else{
// If you succeed in getting export
initfunc(); // run initfunc ( WAV_initializeWork )
}
;
then i need to call the dll functions, something like:
static const char *filename = "test.wav";
WAV_setConfigure( MC_INPUTFILE, MC_INPDEV_FILE, (UPARAM)filename)
;and
UPARAM totalFrame, curFrame;
WAV_getConfigure( MG_COUNT_FRAME, (UPARAM*)&totalFrame);
; and
WAV_processFrame();
etc,etc...
How can i do it? If i try to call this dll function from PB i get an error... or maybe im doing something wrong
,-----------------------------------------------------------------------------
2.- MEMORYBANK
I get the point (i hope) but i cant find how to use it (i dont try yet)
I want something like POINTER, and i dont know if MemoryBank is the appropiate,
however i want to know any example of the use of MemoryBank (i look at the example in the ehlp file, but its not usefull and i loose the concept).
Im looking for some kind of pointer, i want to be able to call a function (procedure) by its address.
In Rapid-Q its named BIND and its something like BIND some function to its address and the just call the address and you get the procedure working
x = input
CALL x
Its used in Rapid-Q to avoid the SelectCase when you have a lot of keywords
,-----------------------------------------------------------------------------
Thanks
Ricardo Arias
Im new at PB and i have some questions, maybe you can help me
,-------------------------------------------------------------------------------
1.- I NEED TO CALL SOME EXTERNAL DLL (not WINAPI)
i can only get to this point:
modulehandle = LoadLibrary_("test.dll")
*ret = GetProcAddress_( modulehandle, "WAV_initializeWork" )
I have the address of the function, how can i call it, i try
call *ret
but nothing.
The dll documentation says:
A sample:
typedef MERET (*me_init)(void); // prototype declaration
static me_init initfunc; // definition of an initilizing function
initfunc = ( me_init )GetProcAddress( hModule, "WAV_initializeWork" );
if( initfunc == NULL ){
// If you fail to get export
printf( "fail to get the function in gogo.dll\n" );
exit( -1 );
}else{
// If you succeed in getting export
initfunc(); // run initfunc ( WAV_initializeWork )
}
;
then i need to call the dll functions, something like:
static const char *filename = "test.wav";
WAV_setConfigure( MC_INPUTFILE, MC_INPDEV_FILE, (UPARAM)filename)
;and
UPARAM totalFrame, curFrame;
WAV_getConfigure( MG_COUNT_FRAME, (UPARAM*)&totalFrame);
; and
WAV_processFrame();
etc,etc...
How can i do it? If i try to call this dll function from PB i get an error... or maybe im doing something wrong
,-----------------------------------------------------------------------------
2.- MEMORYBANK
I get the point (i hope) but i cant find how to use it (i dont try yet)
I want something like POINTER, and i dont know if MemoryBank is the appropiate,
however i want to know any example of the use of MemoryBank (i look at the example in the ehlp file, but its not usefull and i loose the concept).
Im looking for some kind of pointer, i want to be able to call a function (procedure) by its address.
In Rapid-Q its named BIND and its something like BIND some function to its address and the just call the address and you get the procedure working
x = input
CALL x
Its used in Rapid-Q to avoid the SelectCase when you have a lot of keywords
,-----------------------------------------------------------------------------
Thanks
Ricardo Arias