|
-
April 7th, 1999, 07:25 AM
#1
Urjent... Unknown union member causes Unhandled exception...Help..
Hi all,
In my application I have a structure like this.
typedef struct
{
DWORD msgType;
PARAMS params;
}MSGQ;
typedef union //params
{
NEGOTIATE negotiate;
CLOSELINE lineClose;
LINEOPEN lineOpen;
.
.
//etc
} PARAMS;
typedef struct
{
DWORD lineAddrID;
int retVal;
int FSMState;
}LINEOPEN, CLOSELINE, NEGOTIATE;
But when I create an objec of my structure MSGQ
MSGQ msg;
while the debugger(VC++5.0) runs, I put a breakpoint and found the value of msg.params.lineOpen .... Surprisingly the member of the union name was shown as "lineOpenA" instead of "lineOpen".
and when the application exits it gives Unhandled exeption.
All other members of union PARAMS are displayed correctly in the watch window, except the member "lineOpen".
Can anybody tell me a way out.
thanks in advance.
bsmanoj
-
April 7th, 1999, 08:37 AM
#2
Re: Urjent... Unknown union member causes Unhandled exception...Help..
It looks as if you have a name clash. lineOpen is defined in Tapi.h as lineOpenA:
Include\TAPI.H(3319):#define lineOpen lineOpenA
Either change your naming convention, or put your names in your own namespace. Using your own namespace will ensure these name conflict problems do not arise.
Dave
-
April 7th, 1999, 09:05 AM
#3
Re: Urjent... Unknown union member causes Unhandled exception...Help..
Dear Dave,
Thanks a lot.
bsmanoj.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|