Click here to Skip to main content
15,909,325 members
Home / Discussions / COM
   

COM

 
GeneralMaybe you will kill me, but... Pin
7-Apr-01 21:30
suss7-Apr-01 21:30 
GeneralRe: Maybe you will kill me, but... Pin
Michael Dunn12-Apr-01 13:37
sitebuilderMichael Dunn12-Apr-01 13:37 
QuestionCan ActiveX CAB file contain AddReg? Pin
6-Apr-01 2:57
suss6-Apr-01 2:57 
GeneralCom and an ADO ConnectionPtr Pin
AndyC5-Apr-01 6:39
AndyC5-Apr-01 6:39 
QuestionCompound document server, is it possible with ATL ? Pin
Braulio Dez5-Apr-01 0:37
Braulio Dez5-Apr-01 0:37 
QuestionCompound document server, is it possible with ATL ? Pin
Braulio Dez5-Apr-01 0:37
Braulio Dez5-Apr-01 0:37 
GeneralBSTR / string Pin
William Bartholomew4-Apr-01 18:19
William Bartholomew4-Apr-01 18:19 
GeneralRe: BSTR / string Pin
Erik Thompson4-Apr-01 19:25
sitebuilderErik Thompson4-Apr-01 19:25 
The reason is that the string STL class is templated for types of char. Since a BSTR is double byte the string template assignment operator sees the second byte of the first char of your BSTR value as a null and terminates the string and stops continuing. If you want to copy the BSTR value into a STL "string" class then use the STL wstring template which is for Wide charater strings (double byte).

wstring source;
source = szString;

Or convert the szString to a single byte string using one of the converstion functions available like wcstombs and then copy it into your char string source variable. or use the USES_CONVERSION macro and use OLE2A() like follows.

Digest(BSTR szString, ...)
{
USES_CONVERSION;
string source = OLE2A(szString);
}

Cheers,
-Erik
GeneralRe: BSTR / string Pin
5-Apr-01 0:39
suss5-Apr-01 0:39 
GeneralRe: BSTR / string Pin
5-Apr-01 0:39
suss5-Apr-01 0:39 
GeneralNo keyboard in IWebBrowser2 Pin
Angus4-Apr-01 6:19
Angus4-Apr-01 6:19 
GeneralRe: No keyboard in IWebBrowser2 Pin
Michael Dunn5-Apr-01 8:49
sitebuilderMichael Dunn5-Apr-01 8:49 
GeneralCWindowImpl and WS_POPUP style Pin
Angus4-Apr-01 6:08
Angus4-Apr-01 6:08 
GeneralRe: CWindowImpl and WS_POPUP style Pin
Angus8-Apr-01 22:09
Angus8-Apr-01 22:09 
GeneralSTL: How can I delete a <list>... Pin
Braulio Dez4-Apr-01 5:28
Braulio Dez4-Apr-01 5:28 
GeneralRe: STL: How can I delete a <list>... Pin
MikeG5-Apr-01 5:25
MikeG5-Apr-01 5:25 
GeneralSTL: How can I delete a <list>... Pin
Braulio Dez4-Apr-01 5:27
Braulio Dez4-Apr-01 5:27 
GeneralHelp with Unusal Debug Error. Pin
Joseph Dempsey2-Apr-01 4:36
Joseph Dempsey2-Apr-01 4:36 
GeneralRe: Help with Unusal Debug Error. Pin
Chris Losinger2-Apr-01 5:34
professionalChris Losinger2-Apr-01 5:34 
GeneralRe: Help with Unusal Debug Error. Pin
Joseph Dempsey2-Apr-01 5:39
Joseph Dempsey2-Apr-01 5:39 
GeneralActiveX Controls and Downloading Pin
31-Mar-01 11:49
suss31-Mar-01 11:49 
GeneralMessage Map in ATL Server Pin
28-Mar-01 5:04
suss28-Mar-01 5:04 
QuestionHow to add New ATL-object to MFC Application? Pin
27-Mar-01 18:21
suss27-Mar-01 18:21 
AnswerRe: How to add New ATL-object to MFC Application? Pin
pba_11-Apr-01 1:04
pba_11-Apr-01 1:04 
QuestionHow to add New ATL-object to MFC Application? Pin
27-Mar-01 18:15
suss27-Mar-01 18:15 

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.