473,406 Members | 2,745 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Attributes to expose C# enum through COM Interop

....just like the MIDL "enum" so I have access to this thing from the host
side. Is it as simple as giving the enum a public attribute/guid?

thanks!

tima at predator dash software dot com
May 30 '07 #1
1 3964
>...just like the MIDL "enum" so I have access to this thing from the host
>side. Is it as simple as giving the enum a public attribute/guid?
Yes that should work.
Mattias

--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
May 31 '07 #2

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

Similar topics

1
by: MLM450 | last post by:
I am converting a C++ control to C#. When a C++ host app is compiled with the tlb file of my new control, it changes my public enums. Each item in the enumerator list has the enum name added as a...
2
by: Gerard Stafleu | last post by:
I have a project with the following module: Module mdlDeclarations Public Enum getMethod gmFirst gmLast End Enum End Module and the following class:
1
by: Mythran | last post by:
I have an enum such as the following: Public Enum MyEnum EnumValue1 EnumValue2 EnumValue3 End Enum I have bound, at run-time, the enumeration to a combo box. The combo box now has three...
6
by: cipher | last post by:
I have some constant values in my web service that my client application will require. Having to keep server side and client side definitions insync is tedious. I am trying to do something like...
3
by: Ant | last post by:
Hi, Im wrapping a MailMessage object & need to expose the Priority property. This property is set to a value of the 'MailPriority' enum. My question is, how do I create a member that accepts this...
15
by: Jeff Mason | last post by:
Hi, I'm having a reflection brain fog here, perhaps someone can set me on the right track. I'd like to define a custom attribute to be used in a class hierarchy. What I want to do is to...
0
by: John Smith | last post by:
What's the magical incantation to be able to expose an enum to COM? namespace NThingy { // I want to be able to access this like an old school midl enum public enum FileStatusCodes { HOLD =...
0
by: John Smith | last post by:
Is there a way to get a C# enum declared inside the class to be accessible inside the COM host? Thanks, tima at predator dash software dot com
1
by: moondaddy | last post by:
I need to use an ObjectDataProvider in a resource file to pull in the System.Window.TextAlignment enum which is part of the PresentationCore.DLL. I was able to do this with the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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
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
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...
0
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...

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.