WINBOOL not documented?

New to FreeBASIC? Post your questions here.
Post Reply
lucidapogee
Posts: 19
Joined: Mar 06, 2023 2:07
Location: Arizona
Contact:

WINBOOL not documented?

Post by lucidapogee »

I have searched the manual and searched the forums.

"Search results: No matches for winbool"

So far, I'm only able to infer is that it's not available in lang qb with __ prefix.

I am also not finding a page for "#define."

I wrote #define qbwinb winbool and it compiles, but isn't working.
I also wrote #define qbwinb __winbool. Also not working.

I looked in pp.bas and see that winbool is defined as a long type. I don't see there the where attributes are defined.
caseih
Posts: 2157
Joined: Feb 26, 2007 5:32

Re: WINBOOL not documented?

Post by caseih »

WINBOOL is a type definition (typedef) that's part of the win32 API. I imagine it's in a .bi file somewhere, and may be implicitly available in FB generally on Windows. It's not part of the FB language per se, so I wouldn't expect to find it in the language wiki, no.
lucidapogee wrote: Apr 07, 2023 17:20I wrote #define qbwinb winbool and it compiles, but isn't working.
All #define does is replace one word with another word. So everwhere in your code where the word "qbwinb" occurs, the macro processor replaces it with "winbool"

I see the typedef is in two .bi files: winnt.bi and ntdef.bi. And these type definitions are used all throughout the Win32 API it seems.
Last edited by caseih on Apr 08, 2023 2:01, edited 1 time in total.
caseih
Posts: 2157
Joined: Feb 26, 2007 5:32

Re: WINBOOL not documented?

Post by caseih »

By the way here is the wiki page for #define:
https://www.freebasic.net/wiki/KeyPgPpdefine

All the pre-processor keywords are in the wiki under the "preprocessor" section.

Although in this case winbool is not a #define, but a type definition (typedef).
dodicat
Posts: 7976
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: WINBOOL not documented?

Post by dodicat »

Call this file something like zzwinstuff.bas and compile it.

Code: Select all

#cmdline "-pp"
#define winincludeall
#include "windows.bi" 
Then you can find zzwinstuff.pp.bas
zzwinstuff.pp.bas should be located last in a folder if you use alphabetical sorting (win default), so it should be easy to find.
You can search in this file for any query you have.
type WINBOOL as long is on line 72
Post Reply