Click here to Skip to main content
16,006,605 members
Home / Discussions / COM
   

COM

 
GeneralRe: Overwriting COM Pin
Sam Hobbs1-Jul-02 13:50
Sam Hobbs1-Jul-02 13:50 
GeneralATL - Class Factory and Interface Implementation Seperation Pin
Marc Bednar27-Jun-02 9:57
Marc Bednar27-Jun-02 9:57 
GeneralFiring an event from an MFC ActiveX control Pin
twomagiclovers27-Jun-02 8:59
twomagiclovers27-Jun-02 8:59 
GeneralRe: Firing an event from an MFC ActiveX control Pin
Ernest Laurentin27-Jun-02 19:29
Ernest Laurentin27-Jun-02 19:29 
GeneralSimple Srting Conversion Pin
Ryan B.27-Jun-02 5:19
Ryan B.27-Jun-02 5:19 
GeneralRe: Simple Srting Conversion Pin
Ernest Laurentin27-Jun-02 19:27
Ernest Laurentin27-Jun-02 19:27 
GeneralRe: Simple Srting Conversion Pin
Stuart Dootson3-Jul-02 14:37
professionalStuart Dootson3-Jul-02 14:37 
GeneralRe: Simple Srting Conversion Pin
Jeremy Pullicino4-Jul-02 4:57
Jeremy Pullicino4-Jul-02 4:57 
Just take care of the conversion macros like A2W, W2A, A2COLE, etc.. for 2 reasons:

1) They dynamically allocate memory ON THE STACK. This is good because it is fast and memory autmatically gets freed when the stack goes out of scope. However, there are memory limitations, so big strings could cause nasty things....

2) CComBSTR (or any other BSTR strings) support EMBEDDED NULLs. For those who do not know what embedded nulls are - basically, a BSTR could be: "Hello\0World" (notice the 0 in the middle.). When a BSTR is counted using SysStringLen(), the proper lenght is taken (SysAllocString stores the lenght of the string). However, if strlenW is used, it will stop after the "Hello" and not count the "World" part. A2W, W2A, A2COLE etc.. use strlenW to get the lenght of the string and not SysStringLen... this causes a converted string to be truncated when it encounters and embedded NULL.

Jeremy.

"Hey man, Taliban, Tali me Banana."
GeneralNo Matching DLGINIT Pin
ssirisha27-Jun-02 4:35
ssirisha27-Jun-02 4:35 
GeneralRe: No Matching DLGINIT Pin
Prem Kumar28-Jun-02 4:39
Prem Kumar28-Jun-02 4:39 
GeneralRe: No Matching DLGINIT Pin
ssirisha28-Jun-02 6:29
ssirisha28-Jun-02 6:29 
GeneralSAFEARRAY in Variant Pin
Hans Ruck26-Jun-02 5:18
Hans Ruck26-Jun-02 5:18 
GeneralRe: SAFEARRAY in Variant Pin
Ramu Pulipati26-Jun-02 6:24
Ramu Pulipati26-Jun-02 6:24 
GeneralDCOM port restriction Pin
MrGlover24-Jun-02 13:46
MrGlover24-Jun-02 13:46 
GeneralCOM Exe that "stays" Pin
[Shadow]24-Jun-02 2:28
[Shadow]24-Jun-02 2:28 
GeneralRe: COM Exe that "stays" Pin
Ernest Laurentin24-Jun-02 4:29
Ernest Laurentin24-Jun-02 4:29 
GeneralRe: COM Exe that "stays" Pin
Jason Henderson24-Jun-02 9:16
Jason Henderson24-Jun-02 9:16 
GeneralRef to ActiveX control using C Pin
JohnnyG23-Jun-02 14:17
JohnnyG23-Jun-02 14:17 
GeneralRe: Ref to ActiveX control using C Pin
soptest24-Jun-02 8:30
soptest24-Jun-02 8:30 
GeneralRe: Ref to ActiveX control using C Pin
JohnnyG24-Jun-02 8:59
JohnnyG24-Jun-02 8:59 
GeneralRe: Ref to ActiveX control using C Pin
soptest24-Jun-02 9:21
soptest24-Jun-02 9:21 
GeneralRe: Ref to ActiveX control using C Pin
JohnnyG30-Jun-02 14:31
JohnnyG30-Jun-02 14:31 
GeneralRe: Ref to ActiveX control using C Pin
Amit Dey1-Jul-02 6:44
Amit Dey1-Jul-02 6:44 
QuestionActiveX is "unsafe" huh? Pin
Philip Patrick22-Jun-02 6:08
professionalPhilip Patrick22-Jun-02 6:08 
AnswerRe: ActiveX is "unsafe" huh? Pin
Michael Dunn22-Jun-02 6:50
sitebuilderMichael Dunn22-Jun-02 6:50 

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.