Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Enums and parameters question
Message
From
01/11/2002 08:37:08
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
01/11/2002 08:34:39
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00717746
Message ID:
00717747
Views:
15
This message has been marked as a message which has helped to the initial question of the thread.
>Hi!
>
>I am writing a wrapper for a COM API and for the first time have come across the need to pass in parameters that have the following kind of "OR" syntax :-
>
>
>Set oArchive = oAccount.GetSpecialArchive(DvArchivePersonalIn)
>Set oItems = oArchive.GetArchiveEntries(DvFilterDefault Or DvFilterUnViewed)
>
>
>The enumerated list is shown below (shortened for brevity). How do you handle this type of thing? How do you pass "OR" values in a single parameter?
>
>Any help very much appreciated.
>
>Best
>
>
>typedef enum {
>DvFilterNone = 0,
>DvFilterError = 0x1,
>DvFilterCorrect = 0x2,
>DvFilterConclusion = 0x4,
>DvFilterAll = DvFilterError | DvFilterCorrect,
>DvFilterUnViewed = 0x40,
>DvFilterDefault = DvFilterError | DvFilterCorrect | DvFilterConclusion | DvFilterAll
>} DvItemFilterBits;
>
Adding all the values will give the same result - only because powers of two are involved.

You can also use BITOR().

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform