I have a problem when i call the dll from VB.The message box appears but after i click ok i get the error message "bad dll calling convention".How can i solve this.
The Dll code
Code:
#include "stdafx.h"
void car(HWND h)
{
	MessageBox(h,"OK","KO",MB_OK);
}
Def File
Code:
LIBRARY "brisi.DLL"
EXPORTS
	car @2
And in VB a declare the function and call it:
Code:
Public Declare Sub car Lib "brisi.dll" (ByVal h As Long)
car Form1.hWnd