Click here to Skip to main content
15,894,460 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionwhy does only a part of VARIANT change from VT_DATE to VT_BSTR? Pin
liuyue14-Sep-05 18:43
liuyue14-Sep-05 18:43 
Questionwrite Text on sphere Pin
cofd14-Sep-05 18:42
cofd14-Sep-05 18:42 
AnswerRe: write Text on sphere Pin
User 58385214-Sep-05 18:46
User 58385214-Sep-05 18:46 
GeneralRe: write Text on sphere Pin
cofd14-Sep-05 19:00
cofd14-Sep-05 19:00 
GeneralRe: write Text on sphere Pin
cofd14-Sep-05 19:11
cofd14-Sep-05 19:11 
Questiona vss question Pin
followait14-Sep-05 17:39
followait14-Sep-05 17:39 
QuestionI've written a service and it can't access mapped network drives. Why? Pin
zhaopi14-Sep-05 17:26
zhaopi14-Sep-05 17:26 
QuestionSir,can you help me Pin
momer14-Sep-05 14:49
momer14-Sep-05 14:49 
AnswerRe: Sir,can you help me Pin
Christian Graus14-Sep-05 16:30
protectorChristian Graus14-Sep-05 16:30 
AnswerRe: Sir,can you help me Pin
Trollslayer14-Sep-05 21:51
mentorTrollslayer14-Sep-05 21:51 
JokeRe: Sir,can you help me Pin
ThatsAlok14-Sep-05 22:42
ThatsAlok14-Sep-05 22:42 
QuestionFile checking Pin
benjnp14-Sep-05 14:23
benjnp14-Sep-05 14:23 
AnswerRe: File checking Pin
ThatsAlok14-Sep-05 18:39
ThatsAlok14-Sep-05 18:39 
Questionsimulating keyboard input with SetKeyboardState Pin
Spiritofamerica14-Sep-05 14:14
Spiritofamerica14-Sep-05 14:14 
AnswerRe: simulating keyboard input with SetKeyboardState Pin
ThatsAlok14-Sep-05 18:29
ThatsAlok14-Sep-05 18:29 
GeneralRe: simulating keyboard input with SetKeyboardState Pin
Spiritofamerica15-Sep-05 6:06
Spiritofamerica15-Sep-05 6:06 
QuestionWin 32 error 87, the parameter is incorrect Pin
valerie9914-Sep-05 11:59
valerie9914-Sep-05 11:59 
QuestionActiveX and Windows C++ Pin
ashok12314-Sep-05 11:25
ashok12314-Sep-05 11:25 
AnswerRe: ActiveX and Windows C++ Pin
charlieg14-Sep-05 12:12
charlieg14-Sep-05 12:12 
AnswerRe: ActiveX and Windows C++ Pin
Calc2014-Sep-05 21:48
Calc2014-Sep-05 21:48 
Questionpassing string from VB6 dll function to VC++6 Pin
Member 227578514-Sep-05 10:17
Member 227578514-Sep-05 10:17 
I am trying to call a VB function from VC++ which resides in a VB dll (using CreateDispatch and header from a type library to access the VB dll) that is declared as a "String" and then set the return value to some type of variable that will hold it in the VC++ calling code. I am able to make this handshake and display a messagebox and grab the integer value returned in another test function, so I know that I am talking to the dll, I think it is the darned string representation that is not straightforward.

I have tried to work CString, BSTR, using strcpy, = , whatever and have looked high and low for an example but cannot find what I want.

Does anyone know how to do this?

The generated cpp file present in the VC code that comes from the VB dll contains:

CString _ReadWritePath::LogPath()
{
CString result;
InvokeHelper(0x60030007, DISPATCH_METHOD, VT_BSTR, (void*)&result, NULL);
return result;
}

I am including the header file clslib14.h in the file doing the call,

and the VC++ call is:

_ReadWritePath p;
p.CreateDispatch("ClsLib14.ReadWritePath");

???????? = p.LogPath() // this is what I can't figure out



Effectively, how do I pass a VB's function return value (declared as String in VB 6 as a dll) to a call from VC++ 6 and set it to a local variable in the C++ code?

-Kirk

AnswerRe: passing string from VB6 dll function to VC++6 Pin
David Crow14-Sep-05 10:35
David Crow14-Sep-05 10:35 
AnswerRe: passing string from VB6 dll function to VC++6 Pin
ky_rerun14-Sep-05 15:46
ky_rerun14-Sep-05 15:46 
AnswerRe: passing string from VB6 dll function to VC++6 Pin
S Douglas14-Sep-05 20:27
professionalS Douglas14-Sep-05 20:27 
Questionapp runs on command prompt but not dev studio Pin
valerie9914-Sep-05 9:46
valerie9914-Sep-05 9:46 

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.