How to pass true or false to COM objects?
Syver Enstad
syver-en+usenet at online.no
Tue Aug 20 06:07:27 EDT 2002
"Matt Gerrans" <mgerrans at mindspring.com> writes:
> > Still not sure what to do about that new boolean builtin "Maybe" ;)
>
> Just yesterday, listening to an interview on NPR, I heard the phrase
> "That's
>
> *very* true" so many times I began to doubt the validity of boolean
> types
>
> only having just two possible values.
Microsoft has already been using this for many years just look at the
win32 api GetMessage function.
BOOL GetMessage(
LPMSG lpMsg, // message information
HWND hWnd, // handle to window
UINT wMsgFilterMin, // first message
UINT wMsgFilterMax // last message
);
Seems like it's a boolean return no?
Looking at the documentation reveals that it can return True, (non
zero) False, (zero), but in the case of a failure it returns
-1. Aargh, so maybe Maybe should be defined as -1 ;-)
--
Vennlig hilsen
Syver Enstad
More information about the Python-list
mailing list