I need to use the following function of the Windows API:
Private Declare PtrSafe Function OpenProcess Lib "Kernel32.dll" (ByVal dwDesiredAccess As Long, _ByVal bInheritHandle As xxxxxxx, ByVal dwProcessId As Long) As LongPtr
According to this page the argument bInheritHandle is a C++ BOOL that, if I'm correct, is 8bit.
So, in place of xxxxxxx I don't know what data type to use: long, byte or boolean?
Reason to use byte: VBA byte is 8bit as it's C++ boolean
Reason to use boolean: because, despite it's 16bits in VBA, it's conceptually the same as a C++ 8bit boolean
Reason to use long: because most (of the few) examples I find on the web use this
Bookmarks