Click here to Skip to main content
15,887,428 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: convert int to string Pin
Stephen Hewitt6-May-06 3:10
Stephen Hewitt6-May-06 3:10 
GeneralRe: convert int to string Pin
sunita ramesh6-May-06 18:37
sunita ramesh6-May-06 18:37 
GeneralRe: convert int to string Pin
Stephen Hewitt6-May-06 19:36
Stephen Hewitt6-May-06 19:36 
AnswerRe: convert int to string Pin
_AnsHUMAN_ 6-May-06 3:59
_AnsHUMAN_ 6-May-06 3:59 
AnswerRe: convert int to string Pin
ThatsAlok6-May-06 22:45
ThatsAlok6-May-06 22:45 
AnswerRe: convert int to string Pin
Osama E. Adly7-May-06 4:18
Osama E. Adly7-May-06 4:18 
AnswerRe: convert int to string Pin
Hamid_RT7-May-06 18:16
Hamid_RT7-May-06 18:16 
QuestionText exchange VB 16 bit / VC 32 Pin
Dihirk6-May-06 2:53
Dihirk6-May-06 2:53 
Hello

I am trying to exchange data between VB4 (16 Bit) and vc 6 using OLE. I have a problem when I try to modify string data in VB which need to be sent to c.
I can get a LPSTR from VB completely but I can not modify that in the c and give that back. AS far as I understand that would be possible with a BSTR *. But I could not get that to work in nether way.
In the following example the VB code calls the c++ code and the messagebox just shows one character 'T'. Thats all.
What am I doing wrong?
And what do I need to do to be able to modify the text in the c code so that the modification can be seen in the VB code after the call

Thanks in advance

Dirk


//////////////////////
// c++
//////////////////////

void TestDlgAutoProxy::test(BSTR FAR* text)
{
TCHAR szFinal[255];
_stprintf(szFinal, _T("%s"), (LPCTSTR) *text);
AfxMessageBox(szFinal);
}

///////////////////////////
// VB code
///////////////////////////
Private Sub Command2_Click()
Dim text As String
Dim x As Variant
t = "Text from VB to C"
x = oAuth.test(t)
MsgBox t
End Sub
AnswerRe: Text exchange VB 16 bit / VC 32 Pin
Milton Karimbekallil6-May-06 5:16
Milton Karimbekallil6-May-06 5:16 
GeneralRe: Text exchange VB 16 bit / VC 32 Pin
Dihirk6-May-06 5:34
Dihirk6-May-06 5:34 
GeneralRe: Text exchange VB 16 bit / VC 32 Pin
Milton Karimbekallil6-May-06 5:47
Milton Karimbekallil6-May-06 5:47 
GeneralRe: Text exchange VB 16 bit / VC 32 Pin
Dihirk6-May-06 22:55
Dihirk6-May-06 22:55 
GeneralRe: Text exchange VB 16 bit / VC 32 Pin
Dihirk7-May-06 2:47
Dihirk7-May-06 2:47 
GeneralRe: Text exchange VB 16 bit / VC 32 Pin
Maxwell Chen7-May-06 2:53
Maxwell Chen7-May-06 2:53 
GeneralRe: Text exchange VB 16 bit / VC 32 Pin
Dihirk7-May-06 3:11
Dihirk7-May-06 3:11 
QuestionClass Bascis Question... Pin
HakunaMatada6-May-06 1:55
HakunaMatada6-May-06 1:55 
AnswerRe: Class Bascis Question... Pin
Cedric Moonen6-May-06 2:03
Cedric Moonen6-May-06 2:03 
GeneralRe: Class Bascis Question... Pin
Stephen Hewitt6-May-06 2:44
Stephen Hewitt6-May-06 2:44 
AnswerRe: Class Bascis Question... Pin
Stephen Hewitt6-May-06 2:34
Stephen Hewitt6-May-06 2:34 
GeneralRe: Class Bascis Question... Pin
HakunaMatada6-May-06 2:51
HakunaMatada6-May-06 2:51 
GeneralRe: Class Bascis Question... Pin
Stephen Hewitt6-May-06 2:55
Stephen Hewitt6-May-06 2:55 
GeneralRe: Class Bascis Question... Pin
led mike6-May-06 6:11
led mike6-May-06 6:11 
AnswerRe: Class Bascis Question... Pin
Maxwell Chen6-May-06 3:31
Maxwell Chen6-May-06 3:31 
GeneralRe: Class Bascis Question... Pin
Stephen Hewitt6-May-06 3:54
Stephen Hewitt6-May-06 3:54 
GeneralRe: Class Bascis Question... Pin
Axter6-May-06 16:43
professionalAxter6-May-06 16:43 

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.