AtomicChip
Programmer
Here's my problem...
All that I'm trying to do is input a string into a ListBox (created in a Visual Basic6 project) from a simple C++ DLL.
There are two controls on the VB form. A command button (Command1), and a listbox (List1).
The code in the VB project is as follows:
(In a module)...
Public Declare Function ShowInfo Lib "ListBoxInput.dll" (winHWnd As Long) As Integer
(On the form)...
Private Sub Command1_Click()
ShowInfo List1.hwnd
End Sub
As for the code in the .dll:
#include <windows.h>
#define NOMANGLE
NOMANGLE long _stdcall ShowInfo( long winHWnd );
char* t;
NOMANGLE long _stdcall ShowInfo( long winHWnd )
{
unsigned long ADDTEXT;
ADDTEXT = LB_ADDSTRING;
SendMessage( (HWND) winHWnd, (UINT) ADDTEXT, (WPARAM) 1, (LPARAM) "Hello"
;
return 1;
}
The function is exported using a .def file. At this point, the DLL is not generating any errors at all. It's just not sending the string (LPARAM) to the listbox.
I've been beating my head against a brick wall for hours now about this... Any help would be greatly appreciated. Thanks
-----------------------------------------------
"The night sky over the planet Krikkit is the least interesting sight in the entire universe."
-Hitch Hiker's Guide To The Galaxy
All that I'm trying to do is input a string into a ListBox (created in a Visual Basic6 project) from a simple C++ DLL.
There are two controls on the VB form. A command button (Command1), and a listbox (List1).
The code in the VB project is as follows:
(In a module)...
Public Declare Function ShowInfo Lib "ListBoxInput.dll" (winHWnd As Long) As Integer
(On the form)...
Private Sub Command1_Click()
ShowInfo List1.hwnd
End Sub
As for the code in the .dll:
#include <windows.h>
#define NOMANGLE
NOMANGLE long _stdcall ShowInfo( long winHWnd );
char* t;
NOMANGLE long _stdcall ShowInfo( long winHWnd )
{
unsigned long ADDTEXT;
ADDTEXT = LB_ADDSTRING;
SendMessage( (HWND) winHWnd, (UINT) ADDTEXT, (WPARAM) 1, (LPARAM) "Hello"
return 1;
}
The function is exported using a .def file. At this point, the DLL is not generating any errors at all. It's just not sending the string (LPARAM) to the listbox.
I've been beating my head against a brick wall for hours now about this... Any help would be greatly appreciated. Thanks
-----------------------------------------------
"The night sky over the planet Krikkit is the least interesting sight in the entire universe."
-Hitch Hiker's Guide To The Galaxy