rbwest86 wrote:
GetUserObjectSecurity is a function. Its function is a member of what?
I don't quite get this. If you're asking "where" is this function located, then I would say it is within a DLL named User32.dll, and comes with a companion lib file named User32.lib (The prototype is defined in Winuser.h, which is in turn included by Windows.h). So when you link to User32.lib, you could use the function like using a function that is within your code.
rbwest86 wrote:
does GetUserObjectSecurity have to be included in int main()
You don't "include" a function, you call it. You can call this function, wherever you want to, given that you've included the relevant header file and linked to the relevant library, discussed above.
rbwest86 wrote:
I read that BOOL is the older version of bool? And all bool is for, is for true/false correct?
BOOL is actually int, defined like this: typedef int BOOL; (I'm not sure about the file, just right click and select go to definition.) Also, Google for "BOOL vs bool".
rbwest86 wrote:
Is BOOL older version of bool?
No.
rbwest86 wrote:
And all bool is for, is for true/false correct?
Yes.
rbwest86 wrote:
I also read that bool uses one (byte), versus BOOL uses 32(bits). Why is this?
BOOL uses 32 bits because it *is* an integer (discussed above). bool is limited to work with true and false. But with BOOL, you could use any integer. And this can come handy, if you're returning BOOL from a function and you could: * return -1 to indicate that the function failed * return 1 to indicate that the function succeeded * return 5 to indicate that the something went wrong, but the error was handled. (A file wasn't existing, but it was created and written into) * etc.,
rbwest86 wrote:
Also when you use bool, is it required to be typed out in your source, or is it implied by some
file? How do you properly use bool?