Hey, im trying to u'ze DLL'z in VB (Just an expierement), I wrote a simple "Hello World" DLL in MSVC++, and tried to call a function from it in VB.
I was hopefull! The Message-Box Popped up. I press'd 'OK', then I got a calling-Convention Runtime error... I've tried like everything, I can't seem to tell VB to u'ze the "cdecl" calling convention, and I don't know wut to tell MSVC++ to compile it with to make VB Happy!
Any idea'z???
Thank'z a LOT for Help! ~SPH![]()
![]()
P.S. Here i'z my code!
Here i'z the VB Import Code:
Here i'z the C/C++/ASM Exported Code:Code:Private Declare Function dllMSG Lib "dll.dll" () Private Sub Command1_Click() dllMSG End Sub
Code:#include <windows.h> #ifdef __cplusplus extern "C"{ #endif//__cplusplus void __declspec(dllexport) __cdecl dllMSG() { MessageBox(NULL,"VB and C/C++/ASM MIXED!","WOOHOO!",MB_OK); return; } #ifdef __cplusplus } #endif//__cplusplus



LinkBack URL
About LinkBacks




Still not working correctly