Click here to Skip to main content
15,893,508 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: vc++ Pin
EvScott9-Apr-06 5:30
EvScott9-Apr-06 5:30 
GeneralRe: vc++ Pin
sudeep_br9-Apr-06 18:01
sudeep_br9-Apr-06 18:01 
GeneralRe: vc++ Pin
Hamid_RT9-Apr-06 20:04
Hamid_RT9-Apr-06 20:04 
AnswerRe: vc++ Pin
Michael Dunn8-Apr-06 16:38
sitebuilderMichael Dunn8-Apr-06 16:38 
AnswerRe: vc++ Pin
sheshidar9-Apr-06 6:36
sheshidar9-Apr-06 6:36 
GeneralRe: vc++ Pin
sudeep_br9-Apr-06 18:03
sudeep_br9-Apr-06 18:03 
AnswerRe: vc++ Pin
David Crow10-Apr-06 3:48
David Crow10-Apr-06 3:48 
QuestionDLL to VB callback help Pin
borono8-Apr-06 13:56
borono8-Apr-06 13:56 
Thought I had this done, realised I would be sending strings as well and have had major trouble making it happen. I am trying to use a DLL I wrote in VC6 to send a string, via callback, to a VB app I wrote in VB6. Below is the code I am using on both the DLL and VB projects.

DLL Side:
extern "C" void __stdcall stat( void (*cb) (char**) )
{
	char* nrMsg = "This is a test!";
        cb( &nrMsg );

} 


VB Side:
Declare Sub stat Lib "mydll.dll" (ByVal funcptr As Long)
'
Sub CallbackFunction(ByRef numb As Long)
    Form1.Label1.Caption = "Success: " + Str(numb)
End Sub


Output:
Success: 268486828


I know I have to convert it to BSTR Unicode, but do not know how or what includes are needed. Not exactly sure how to pull that data in on the VB side either. All information I have seen thus far was all theoretical, so an example would be great concerning both sides (i.e., DLL and VB sides). I will eventually need to pass around 12 strings and 12 integers at one time.

If you need more info, let me know. Thanks in advance

Best Regards
AnswerRe: DLL to VB callback help Pin
Michael Dunn8-Apr-06 15:14
sitebuilderMichael Dunn8-Apr-06 15:14 
GeneralRe: DLL to VB callback help Pin
borono8-Apr-06 16:02
borono8-Apr-06 16:02 
GeneralRe: DLL to VB callback help Pin
Michael Dunn8-Apr-06 16:34
sitebuilderMichael Dunn8-Apr-06 16:34 
GeneralRe: DLL to VB callback help Pin
borono8-Apr-06 17:20
borono8-Apr-06 17:20 
GeneralRe: DLL to VB callback help Pin
Waldermort8-Apr-06 20:14
Waldermort8-Apr-06 20:14 
GeneralRe: DLL to VB callback help Pin
Waldermort8-Apr-06 20:24
Waldermort8-Apr-06 20:24 
GeneralRe: DLL to VB callback help Pin
borono9-Apr-06 4:35
borono9-Apr-06 4:35 
GeneralRe: DLL to VB callback help Pin
Waldermort9-Apr-06 4:52
Waldermort9-Apr-06 4:52 
GeneralRe: DLL to VB callback help Pin
borono9-Apr-06 8:20
borono9-Apr-06 8:20 
QuestionThread is frozen Pin
LionAM8-Apr-06 12:51
LionAM8-Apr-06 12:51 
AnswerRe: Thread is frozen Pin
includeh108-Apr-06 19:07
includeh108-Apr-06 19:07 
AnswerRe: Thread is frozen Pin
Philipps8-Apr-06 20:13
Philipps8-Apr-06 20:13 
GeneralRe: Thread is frozen Pin
LionAM8-Apr-06 20:58
LionAM8-Apr-06 20:58 
QuestionTalking to a USB GPS device Pin
smikesmith8-Apr-06 12:23
smikesmith8-Apr-06 12:23 
AnswerRe: Talking to a USB GPS device Pin
Iain Clarke, Warrior Programmer8-Apr-06 12:54
Iain Clarke, Warrior Programmer8-Apr-06 12:54 
GeneralRe: Talking to a USB GPS device Pin
smikesmith8-Apr-06 13:00
smikesmith8-Apr-06 13:00 
GeneralRe: Talking to a USB GPS device Pin
Iain Clarke, Warrior Programmer8-Apr-06 13:07
Iain Clarke, Warrior Programmer8-Apr-06 13:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.