C 言語関数:CreatePrivateObjectSecurity サンプルコード


TITLE : WinApi
tttitti BOOL CreatePrivateObjectSecurity(_In_opt_ PSECURITY_DESCRIPTOR ParentDescriptor, _In_opt_ PSECURITY_DESCRIPTOR CreatorDescriptor, _Out_ PSECURITY_DESCRIPTOR *NewDescriptor, _In_ BOOL IsDirectoryObject, _In_opt_ HANDLE Token, _In_ PGENERIC_MAPPING GenericMapping).......

TITLE : SetPrivateObjectSecurity function (Windows)
BOOL WINAPI CreatePrivateObjectSecurity(.......
TITLE : 縲娠B縲善owerBuilder API Site
FUNCTION ulong CreatePrivateObjectSecurity(ref SECURITY_DESCRIPTOR ParentDescriptor,ref SECURITY_DESCRIPTOR CreatorDescriptor,ref SECURITY_DESCRIPTOR NewDescriptor,ulong IsDirectoryObject,ulong Token,ref GENERIC_MAPPING GenericMapping) LIBRARY "advapi32.dll".......
TITLE : The Windows Access Control Model: Part 2 - CodeProject
You can use your own logic to manage the security descriptors (it will be easier to manage in SDDL form). Or you can make use of a special API, CreatePrivateObjectSecurity(), to do it for you. First, you must decide which methods of your class you want to restrict (you can restrict up to 16 methods per security descriptor). These methods must include generic actions specified in the GENERIC_MAPPING structure (even if you don't support themjust provide empty methods in this case)........
TITLE : The Windows Access Control Model: Part 2 - CodeProject
In the constructor for your class, make a call to CreatePrivateObjectSecurity() and store the returned security descriptor in one of your class members. You have now associated the security descriptor to your class. Should you need to update the security descriptor (e.g. during a configuration change), make a call to SetPrivateObjectSecurity(). This function will merge the old security descriptor with your own security descriptor........
TITLE : The Windows secure programming model based on the Windows access control list of the Win32 library with C working program examples
Use the CreatePrivateObjectSecurity(), DestroyPrivateObjectSecurity(), GetPrivateObjectSecurity() and SetPrivateObjectSecurity() functions........