|
Which one should I use?
catch (_com_error e)
or
catch (_com_error& e)
Started by Corey Trager on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
For the third option:
catch (const _com_error& e).
|
|
The simplest way to transform an in-proc COM server into an out-proc COM server is creating a COM+ application. What are the possible drawbacks of doing it this way?
Started by sharptooth on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
For example, hosting a COM server container or use a 3rd....
The COM+ Server for an out-of-proc COM server? What advantages do these other hosting options provide is in the administrative model and capability, and in the flexibility.
|
|
I am bit unclear in using IUnknown interface .Is IUnknown interface only meant to work with COM /COM + Objects and some unmanaged codes like Win APIs ?
Answer Snippets (Read the full thread at stackoverflow):
COM interfaces are used primarily it as COM interfaces:
....
Its not used natively by .NET languages such as C# .
IUnknown is a COM/COM+ interface.
You should use IUnknown only for COM.
In context of C# and .NET - yes.
|
Ask your Facebook Friends
|
I am trying to write a wrapper around a legacy COM object and install the wrapper into the GAC. The goal would be to automate the setup of specific configuration information the component requires, and make a common strongly typed interface for all of...
Started by Matt Murrell on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Once you've created an object from the respective COM server, its DLL must have been.
Then you can look up the appropriate DLL path in the registry .
To the CLSID and IID values of your COM DLL.
|
|
We have a COM object implemented with C++/ATL that includes a method which will return a DIB. We are also writing a .NET application that will use this COM object. Since we are writing both, we have the liberty of deciding how best to return this DIB ...
Started by Karim on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
This....
You can get it to build one to the calling program .
COM provides an implementation of these interfaces for you.
COM/OLE has a standard IPictureDisp ).
The idea is that the DIB is represented using a IntPtr .
From a DIB to a Bitmap.
|
|
A bit of an odd question and probably backwards from what most people want to do, but I'm trying to work around a legacy COM issue.
I have two components, both of which are actually .NET assemblies, but for historical reasons one is loading the other ...
Started by Tim Long on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
How exactly, you're using the one .Net assembly within the other, via COM? That's my very problem- VS.
|
|
So I have a registration free VB6 DLL referenced by my .NET 3.5 assembly library that's ultimately referenced by a .NET 3.5 WinForms application (not sure it's relevant, but included to paint a picture).
I am getting the error 'Problem isolating COM reference...
Started by Wil P on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
As private VB6 COM classes do not register a value for Inproc32 and the assembly manifest generated.
|
|
Greets,
When working with DirectX, you get this nice header to #include called DxErr9.h which has really helpful functions like:
DXGetErrorString9
and
DXGetErrorDescription9
They tell you everything you need to know about the error given the HR.
But now...
Started by bobobobo on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Use _com_error to get a meaningful string:
#include <comdef.h> HRESULT hr = SomeComFunc(); if ( FAILED(hr) ) { _com_error err(hr); LPTCSTR szErrMsg = err.ErrorMessage(); // log szErrMsg or whatever }
Additionally, you should look ....
|
|
I am relatively new to development within COM, and I was wondering what the community standard was for access of COM object properties. I have seen both of the following conventions in code:
comObjectPtr->PutValue(value);
and
comObjectPtr->Value...
Started by Oliver N. on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
You're talking about the smart wrapper classes created with #import, right?
PutValue() is more explicit as to what you're doing; "Value = " is easier to use but it can have "hidden" side-effects if the put function does something other than a straight... .
|
|
I have rephrased this question.
When .net objects are exposed to COM Clients through COM iterop, a CCW ( COM Callable Wrapper ) is created, this sits between the COM Client and the Managed .net object.
In the COM world, objects keep a count of the number...
Started by Binary Worrier on
, 9 posts
by 9 people.
Answer Snippets (Read the full thread at stackoverflow):
I created a simple COM .NET Class called Calculator Implements IDisposable....
Actually use "Windows Script Components" to wrap your .NET COM objects and get finalization that way Host which is available on every major WIN32/WIN64 platform.
|