Jump to content
Software FX Community

Enumerated Types defined in the Type Library


User (Legacy)
 Share

Recommended Posts

Hello,

I have a problem with the actual way the type library is written. In VB an

enumerated type is basically treated as a number of constants, and hence

those can be used as bit fields. But a proper enumerated type can't do

this - it can only take on one of the specified values. Now, since our

application uses "real" enumerated types, we have a severe problem with the

type library. It specifies all the enumerated types nicely, and in some

cases (like the gallery) it works as I expect it. But other enumerated types

are purely used as bit fields, making it hard to use them with our

enumerated type implementation. This is because the API returns values for

enumerated types that are not specified in the type itself. Since COM is

treating is as integeres, COM does not have a problem. Since VB treates all

those as global constants, VB does not have a problem. VC++ even does not

bother to generate enumerated types - it simply uses integers (even worse,

if you ask me...).

What I am really asking for is a proper defined type library, that has

enumerated types defined that contain all possible values for this type (and

in case of bit fields ALL possible combinations that can be returned by the

API). I could start and do this by hand, but I fear this could take rather

long. Is there any possibility that you can change that or somehow make sure

that the API only returns values that are defined in the enumeated types??

Thanks a lot in advance

Stephan Klaffer

DecisionWorks London

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...