Click here to Skip to main content
16,004,854 members
Home / Discussions / COM
   

COM

 
GeneralRe: Using SetWindowRgn in a control causes a memory leak when the control is loaded dynamically Pin
Prakash Nadar29-Feb-04 16:49
Prakash Nadar29-Feb-04 16:49 
GeneralRe: Using SetWindowRgn in a control causes a memory leak when the control is loaded dynamically Pin
Steef (Stephan Deckers)29-Feb-04 19:23
Steef (Stephan Deckers)29-Feb-04 19:23 
GeneralRe: Using SetWindowRgn in a control causes a memory leak when the control is loaded dynamically Pin
Prakash Nadar29-Feb-04 19:53
Prakash Nadar29-Feb-04 19:53 
GeneralRe: Using SetWindowRgn in a control causes a memory leak when the control is loaded dynamically Pin
Steef (Stephan Deckers)29-Feb-04 20:04
Steef (Stephan Deckers)29-Feb-04 20:04 
GeneralDifference between Com DLL and win32 DLL Pin
Balkrishna Talele27-Feb-04 17:20
Balkrishna Talele27-Feb-04 17:20 
GeneralRe: Difference between Com DLL and win32 DLL Pin
Prakash Nadar29-Feb-04 16:54
Prakash Nadar29-Feb-04 16:54 
GeneralOpen source file upload activeX control Pin
lognez27-Feb-04 4:14
lognez27-Feb-04 4:14 
GeneralHelp with VB control in VC Pin
Chris Ulliott27-Feb-04 2:55
Chris Ulliott27-Feb-04 2:55 
Hi All,

I have a VB ocx which contains 3 objects/classes. I imported them into VC6 with no problems.

In the code I need to tell the objects about each other. It goes something like this...

CMyObject1 myOb1;
CMyObject2 myOb2;
CMyObject3 myOb3;

myOb1.SetRefOb2(myOb2.m_lpDispatch);
myOb1.SetRefOb3(myOb3.m_lpDispatch);

When I run this I get a VB message box saying the object is no longer set! Also I get an OLE error in my debug output saying there is a NULL lpDispatch.

I attempted this...

HRESULT hr = CoInitialize(NULL);
CLSID clsid;
hr = CLSIDFromProgID(L"clsid.myOb2", &clsid);

myOb2.CreateDispatch(clsid);
qb.SetRefDiagramPane(&myOb2.m_lpDispatch);

CoUninitialize();

This seems to work ok but my application seriously crashes when it quits if I do this.

Any ideas how I am supposed to call these SetRef(LPDISPATCH *) functions?

Thanks,

Chris

GeneralActiveX control developement--help Pin
jithus27-Feb-04 1:26
jithus27-Feb-04 1:26 
GeneralRe: ActiveX control developement--help Pin
yhjnet30-Aug-10 16:54
yhjnet30-Aug-10 16:54 
GeneralPassing Safearray arcoss COM to C# Pin
tyyryrteytry27-Feb-04 0:01
tyyryrteytry27-Feb-04 0:01 
GeneralCreateDispatch slow Pin
dzsigit26-Feb-04 21:21
dzsigit26-Feb-04 21:21 
GeneralRe: CreateDispatch slow Pin
Heath Stewart27-Feb-04 6:23
protectorHeath Stewart27-Feb-04 6:23 
GeneralEnumerating an interface. Pin
Kagehi25-Feb-04 14:19
Kagehi25-Feb-04 14:19 
GeneralRe: Enumerating an interface. Pin
Michael Sadler25-Feb-04 15:30
Michael Sadler25-Feb-04 15:30 
GeneralRe: Enumerating an interface. Pin
Kagehi26-Feb-04 7:56
Kagehi26-Feb-04 7:56 
GeneralRe: Enumerating an interface. Pin
Kagehi26-Feb-04 9:10
Kagehi26-Feb-04 9:10 
QuestionHow to open MS Project project using automation from stream. Pin
Dime77725-Feb-04 6:20
Dime77725-Feb-04 6:20 
GeneralCopy Hook Pin
konagaya25-Feb-04 4:17
konagaya25-Feb-04 4:17 
Generalthe vaue of ESP was not properly saved across a function call Pin
hongzter24-Feb-04 15:51
hongzter24-Feb-04 15:51 
GeneralRe: the vaue of ESP was not properly saved across a function call Pin
Prakash Nadar24-Feb-04 17:06
Prakash Nadar24-Feb-04 17:06 
GeneralRe: the vaue of ESP was not properly saved across a function call Pin
hongzter24-Feb-04 20:15
hongzter24-Feb-04 20:15 
GeneralRe: the vaue of ESP was not properly saved across a function call Pin
Steve S25-Feb-04 5:57
Steve S25-Feb-04 5:57 
GeneralRe: the vaue of ESP was not properly saved across a function call Pin
hongzter26-Feb-04 14:04
hongzter26-Feb-04 14:04 
QuestionCOM Interface -> C++ wrapper utility ? Pin
vipsy24-Feb-04 3:29
vipsy24-Feb-04 3:29 

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.