Click here to Skip to main content
15,911,306 members
Home / Discussions / COM
   

COM

 
QuestionActiveX without a container Pin
Ahsan Askare14-Nov-05 23:30
Ahsan Askare14-Nov-05 23:30 
AnswerRe: ActiveX without a container Pin
Roger Stoltz22-Nov-05 11:33
Roger Stoltz22-Nov-05 11:33 
QuestionActiveX control and HTML Pin
FJK12-Nov-05 18:39
FJK12-Nov-05 18:39 
QuestionNew to COM. Help needed. Pin
Owner drawn10-Nov-05 23:49
Owner drawn10-Nov-05 23:49 
AnswerRe: New to COM. Help needed. Pin
Gizzo11-Nov-05 6:33
Gizzo11-Nov-05 6:33 
AnswerRe: New to COM. Help needed. Pin
Brian C Hart30-Dec-05 23:25
professionalBrian C Hart30-Dec-05 23:25 
Questioncreating a BSTR with embedded Nulls Pin
amitsax7610-Nov-05 22:31
amitsax7610-Nov-05 22:31 
AnswerRe: creating a BSTR with embedded Nulls Pin
Welf Wiest31-Jan-06 5:06
Welf Wiest31-Jan-06 5:06 
Hello Amit,

I think the problem is you use the lowlevel function SysAllocStringByteLen. This function places an Ansi String into an Unicode BSTR without conversion.
Later ConvertBSTRToString assumes that bstrng contains an unicode string and converts it to ansi. This ist the reaseon that leading zeros are missing.

If you try following
wchar_t str[] = {L'L',0x00,0x00,0x01,0x00,L'S',0x08,0x00};
BSTR bstrng = ::SysAllocStringLen(str,sizeof(str));

it should behave as expected

Welf Wiest



GeneralRe: creating a BSTR with embedded Nulls Pin
amitsax7631-Jan-06 16:09
amitsax7631-Jan-06 16:09 
GeneralRe: creating a BSTR with embedded Nulls Pin
Welf Wiest1-Feb-06 0:54
Welf Wiest1-Feb-06 0:54 
Questionhandling Variant data Pin
amitsax769-Nov-05 18:03
amitsax769-Nov-05 18:03 
QuestionTrouble to run DCOM - server from different network Pin
Bor_boss9-Nov-05 16:46
Bor_boss9-Nov-05 16:46 
QuestionHelp Needed in Extended MAPI. Pin
deepgeorge8-Nov-05 17:35
deepgeorge8-Nov-05 17:35 
QuestionCalling a C# COM Object from VC++ 6.0 Pin
E6AD8-Nov-05 17:33
E6AD8-Nov-05 17:33 
AnswerRe: Calling a C# COM Object from VC++ 6.0 Pin
douglasjordan10-Nov-05 2:06
douglasjordan10-Nov-05 2:06 
Questionhelp help help Pin
engriri20068-Nov-05 14:13
engriri20068-Nov-05 14:13 
AnswerRe: help help help Pin
douglasjordan8-Nov-05 17:29
douglasjordan8-Nov-05 17:29 
AnswerRe: help help help Pin
Brian C Hart30-Dec-05 23:26
professionalBrian C Hart30-Dec-05 23:26 
QuestionCan't bring to top a specific "Microsoft Word" window Pin
nadzzz8-Nov-05 4:50
nadzzz8-Nov-05 4:50 
AnswerRe: Additionnal Informations Pin
nadzzz8-Nov-05 5:06
nadzzz8-Nov-05 5:06 
Questionadd page in property sheet for property tab Pin
Maddie from Dartford7-Nov-05 17:18
Maddie from Dartford7-Nov-05 17:18 
QuestionDirectShow release of GraphBuilder Pin
douglasjordan7-Nov-05 12:17
douglasjordan7-Nov-05 12:17 
Question.NET to COM+ and vice versa Pin
Chals7-Nov-05 6:00
Chals7-Nov-05 6:00 
QuestionVS 2005 COM DLL issue Pin
pass_x0r7-Nov-05 2:12
pass_x0r7-Nov-05 2:12 
QuestionCOleDispatchDriver.InvokeHelper PROBLEM Pin
Ro_land7-Nov-05 0:16
Ro_land7-Nov-05 0:16 

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.