|
-
September 3rd, 2009, 04:42 AM
#1
ActiveX - bitmask field imported as enum
Hi
I'm trying to use an ActiveX component in my MFC app. The problem is one field is being imported incorrectly.
Following line works in C# (bitmask)
client.Connection = ConnectionConstants.client | ConnectionConstants.service;`
In C++ the field is imported as an enum. It won't let me use the bitwise expression. How can I get around it?
Is there an easier way than compiling the IDL? I get some error about single not being a recognized type.
Thanks
-
September 3rd, 2009, 04:50 AM
#2
Re: ActiveX - bitmask field imported as enum
In C++ the field is imported as an enum.
A enum is a number and a bitmask is a number... don't really understand your problem.
-
September 3rd, 2009, 05:55 AM
#3
Re: ActiveX - bitmask field imported as enum
The cast worked. I didn't actually try it. I'm sure I read somewhere it was possible to convert from enum to int but not from int to enum.
Thanks for the response.
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
|