How do I find a non clarion DLL functions parameter types?

,

I’m getting

**ERROR_ACCESS_DENIED**  5 (0x5)  Access is denied

which is good, the original clarion prototype was correct ie using a Long, I just needed to tell the api what info I wanted like setting the flags and giving it some addresses for the double long pointers.

    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:SE_Object_Type          = IS_SE_WINDOW_OBJECT
        Loc:SecurityInfo            = IS_OWNER_SECURITY_INFORMATION +|
                                      IS_GROUP_SECURITY_INFORMATION +|
                                      IS_DACL_SECURITY_INFORMATION +|
                                      IS_SACL_SECURITY_INFORMATION

        Loc:lplpSidOwner            = Address(Loc:lpSidOwner)
        Loc:lplpSidGroup            = Address(Loc:lpSidGroup)
        Loc:lplpDacl                = Address(Loc:lpDacl)
        Loc:lplpSacl                = Address(Loc:lpSacl)
        Loc:lplpSecurityDescriptor  = Address(Loc:lpSecurityDescriptor)   

        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 = IS_Error_Success
            
        Else
            Message('Is_GetSecurityInfo Failed Error:'& Loc:ReturnValueUlong &' GetLastError:'& IS_GetLastError() )
        End
               
    End

Now I have to go through Desktop Security and Access Rights - Win32 apps | Microsoft Docs

to get the right flags and settings in order to get the callback function EnumDesktopWindows function (winuser.h) - Win32 apps | Microsoft Docs to work! :roll_eyes: