Click here to Skip to main content
15,921,905 members
Home / Discussions / COM
   

COM

 
QuestionExcel's 2007 WorkbookBeforeSave Interface cancel problem Pin
nitincop18-Feb-09 0:58
nitincop18-Feb-09 0:58 
QuestionProblem with COleDispatchDriver::CreateDispatch(...). It is failing on x64 platform. Pin
sumd17-Feb-09 23:21
sumd17-Feb-09 23:21 
QuestionError - hr = 0x80040110 Class does not support aggregation (or class object is remote) Pin
pandit8416-Feb-09 17:54
pandit8416-Feb-09 17:54 
AnswerRe: Error - hr = 0x80040110 Class does not support aggregation (or class object is remote) Pin
«_Superman_»16-Feb-09 23:08
professional«_Superman_»16-Feb-09 23:08 
GeneralRe: Error - hr = 0x80040110 Class does not support aggregation (or class object is remote) Pin
pandit8416-Feb-09 23:27
pandit8416-Feb-09 23:27 
AnswerRe: Error - hr = 0x80040110 Class does not support aggregation (or class object is remote) Pin
frx9617-Feb-09 14:13
frx9617-Feb-09 14:13 
QuestionInterfacing with Excel Manager application Pin
Aladin10116-Feb-09 6:35
Aladin10116-Feb-09 6:35 
QuestionSharing variable between instances of COM object? Pin
Mike the Red16-Feb-09 1:43
Mike the Red16-Feb-09 1:43 
I need to share values between two instances of a COM object.

In most of the C++ COM examples I've read, an extern UINT g_DllLockCount is declared in stdafx.h and used to maintain a count of references to the Dll. DllCanUnloadNow() then uses this to determine if the Dll can be unloaded.

I've tried adding an extern BSTR g_bString to the stdafx.h, and modifying DllCanUnloadNow() to return S_FALSE if g_bString isn't NULL.

I've added three functions to the COM Server - one to set a string value, one to retreive the string value, and one to set the value to NULL so the Dll can unload.


In my test app, I created the COM object and gave the string a value, destroyed the COM object, created another COM object, retreived the string value, then set the string to NULL so the Dll can unload. The value retreived is the initialized value of g_bString, rather than the one I set.

My questions now, are:
(1) Is what I'm trying to do even possible with COM ?
(2) Is the method outlined above correct, and it's most likely an implementation issue, or is the method itself flawed?


Any information or suggested reading ya'll can provide would be greatly appreciated.

MZR
AnswerRe: Sharing variable between instances of COM object? Pin
frx9616-Feb-09 17:44
frx9616-Feb-09 17:44 
GeneralRe: Sharing variable between instances of COM object? Pin
Mike the Red16-Feb-09 23:17
Mike the Red16-Feb-09 23:17 
QuestionAddin a port to firewall's exception list. Pin
ShyamR15-Feb-09 23:58
ShyamR15-Feb-09 23:58 
Questioncalling COM using CreateObject ( late bind ) Pin
vineeshV15-Feb-09 23:22
vineeshV15-Feb-09 23:22 
AnswerRe: calling COM using CreateObject ( late bind ) Pin
Mike the Red16-Feb-09 3:32
Mike the Red16-Feb-09 3:32 
Question[HELP]Problems with Kodak scanner Pin
Palermo4ever15-Feb-09 22:17
Palermo4ever15-Feb-09 22:17 
QuestionHow do I un register and re register dlls in COM+ - need help Pin
Slow Learner14-Feb-09 12:15
Slow Learner14-Feb-09 12:15 
AnswerRe: How do I un register and re register dlls in COM+ - need help Pin
Slow Learner14-Feb-09 12:31
Slow Learner14-Feb-09 12:31 
GeneralRe: How do I un register and re register dlls in COM+ - need help Pin
Mike the Red16-Feb-09 3:52
Mike the Red16-Feb-09 3:52 
Questionparse object array into string.... Pin
vijay.victory11-Feb-09 20:29
vijay.victory11-Feb-09 20:29 
AnswerRe: parse object array into string.... Pin
Mike the Red16-Feb-09 6:26
Mike the Red16-Feb-09 6:26 
AnswerRe: parse object array into string.... Pin
frx9616-Feb-09 18:25
frx9616-Feb-09 18:25 
QuestionNeed help asap on serial port Pin
rj_21_200311-Feb-09 4:08
rj_21_200311-Feb-09 4:08 
AnswerRe: Need help asap on serial port Pin
Roger Stoltz11-Feb-09 22:27
Roger Stoltz11-Feb-09 22:27 
QuestionNeed some help regarding Outlook Addin Pin
wasimsharp10-Feb-09 19:10
wasimsharp10-Feb-09 19:10 
QuestionProblem with COM DLL---- Firing event in thread Pin
chetanjoshi910-Feb-09 18:34
chetanjoshi910-Feb-09 18:34 
AnswerRe: Problem with COM DLL---- Firing event in thread Pin
Roger Stoltz11-Feb-09 22:22
Roger Stoltz11-Feb-09 22:22 

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.