473,480 Members | 2,024 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Bug in COM Interop

Hi everybody.

I try to create COM server. I have interface
interface Font
{
...
object Color { get; set; }
...
}
I expect that i will see
interface Font : IDispatch {
....
[id(0x60020004), propget]
HRESULT Color([out, retval] VARIANT* pRetVal);
[id(0x60020004), propput]
HRESULT Color([in] VARIANT pRetVal);
....
}
But when I open autogenerated type liblary in OLE/COM Object Viewer I see
following
interface Font : IDispatch {
....
[id(0x60020004), propget]
HRESULT Color([out, retval] VARIANT* pRetVal);
[id(0x60020004), propputref]
HRESULT Color([in] VARIANT pRetVal);
....
};
Does anybody know why?
Nov 15 '05 #1
2 1256
George,

This definitely seems like a bug. I tested it out on my machine (along
with some different interop attributes) and I couldn't work around it. I
would report it to MS (I will do so as well).

In the meantime, I would recommend that you define this interface in IDL
and then import it into your assembly.

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- ni**************@exisconsulting.com

"George A. Losenkov" <lo******@backson.com> wrote in message
news:eq**************@TK2MSFTNGP09.phx.gbl...
Hi everybody.

I try to create COM server. I have interface
interface Font
{
...
object Color { get; set; }
...
}
I expect that i will see
interface Font : IDispatch {
...
[id(0x60020004), propget]
HRESULT Color([out, retval] VARIANT* pRetVal);
[id(0x60020004), propput]
HRESULT Color([in] VARIANT pRetVal);
...
}
But when I open autogenerated type liblary in OLE/COM Object Viewer I see
following
interface Font : IDispatch {
...
[id(0x60020004), propget]
HRESULT Color([out, retval] VARIANT* pRetVal);
[id(0x60020004), propputref]
HRESULT Color([in] VARIANT pRetVal);
...
};
Does anybody know why?

Nov 15 '05 #2
Why is this a bug, your property is of type object, I think propputref
instead of propput is right here?

--

"George A. Losenkov" <lo******@backson.com> wrote in message
news:eq**************@TK2MSFTNGP09.phx.gbl...
Hi everybody.

I try to create COM server. I have interface
interface Font
{
...
object Color { get; set; }
...
}
I expect that i will see
interface Font : IDispatch {
...
[id(0x60020004), propget]
HRESULT Color([out, retval] VARIANT* pRetVal);
[id(0x60020004), propput]
HRESULT Color([in] VARIANT pRetVal);
...
}
But when I open autogenerated type liblary in OLE/COM Object Viewer I see
following
interface Font : IDispatch {
...
[id(0x60020004), propget]
HRESULT Color([out, retval] VARIANT* pRetVal);
[id(0x60020004), propputref]
HRESULT Color([in] VARIANT pRetVal);
...
};
Does anybody know why?

Nov 15 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2321
by: roy | last post by:
I try to call com written in VB 6.0. When I use VS.net Studio to do the debuging, some time it works fine, some time I got the following message: Server Error in '/GISOnlineReservation'...
0
1538
by: roy | last post by:
I try to call com written in VB 6.0., some time it works fine, some time I got the following message: Server Error in '/GISOnlineReservation' Application....
0
2247
by: keefah | last post by:
Hi, I'm writing a C# web app that uses Outlook to send email. I use a reference to the Microsoft Outlook 11.0 Object Library, but it's giving me problems. I tracked down some stuff on the Net...
0
2755
by: lacour | last post by:
I can't seem to figure out the difference between adding a COM dll reference in VS2003 and by using TLBIMP. I have a COM dll that references another COM dll, and I want the syntax of my...
1
1981
by: Nadav | last post by:
Hi, Introduction *************** I have a system build of a collection of 'Native COM objects' and '.NET COM interop' objects, all of the COM objects are managed through a 'Native COM' layer,...
8
3394
by: Rob Edwards | last post by:
When trying to add the Microsoft CDO for Exchange Management Library (aka CDOEXM.dll) I receive the following message: "A reference to 'Microsoft CDO for Exchange Management Library' could not be...
7
10936
by: R Reyes | last post by:
Can someone please explain to me why I can't get the MS Word Interop assembly to work in my VS2005 project? I'm trying to manipulate MS Word from my Web Form application and I can't get passed...
2
7256
by: JC | last post by:
Anybody knows what problem has this code? I think, in the Garbage Collector? You know the Solution? The program in the test's case, whit 350 contacts, run OK before number 86. The error is a...
1
2833
by: allbelonging | last post by:
C#.Net Outlook 2003 automation (programmatically) with Office.Interop.Outlook Problem: I have my outlook 2003 configured with multiple mailbox on my local machine. I want to specify the mailbox...
0
2029
by: Tina | last post by:
I've gotten this before where it says there is a problem with Interop.MSDASC but I can't remember what causes this. This is a 1.1 app I'm trying to debug in vs2005. It was running yesterday just...
0
6920
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7060
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7106
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6760
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
4501
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3013
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1311
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
572
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
206
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.