|
I recently ran into a problem with a COM object that was using a singleton class factory and had members that were pointers to other COM objects implemented in a different dll than the singleton object. These other COM objects were created by the singleton...
Started by Will Gorman on
, 5 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
When the singleton ....
If a COM object hasn't been released, then the DLL in which information.
If you have a pointer (also known as 'hold a reference') to a COM object, then that COM object shouldn't disappear until you release it.
|
|
I want to expose a .NET class to COM. That's fairly easy:
I create an interface in where I define the members of that class that should be ComVisible I define the DispId's of those members myself I define that the interface should be ComVisible I assign...
Started by Frederik Gheysels on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
This is....
The way I see it, an interface represents a collection for already-implemented functions .
This is not unique to COM interfaces implemented by .NET, but all COM interfaces.
Events have always been defined on a separate interface.
|
|
Hello, I would like to pass a COM method as a function argument but I get this error (Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.30729.01 for 80x86):
error C3867: 'IDispatch::GetTypeInfoCount': function call missing argument list; use...
Started by uvts_cvs on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
The syntax for dealing....
Change the type of pointer expected to a member function pointer.
You have a member the function that you want to pass to being static.
Your method expects a pointer to a function.
Looks like a straight c++ problem.
|
Ask your Facebook Friends
|
Hi,
I'm writing C# code that needs to connect to COM events. I implemented the use of IConnectionPointContainer and IConnectionPoint thus:
IConnectionPointContainer connectionPointContainer = internalGenerator as IConnectionPointContainer; if (connectionPointContainer...
Started by Inbar Shani on
, 6 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Try calling Marshal.GetComInterfaceForObject on the .NET object to get....
IConnectionPointContainer is implemented on the CCW (COM callable wrapper) that .NET automatically generates when exposing your .NET object as a COM object externally.
|
|
What is the best way to do a .NET COM DLL Deployment, I'm having problems using it in the client machine. The COM is being used in a VB6 app.I can add a reference, but when I try to use create objects it gives me an Automation Error.
Thanks in advance...
Started by Alonso on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
If I recall some other key points
you could not have a parameterized constructor no static or shared members little to no inheritance (dont use shadowed....
Heres another link that may help with some of the limitations .
To generate a COM proxy.
|
|
How to create a method in COM that returns a pointer to an interface, this needs to be done inside the IDL file.
EDIT:
How do I implement this within a class:
STDMETHODIMP CBlah::get_Something(IOtherBlah** retval){ return m_protectedvar->QueryInterface...
Started by Phill Pafford on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Something like this:
interface IYourInterface { HRESULT GetPointer( [out, retval]IInterface** ); };
The caller will call it like this:
IInterface* pointer = 0; HRESULT hr = yourInterfacePointer->GetPointer( &pointer );
[ attributes here...] interface... .
|
|
I'm using an extensive existing COM API (could be Outlook, but it's not) in .NET (C#). I've done this by adding a "COM Reference" in Visual Studio so all the "magic" is done behind the scenes (i.e., I don't have to manually run tlbimp ).
While the COM...
Started by Dan on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
You don't need to do anything funky to manage them...just use them like that you only really need a part... .
As nobugz said to your actual com objects.
It sounds like you are looking to create a simpler .NET API around your complex COM API.
|
|
Using: VS2008, C#
I have a COM dll I need to use in a .NET project. In there I have a class with a method that returns an IDictionary object. IDictionary is defined in the COM dll so I'm not sure if it's the same as IDictionary in .NET.
My problem: I ...
Started by mattRo55 on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Var obj = oDictConfig[key];
Try this:
dicObject["myKey"]
It looks like you are using the IDictionary COM interface.
IDictionary has an Item property among its members that you access via [ ].
|
|
Background The application I am working with has several COM DLLs.
One of the COM DLLs has a global singleton object, which stores pointers to COM interfaces in other DLLs. Because it is a global singleton object, I have employed the lazy initialization...
Started by LeopardSkinPillBoxHat on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
All you also destroyed after COM uninitialization....
And Release() members of CComPtr to see what happens during and after the call to GetMyOtherObject put their COM objects into the table, and the other DLLs can retreive them when needed.
|
|
I have a .net assembly which I am exposing to com.
the assembly has two public interfaces and one public class.
When I build the assembly I get this warning.
"(assemblyName.dll) does not contain any types that can be registered for COM Interop."
My assembly...
Started by Daniel on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
Thus only classes that are explicitly marked with ComVisible(true) are exposed to COM("...") ] public interface IMyComVisibleType....
You don't) at assembly-level.
Its members should typically also reference only ComVisible types.
Default constructor.
|