473,546 Members | 2,249 Online
Bytes | Software Development & Data Engineering Community
+ 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 1257
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************* *@exisconsultin g.com

"George A. Losenkov" <lo******@backs on.com> wrote in message
news:eq******** ******@TK2MSFTN GP09.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******@backs on.com> wrote in message
news:eq******** ******@TK2MSFTN GP09.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
2343
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' Application. ----------------------------------------------------------- --------------------- Configuration Error Description: An error occurred during...
0
1549
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. ----------------------------------------------------------- --------------------- Configuration Error Description: An error occurred during the processing of a configuration file...
0
2264
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 about the global assembly cache (GAC) and primary interop assemblies (PIA) and so forth, and did all the recommendations, in terms of tweeking Office,...
0
2770
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 interop-filenames to be interop.<NameOfCOMDLL>.dll I now make the first interop file tlbimp COM1.dll /out:interop.COM1.dll /namespace:COM1
1
1987
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, this layer manage the underlying COM Objects and upon request, provide a pointer to those objects to the 'API Consumer', following is an illustration of...
8
3402
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 added. Converting the type library to a .Net assembly failed. A depended type library 'CDO' could not be converted to a .NET assembly. A dependent...
7
10942
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 this screen below. Please help, thanks in advance... Configuration Error Description: An error occurred during the processing of a configuration...
2
7278
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 "Array index out of bounds". Microsoft.Office.Interop.Outlook._Application olApp = new Microsoft.Office.Interop.Outlook.ApplicationClass();...
1
2847
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 and server (Exchange server mail box) to connect and then save the mailitems(from Inbox or any other folder) based on a filter to a*.msg file. I...
0
2043
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 fine. Help! T Server Error in '/VT.Users' Application. -------------------------------------------------------------------------------- ...
0
7504
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7435
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7792
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6026
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5360
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5080
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3470
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1921
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 we have to send another system
0
747
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.