Well I was looking at advapi.dll and noticed there are loads of procedures/functions called SystemFunction001 to 041, which piqued my curiosity, but the main reason is
GetSecurityInfo function (aclapi.h) - Win32 apps | Microsoft Docs
in particular what data type the Loc:SE_Object_Type (currently Long) and Loc:SecurityInfo (currently Ulong) should be.
IS_GetSecurityInfo(Long,Long,Ulong,Long,Long,Long,Long,Long),Ulong,Raw,Pascal,Name('GetSecurityInfo')
Loc:CurrentThreadId = IS_GetCurrentThreadId() !This apps thread identifier
Loc:hDesk = IS_GetThreadDesktop(Loc:CurrentThreadId) !Handle to the desktop this app is running on
IF Loc:hDesk = 0
Message('IS_GetThreadDesktop Failed Error:' & IS_GetLastError() )
Else
Loc:ReturnValueUlong = IS_GetSecurityInfo( Loc:hDesk,|
Loc:SE_Object_Type,|
Loc:SecurityInfo,|
Loc:lplpSidOwner,|
Loc:lplpSidGroup,|
Loc:lplpDacl,|
Loc:lplpSacl,|
Loc:lplpSecurityDescriptor)
IF Loc:ReturnValueUlong = Error_Success
Else
Message('Is_GetSecurityInfo Failed Error:'& Loc:ReturnValueUlong &' GetLastError:'& IS_GetLastError() )
End
In SE_OBJECT_TYPE (accctrl.h) - Win32 apps | Microsoft Docs
its defined as an ENUM and I dont know what data type this is, same for
SECURITY_INFORMATION (Winnt.h) - Win32 apps | Microsoft Docs
its a set of bit flags, but I dont know if this is a short, long or something else.
ENUM is not something listed in these MS data type webpage links, I linked to here: Clarion Run vs CreateProcessA
Thats why I’m stumped, there are quite a few interpretations online of how these should be defined and handled.
Edit. The last parameters are Long Pointer (lp) containing a memory address to another Long Pointer (lp) which is a bit long winded, but I’ve worked with those before and they are just tedious.