Sign in to follow this  
Followers 0
maillady

_WinAPI_CreateFile , $pSecurity parameter

2 posts in this topic

The last parameter "$pSecurity" for _WinAPI_CreateFile, there's no example on how to use the "$tagSECURITY_ATTRIBUTES" struct..

How do I get "Descriptor" part of the strutcure for $tagSECURITY_ATTRIBUTES

Local $pSecurity = DllStructCreate($tagSECURITY_ATTRIBUTES)
    DllStructSetData($pSecurity, "InheritHandle", 1);If True, the new process inherits the handle.
    DllStructSetData($pSecurity, "Descriptor", ?????????); A pointer to a security descriptor for the object that controls the sharing of it
    DllStructSetData($pSecurity, "Length", DllStructGetSize($pSecurity)) ;The size, in bytes, of this structure
    Local $hFile = _WinAPI_CreateFile($sFilename, 2, 2, 4, $pSecurity)
    If (Not $hFile) Then Return SetError(3, 0, 0)

Share this post


Link to post
Share on other sites



Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0