-
July 30th, 2009, 02:16 PM
#1
export from dll
Though the title sounds simple, the problem seems to be rather tricky...
So I want to call a function from the dll which I have no any reference for.
In particular
1) the dll is 'msvbvm60.dll', a virtual machine for one widely known programming language
2) the function is 'rtcMsgBox'
There also is a code snippet:
Code:
#include <windows.h>
#include <cassert>
//----------------------------------------------------------------------------
int WINAPI WinMain( HINSTANCE hThisInstance,
HINSTANCE hPrevInstance,
LPSTR lpszCmdLine,
int nCmdShow )
{
typedef void (* procedure_type) ( const void *argument_1, const void *argument_2 );
HMODULE module_handle = LoadLibrary( "msvbvm60.dll" );
assert( SUCCEEDED(module_handle) );
procedure_type procedure = (procedure_type)GetProcAddress( module_handle, "rtcMsgBox" );
assert( procedure != NULL );
procedure( (const void *)L"", (const void *)L"" );
FreeLibrary( module_handle );
return 0;
}
While assertions are successful, application fails with MS apologies for inconvenience...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|