Well Briere, I have just tried it and it seems to work ok see code below...
#include <DarkSDK.h>
void DarkSDK( void )
{
dbSyncOn( );
dbSyncRate( 60 );
//load the dll
dbDLLLoad( (DWORD) "Glut32.dll", 1 );
if( dbDLLExist( 1 ) == 0 ) {
//dll not loaded so display error and exit
dbCLS( );
dbText( 10, 10, "DLL not loaded.." );
dbSync( );
dbWaitKey( );
dbEnd( );
return;
}
//dll was loaded ok so check if we can access a function
if( dbDLLCallExist( 1, (DWORD) "glutCreateWindow" ) == 0 ) {
//call failed
dbCLS( );
dbText( 10, 10, "DLL Call does not exist.." );
dbSync( );
dbWaitKey( );
dbDLLDelete( 1 );
dbEnd( );
return;
}
else {
//the call does exist
dbCLS( );
dbText( 10, 10, "DLL loaded and call exists............. Press any key to call the function" );
dbSync( );
dbWaitKey( );
//call the glutCreateWindow function
//NOTE: this wont create a window until the glutMainLoop is entered, so don't expect an open gl window to popup
dbCallDLL( 1, (DWORD)"glutCreateWindow", (DWORD)"My Window" );
dbCLS( );
dbText( 10, 10, "function called ok, press any key to close this window" );
dbSync( );
dbWaitKey( );
dbDLLDelete( 1 );
dbEnd( );
return;
}
dbEnd( );
return;
}
I have attached a copy of the compiled executable and the dll.
I know the voices aren't real, but they have good ideas!