Click here to Skip to main content
15,910,878 members
Home / Discussions / COM
   

COM

 
GeneralRe: Two questions on COM Add-in for Outlook Pin
OctopusThu6-Nov-06 20:16
OctopusThu6-Nov-06 20:16 
GeneralRe: Two questions on COM Add-in for Outlook Pin
prasad_som6-Nov-06 20:21
prasad_som6-Nov-06 20:21 
AnswerRe: Two questions on COM Add-in for Outlook Pin
OctopusThu8-Nov-06 17:41
OctopusThu8-Nov-06 17:41 
QuestionHelp! About COM,(the server of the EXE) Pin
kcynic5-Nov-06 12:27
kcynic5-Nov-06 12:27 
AnswerRe: Help! About COM,(the server of the EXE) Pin
Jonathan [Darka]8-Nov-06 0:35
professionalJonathan [Darka]8-Nov-06 0:35 
QuestionASP.NET Ajax Page Caching Pin
K.P.Kannan4-Nov-06 14:25
K.P.Kannan4-Nov-06 14:25 
QuestionMy COM method call is killing my App Pin
earlgraham2-Nov-06 7:03
earlgraham2-Nov-06 7:03 
AnswerRe: My COM method call is killing my App Pin
Stephen Hewitt5-Nov-06 14:02
Stephen Hewitt5-Nov-06 14:02 
The following is a serious error:
BSTR image = L"no image";

A BSTR is not just a wide string. First it's prefixed with a length and the length is ***BEFORE*** the position the pointer points. Secondly a specific allocator is assumed. To fix this error make the following change:
BSTR image = SysAllocString(L"no image");

You also should add a call to SysFreeString to free the string when it's no longer needed. An understanding of BSTRs is essential if you're going to use COM in C/C++ without any wrappers (and probably even if you are).

The calls to CoInitialize and CoUninitialize also worry me. Although this need not be a mistake (I'd have to see more code) the normal pattern is to initialise COM once when the app starts and uninitialise it once when the app exits. You should not uninitialise COM while COM objects still exist -- that's what it look like you may be doing.

Steve

GeneralRe: My COM method call is killing my App Pin
earlgraham9-Nov-06 4:41
earlgraham9-Nov-06 4:41 
QuestionAccessing a C# control from C++ Pin
Metabug30-Oct-06 9:29
Metabug30-Oct-06 9:29 
Questionhow to access a COM component from ASP.net? Pin
voorugonda prashanth29-Oct-06 23:18
voorugonda prashanth29-Oct-06 23:18 
GeneralRe: how to access a COM component from ASP.net? Pin
prasad_som7-Nov-06 18:35
prasad_som7-Nov-06 18:35 
QuestionWhy the Release() don't call the class destructor? Pin
AIMrus28-Oct-06 23:56
AIMrus28-Oct-06 23:56 
QuestionHelp! My COM add-in for outlook can run only once, why? Pin
OctopusThu28-Oct-06 19:05
OctopusThu28-Oct-06 19:05 
AnswerRe: Help! My COM add-in for outlook can run only once, why? Pin
OctopusThu31-Oct-06 18:16
OctopusThu31-Oct-06 18:16 
QuestionMemory Allocation of COM Objects Pin
Killer326-Oct-06 18:31
Killer326-Oct-06 18:31 
AnswerRe: Memory Allocation of COM Objects Pin
Mike Dimmick27-Oct-06 3:47
Mike Dimmick27-Oct-06 3:47 
QuestionAutomatic instantiation of remote COM from other operating systems Pin
Raphael Amorim26-Oct-06 7:14
professionalRaphael Amorim26-Oct-06 7:14 
AnswerRe: Automatic instantiation of remote COM from other operating systems Pin
iserik6-Nov-06 5:42
iserik6-Nov-06 5:42 
GeneralRe: Automatic instantiation of remote COM from other operating systems Pin
Raphael Amorim17-Nov-06 6:10
professionalRaphael Amorim17-Nov-06 6:10 
Questionprogamatically call WindowActivate event Pin
K edar V25-Oct-06 21:57
K edar V25-Oct-06 21:57 
QuestionCreateInstance failed in Windows service Pin
hybride25-Oct-06 19:32
hybride25-Oct-06 19:32 
AnswerRe: CreateInstance failed in Windows service Pin
Jonathan [Darka]26-Oct-06 4:25
professionalJonathan [Darka]26-Oct-06 4:25 
GeneralRe: CreateInstance failed in Windows service Pin
hybride27-Oct-06 1:08
hybride27-Oct-06 1:08 
GeneralRe: CreateInstance failed in Windows service Pin
Jonathan [Darka]27-Oct-06 3:24
professionalJonathan [Darka]27-Oct-06 3:24 

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.