473,765 Members | 2,012 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

using C defined enum in c++

1 New Member
Hi,

I'm running into a very annoying issue when trying to use an enum defined in a C header file within a Managed C++ application.

Within the 'C' header file, there is an enum defined as

typedef enum _tagLiffeSystem Mode
{
LIFFE_SYSTEM_MO DE_UNDEFINED = LIFFE_CONSTANT_ RANGE__SYSTEM_M ODE
,LIFFE_SESSION_ START
,LIFFE_SESSION_ CLOSED
,LIFFE_SESSION_ END
,LIFFE_SYSTEM_M ODE_EXCLUSIVE_R ANGE_LIMIT
} LiffeSystemMode ;

Within my managed C++ code, i have the following

LiffeSystemMode peSystemMode = LIFFE_SYSTEM_MO DE_UNDEFINED;

Whenever I'm running the app and do a watch on the value of peSystemMode, it comes back as <undefined>. It doesn't matter which enum value i assign it, it always says <undefined>.

Is there something i need to add to the header file in order to be able to use the enums within a managed C++ app?

This is driving me insane. I definitely appreciate any help.

-mike
May 5 '06 #1
0 2548

Sign in to post your reply or Sign up for a free account.

Similar topics

9
3135
by: AngleWyrm | last post by:
"The C++ Programming Language" by Bjarne Stroustrup, copyright 1997 by AT&T, section 4.8 (pp 77): "A value of integral type may be explicitly converted to an enumeration type. The result of such a conversion is undefined unless the value is within the range of the enumeration. For example: enum flag { x=1, y=2, z=4, e=8 }; // range 0:15 flag f1 = 5; // type error: 5 is not of type flag flag f2 = flag(5); // ok: flag(5) is of type flag and...
11
6600
by: Grasshopper | last post by:
Hi, I am automating Access reports to PDF using PDF Writer 6.0. I've created a DTS package to run the reports and schedule a job to run this DTS package. If I PC Anywhere into the server on where the job is running, the job runs sucessfully, PDF files got generated, everything is good. If I scheduled the job to run at the time that I am not logged into the server, Access is not able to print to the printer. The error is pretty...
1
2760
by: Xiangliang Meng | last post by:
Hi, all. Recently, I find there is a way in our project to maintain a global set in many files by using preprocessing directives. I'm wondering if we could find a better method for this. Many colors are referred in different subsystems in our projects. They are defined as enumeration constants and a single color must be the same value all across our projects.
8
1719
by: Joe | last post by:
I have a .cs file which is linked to several other projects. All my classes in this file are defined as internal. I would like to have an enum defined as well in the namespace but I get an error from one project that the accessibility of the enum is less (public) than that of a method which returns that's type. What is the best way to define this enum without getting duplicate define warnings or this error of less accessibility? ...
2
3497
by: Gos | last post by:
Hi, I have an enum type as defined below. The enum constants are some of the properties for a windows form control. I want to store the settings for that control into a file. In order to access the value of the properties (for example toolbar.Size or Toolbar.Name) I used a for loop. In my for loop, I want to do something like toolbar.(Prop.GetName)(which is equal to toolbar.Size and returns the value into the string)
10
5044
by: Rick Palmer | last post by:
I have an app I'm working on that will allow a user to run one of 5 reports. The report names are in a combobox on my form. I have a sub defined for each report that has the exact same name as is displayed in the combobox. I have one button on the form to start processing. What I want to do is this: When the user selects the report they want to run from the combobox, I want to dynamically bind the appropriate sub to the button's click...
27
1923
by: Randy | last post by:
Is there a way to override operators for user-defined types (e.g., typedefs) rather than class types? I'm trying to override the extractor operator for a user-defined enumeration type but getting no joy. For example, typedef enum {SUN,MON,TUES,WED,THURS,FRI,SAT} WEEK; istream& operator>> (istream& is, WEEK& x) {
6
9834
by: fcvcnet | last post by:
Hi all, I defined a class, as fellows: // Segment.h #pragma once #include "MyPoint.h" enum TLSC {PARALLEL, INTERSECT, COINSIDE,INTERSECTATDIASTOLE} twolinesolutioncases;
4
1803
by: Travis | last post by:
So I have been doing C++ for quite awhile but have never had too many occasions to use |. What I'm trying to provide is ability to say enum myEnum = myEnum::one | myEnum::two. I'm not sure if this makes sense so I'll use my actual situation as an example. I am doing a menu system where each button the screen has an access
0
9399
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10007
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9833
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7378
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5275
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5421
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3924
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
2
3531
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2806
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.