Click here to Skip to main content
15,915,076 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: int32 = (char1,char2,char3,char4) Pin
Hamid_RT9-Apr-06 6:10
Hamid_RT9-Apr-06 6:10 
AnswerRe: int32 = (char1,char2,char3,char4) Pin
Stephen Hewitt9-Apr-06 14:02
Stephen Hewitt9-Apr-06 14:02 
Question3D Game Engine Architecture's web Pin
akira329-Apr-06 1:26
akira329-Apr-06 1:26 
AnswerRe: 3D Game Engine Architecture's web Pin
BEamer9-Apr-06 3:07
BEamer9-Apr-06 3:07 
QuestionFile Icon Pin
big_denny_2008-Apr-06 23:38
big_denny_2008-Apr-06 23:38 
AnswerRe: File Icon Pin
Hamid_RT9-Apr-06 0:05
Hamid_RT9-Apr-06 0:05 
AnswerRe: File Icon Pin
RChin9-Apr-06 1:07
RChin9-Apr-06 1:07 
Questionintellisense with directx Pin
blue_rabbit8-Apr-06 20:59
blue_rabbit8-Apr-06 20:59 
AnswerRe: intellisense with directx Pin
Trollslayer8-Apr-06 22:56
mentorTrollslayer8-Apr-06 22:56 
Questionpointer to function in class Pin
blue_rabbit8-Apr-06 20:43
blue_rabbit8-Apr-06 20:43 
AnswerRe: pointer to function in class Pin
Matt Godbolt8-Apr-06 22:43
Matt Godbolt8-Apr-06 22:43 
Questionvc++ Pin
sudeep_br8-Apr-06 15:43
sudeep_br8-Apr-06 15:43 
AnswerRe: vc++ Pin
EvScott8-Apr-06 16:36
EvScott8-Apr-06 16:36 
GeneralRe: vc++ Pin
sudeep_br9-Apr-06 4:31
sudeep_br9-Apr-06 4:31 
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 

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.