473,398 Members | 2,335 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,398 software developers and data experts.

Enum items getting unwanted prefix

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 prefix. For
example:

My C# code has this...
public enum SIZE_OPTIONS
{
szZoom = -1,
szFitWindow,
szFitWidth,
szFitHeight,
szActual
}

TLH has this...
SIZE_OPTIONS
{
SIZE_OPTIONS_szZoom = -1,
SIZE_OPTIONS_szFitWindow = 0,
SIZE_OPTIONS_szFitWidth = 1,
SIZE_OPTIONS_szFitHeight = 2,
SIZE_OPTIONS_szActual = 3
};

Does anyone know how to turn this off - hopefully on the C# side.

Thanks,
Mike

Nov 17 '05 #1
1 1952
Interop questions are best answered in the following group:

microsoft.public.dotnet.framework.interop

check out the following link on primary interop assemblies, look at the
heading 'How can I customize my PIA?' - this gives you hints on how to
achieve what you want

http://msdn.microsoft.com/library/de...priinterop.asp
<ML****@hotmail.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
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 prefix. For
example:

My C# code has this...
public enum SIZE_OPTIONS
{
szZoom = -1,
szFitWindow,
szFitWidth,
szFitHeight,
szActual
}

TLH has this...
SIZE_OPTIONS
{
SIZE_OPTIONS_szZoom = -1,
SIZE_OPTIONS_szFitWindow = 0,
SIZE_OPTIONS_szFitWidth = 1,
SIZE_OPTIONS_szFitHeight = 2,
SIZE_OPTIONS_szActual = 3
};

Does anyone know how to turn this off - hopefully on the C# side.

Thanks,
Mike

Nov 17 '05 #2

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

Similar topics

0
by: Doug Farrell | last post by:
Hi everyone, I'm trying to build a program to interface to a SOAP/XML interface provided by one of our vendors. This interface is built with MS SOAP Toolkit 3.0, so I'm guessig they are running...
2
by: Rene | last post by:
Say that I create a combobox with pull down items that map directly to an enum. For example the dropdown items could be "Up", "Down", "Left" and "Right" and the enum could be declare as: public...
34
by: Steven Nagy | last post by:
So I was needing some extra power from my enums and implemented the typesafe enum pattern. And it got me to thinking... why should I EVER use standard enums? There's now a nice little code...
1
by: Paul J. Lucas | last post by:
I have code that builds a DOM using the Java org.w3c.dom API and it adds an extra attribute to one of the elements that I don't want. Not only that, the value it adds is wrong. The code to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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
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
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...
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...

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.