Click here to Skip to main content
16,010,392 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralIcons with shortcut layers Pin
CaesarCZ18-Sep-02 11:55
CaesarCZ18-Sep-02 11:55 
GeneralRe: Icons with shortcut layers Pin
Michael Dunn18-Sep-02 12:00
sitebuilderMichael Dunn18-Sep-02 12:00 
GeneralUnicode to Arabic 1256 Pin
Hadi Rezaee18-Sep-02 11:43
Hadi Rezaee18-Sep-02 11:43 
GeneralCRT .dll's for Winsock Pin
Aaron Schaefer18-Sep-02 11:13
Aaron Schaefer18-Sep-02 11:13 
GeneralPassing strings from VC to a VB COM dll Pin
ns18-Sep-02 11:11
ns18-Sep-02 11:11 
GeneralRe: Passing strings from VC to a VB COM dll Pin
ns18-Sep-02 11:28
ns18-Sep-02 11:28 
GeneralRe: Passing strings from VC to a VB COM dll Pin
ns18-Sep-02 11:35
ns18-Sep-02 11:35 
GeneralRe: Passing strings from VC to a VB COM dll Pin
Bart Robeyns18-Sep-02 12:12
Bart Robeyns18-Sep-02 12:12 
The short answer:place a call to SysAllocString around your char*.
The longer one: Strings in COM are not 'char*' , but 'BSTR', which is a length-prefixed, wide-character string. Furthermore, allocation of these BSTR must be handled by the COM runtime, you are not allowed to do it yourself. SysAllocString() allocates a block of memory to hold the string you passed it, converted to a widestring and returns a pointer to this memory-block. You can use that pointer as an argument in your method-call.
When your finished with the BSTR, you should call SysFreeString() on it.
If you're going to use COM from C++, you will save yourself a lot of trouble by reading some initiating articles, like Beginner's Tutorial: Calling Visual Basic ActiveX DLLs from Visual C++ here at The Code Project.
GeneralRe: Passing strings from VC to a VB COM dll Pin
ns_18-Sep-02 13:50
sussns_18-Sep-02 13:50 
GeneralRe: Passing strings from VC to a VB COM dll Pin
Anonymous18-Sep-02 21:08
Anonymous18-Sep-02 21:08 
GeneralRe: Passing strings from VC to a VB COM dll Pin
ns19-Sep-02 1:19
ns19-Sep-02 1:19 
GeneralRe: Passing strings from VC to a VB COM dll Pin
Bart Robeyns19-Sep-02 11:21
Bart Robeyns19-Sep-02 11:21 
GeneralFinal question...I hope Pin
ns19-Sep-02 11:37
ns19-Sep-02 11:37 
GeneralRe: Passing strings from VC to a VB COM dll Pin
Michael Dunn18-Sep-02 12:02
sitebuilderMichael Dunn18-Sep-02 12:02 
GeneralRe: Passing strings from VC to a VB COM dll Pin
ns_18-Sep-02 13:52
sussns_18-Sep-02 13:52 
GeneralRe: Passing strings from VC to a VB COM dll Pin
ns19-Sep-02 1:03
ns19-Sep-02 1:03 
GeneralGUI front end Pin
WhiteLegend18-Sep-02 10:57
WhiteLegend18-Sep-02 10:57 
GeneralRe: GUI front end Pin
Ravi Bhavnani18-Sep-02 11:05
professionalRavi Bhavnani18-Sep-02 11:05 
GeneralRe: GUI front end Pin
xai18-Sep-02 11:19
xai18-Sep-02 11:19 
QuestionWhat path to code in #import? Pin
ns18-Sep-02 10:45
ns18-Sep-02 10:45 
AnswerRe: What path to code in #import? Pin
Michael Dunn18-Sep-02 10:45
sitebuilderMichael Dunn18-Sep-02 10:45 
GeneralRe: What path to code in #import? Pin
ns18-Sep-02 10:55
ns18-Sep-02 10:55 
GeneralRe: What path to code in #import? Pin
Michael Dunn18-Sep-02 11:58
sitebuilderMichael Dunn18-Sep-02 11:58 
GeneralRe: What path to code in #import? Pin
Jon Hulatt18-Sep-02 22:25
Jon Hulatt18-Sep-02 22:25 
GeneralQuestion about CSocket Pin
nachilau18-Sep-02 9:36
nachilau18-Sep-02 9:36 

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.