
Problem in Calling VC++ DLL in VB code on WinCE
Hi All,
I am facing a strange problem in calling functions from DLL written in
VC++ from VB.
When I am using running the same code on "Windows NT", its working
Gr8.
But when I am using it on WinCE, even it works fine there. (I am using
VC++ / VB toolkit for WinCE). But After I 'EXIT' the application using
"App.End" or just by "canceling the form", I am getting a crashing
sound twice along with 2 pop-up boxes. I could not see what they r
saying, since, they iimidtaly get distroyed.
I really dunno whats wrong.
Can anyone help me with this?
Swati..
for reference, I am giving a code..
MsgDLL.cpp has function:
-----------------------------------------------------------------------------
int _stdcall Message(HWND hHWND)
{
MessageBox(hHWND, TEXT("Hello World"), TEXT("Hello World"), MB_OK);
//MessageBox(hDlg, TEXT("No password entered."), NULL, MB_OK
return 0;
Quote:
}
-----------------------------------------------------------------------------
I definded Message function in MsgDLL.def file.
The VB code is as follows:
-----------------------------------------------------------------------------
Option Explicit
Declare Function Message Lib "MsgDLL.dll" (ByVal hWnd As Long) As
Integer
Private Sub Command1_Click()
Dim i As Integer
i = Message(Me.hWnd)
End Sub
Private Sub Command2_Click()
App.End
End Sub
-----------------------------------------------------------------------------
As i said.. its working fine (no crashing, nothing) with WinNT. Also
runs on WinCE, but gives "2 pop-ups & twice crashing sound" after
exiting application on WinCE.
Please help.
Swati