Click here to Skip to main content
15,916,693 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: C++ STL help... using pointer in STL map Pin
Johnny ²23-Jun-04 3:09
Johnny ²23-Jun-04 3:09 
GeneralRe: C++ STL help... using pointer in STL map Pin
Anonymous23-Jun-04 14:20
Anonymous23-Jun-04 14:20 
QuestionHow to Enable/Disable the hibernation support in VC++ Pin
ErisonWu22-Jun-04 21:57
ErisonWu22-Jun-04 21:57 
GeneralChange cursor in a region of a CStatic Pin
doctorpi22-Jun-04 21:52
doctorpi22-Jun-04 21:52 
GeneralRe: Change cursor in a region of a CStatic Pin
Johan Rosengren22-Jun-04 22:21
Johan Rosengren22-Jun-04 22:21 
Questionhow to find all folders which are shared fully in my drive??? Pin
ngocdq22-Jun-04 21:34
ngocdq22-Jun-04 21:34 
AnswerRe: how to find all folders which are shared fully in my drive??? Pin
shri_3120-Sep-04 3:26
shri_3120-Sep-04 3:26 
GeneralCalling a C++ dll in VB with strucures & strings Pin
Cedric Moonen22-Jun-04 21:21
Cedric Moonen22-Jun-04 21:21 
Hello !

I have a dll that is written in C++ and is called in VB. In one function I need to send a structure containing strings !! But how can I do this, this is really hell to understand how VB handles the strings Mad | :mad: ! I tried with the BSTR type but this doesn't work

Example:
struct VBSTRUCT<br />
{<br />
   BSTR String1;<br />
   BSTR String2;<br />
}<br />
<br />
<br />
int __stdcall TestFunc(VBSTRUCT* VbStruct)<br />
{<br />
   //Need to retrieve th datas but this doesn't work !!!!!<br />
}<br />
<br />


The structure is declared in VB also !

The thing I don't understand is that it's working the other way: when the function is called and when I fill the structure within my Dll (using SysAllocStringByteLen function to allocate the string). And also, when I check in memory the strings that are allocated, the characters are on ONE byte and VB still understand it Confused | :confused: Unsure | :~ .

I tried a lot of things but nothing works. If someone has an idea how to do this, this would be great Smile | :) .

Thanks
GeneralRe: Calling a C++ dll in VB with strucures & strings Pin
Antony M Kancidrowski22-Jun-04 23:22
Antony M Kancidrowski22-Jun-04 23:22 
GeneralSelect File Control. Pin
zooosta22-Jun-04 20:52
zooosta22-Jun-04 20:52 
GeneralRe: Select File Control. Pin
V.22-Jun-04 21:24
professionalV.22-Jun-04 21:24 
GeneralRe: Select File Control. Pin
zooosta23-Jun-04 13:10
zooosta23-Jun-04 13:10 
GeneralRegQueryValueEx Pin
22-Jun-04 20:16
suss22-Jun-04 20:16 
GeneralRe: RegQueryValueEx Pin
Sir.Ixildore22-Jun-04 20:38
Sir.Ixildore22-Jun-04 20:38 
QuestionHow to change caption of a button on a property page? Pin
Rajesh_K_Sharma22-Jun-04 19:29
Rajesh_K_Sharma22-Jun-04 19:29 
AnswerRe: How to change caption of a button on a property page? Pin
Antony M Kancidrowski22-Jun-04 23:34
Antony M Kancidrowski22-Jun-04 23:34 
Generalalert messages Pin
ask_you22-Jun-04 19:12
ask_you22-Jun-04 19:12 
GeneralRe: alert messages Pin
bneacetp22-Jun-04 19:23
bneacetp22-Jun-04 19:23 
GeneralRe: alert messages Pin
ask_you22-Jun-04 19:46
ask_you22-Jun-04 19:46 
GeneralRe: alert messages Pin
bneacetp22-Jun-04 19:47
bneacetp22-Jun-04 19:47 
GeneralRe: alert messages Pin
ask_you22-Jun-04 22:26
ask_you22-Jun-04 22:26 
GeneralRe: alert messages Pin
jmkhael23-Jun-04 1:35
jmkhael23-Jun-04 1:35 
GeneralRe: alert messages Pin
ask_you23-Jun-04 17:27
ask_you23-Jun-04 17:27 
QuestionHow to packaged an MFC project? Pin
ngocdq22-Jun-04 17:59
ngocdq22-Jun-04 17:59 
AnswerRe: How to packaged an MFC project? Pin
bneacetp22-Jun-04 18:13
bneacetp22-Jun-04 18:13 

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.