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

COM

 
GeneralProblems creating new objects Pin
TobiMcNamobi2-Dec-03 23:49
TobiMcNamobi2-Dec-03 23:49 
GeneralRe: Problems creating new objects Pin
TobiMcNamobi4-Dec-03 4:07
TobiMcNamobi4-Dec-03 4:07 
GeneralReading configuration information from a COM+ application Pin
Ivan Fernandez2-Dec-03 7:03
Ivan Fernandez2-Dec-03 7:03 
Questioncan wmi-client access the remote wmi on a machine outside of lan network? Pin
Habbit1-Dec-03 21:43
Habbit1-Dec-03 21:43 
GeneralCatching Outlook events Pin
derzellner1-Dec-03 20:02
derzellner1-Dec-03 20:02 
GeneralUse connection point in Dll. The process that load the Dll can not quit completely. Pin
chengliang1-Dec-03 19:35
chengliang1-Dec-03 19:35 
GeneralRe: Use connection point in Dll. The process that load the Dll can not quit completely. Pin
Heath Stewart4-Dec-03 10:46
protectorHeath Stewart4-Dec-03 10:46 
GeneralRe: Use connection point in Dll. The process that load the Dll can not quit completely. Pin
chengliang7-Dec-03 15:20
chengliang7-Dec-03 15:20 
Maybe you are right.
But the problem is that I have called Release on all interfaces used.
And you know, the process runs ok when it use connection point directly
but not in Dll.
But when use connection point in Dll, problem occurs.

I can tell you the details.
class CFriendSession is in Dll.
In constructor of CFriendSession I use:
---------------------------------------------------------------------------
OleInitialize( NULL );
COleException *e = new COleException;

try
{
HRESULT hr = m_ISession.CreateDispatch(CLSID_JabberSession, e);
ASSERT(SUCCEEDED(hr));
}
catch( COleDispatchException * e )
{
e->Delete();
}

//Get a pointer to sinks IUnknown, no AddRef.
m_session_sink = GetIDispatch(FALSE);

BOOL bRet = AfxConnectionAdvise(m_ISession,IID_ISessionEvents, m_session_sink, FALSE,&m_session_cookie);

e->Delete();
-------------------------------------------------------------------
in the destructor of CFriendSession, I use:
------------------------------------------------------------------
BOOL bRet = AfxConnectionUnadvise(m_ISession, IID_ISessionEvents, m_session_sink, FALSE, m_session_cookie);
m_ISession.ReleaseDispatch();
------------------------------------------------------------------

I found when I call m_ISession.CreateDispatch, the problem will occure.
But I do call m_ISession.ReleaseDispatch() in destructor of CFriendSession.

So, I couldn't find which interface I did not release.

I want to know your opinion.
Also, thanks for your kind help.
GeneralRe: Use connection point in Dll. The process that load the Dll can not quit completely. Pin
Heath Stewart8-Dec-03 2:21
protectorHeath Stewart8-Dec-03 2:21 
Generalneed the header file for wsnprintf() signature Pin
derik_konark29-Nov-03 23:56
derik_konark29-Nov-03 23:56 
GeneralRe: need the header file for wsnprintf() signature Pin
Roger Stewart9-Dec-03 9:01
professionalRoger Stewart9-Dec-03 9:01 
GeneralType of Control Pane Pin
Danis Solovyov27-Nov-03 22:33
sussDanis Solovyov27-Nov-03 22:33 
GeneralDrag & Drop Pin
K-ballo27-Nov-03 15:43
K-ballo27-Nov-03 15:43 
GeneralRe: Drag & Drop Pin
Prakash Nadar27-Nov-03 16:09
Prakash Nadar27-Nov-03 16:09 
GeneralVB COM problem Pin
andyhk9527-Nov-03 15:03
andyhk9527-Nov-03 15:03 
GeneralRe: VB COM problem Pin
Brian Shifrin1-Dec-03 7:07
Brian Shifrin1-Dec-03 7:07 
GeneralRe: VB COM problem Pin
andyhk951-Dec-03 13:39
andyhk951-Dec-03 13:39 
GeneralTOM (Text Object Model) Pin
Andre123427-Nov-03 6:00
Andre123427-Nov-03 6:00 
GeneralThread/ COM Connection point Pin
benglish7225-Nov-03 17:49
benglish7225-Nov-03 17:49 
GeneralProblem solved, thanks! Pin
benglish7225-Nov-03 18:35
benglish7225-Nov-03 18:35 
GeneralProblem with Custom COM object in implementation of Interface Pin
bryces25-Nov-03 16:08
bryces25-Nov-03 16:08 
Generalworking with New Enum... Pin
rajdawg25-Nov-03 15:09
rajdawg25-Nov-03 15:09 
Generalconstants in IDL file Pin
srikanthos25-Nov-03 1:23
srikanthos25-Nov-03 1:23 
GeneralCEdit in COM Pin
Tomaz Rotovnik24-Nov-03 20:48
Tomaz Rotovnik24-Nov-03 20:48 
GeneralRe: CEdit in COM Pin
Tomaz Rotovnik24-Nov-03 21:02
Tomaz Rotovnik24-Nov-03 21:02 

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.