⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dcomperm.h

📁 MPICH是MPI的重要研究,提供了一系列的接口函数,为并行计算的实现提供了编程环境.
💻 H
字号:
/*++DCOM Permission Configuration SampleCopyright (c) 1996, Microsoft Corporation. All rights reserved.Module Name:    dcomperm.hAbstract:    Include file for DCOM Permission Configuration sampleAuthor:    Michael NelsonEnvironment:    Windows NT--*/#include <objbase.h>#define GUIDSTR_MAX 38#ifndef STR2UNI#define STR2UNI(unistr, regstr) \        mbstowcs (unistr, regstr, strlen (regstr)+1);#define UNI2STR(regstr, unistr) \        wcstombs (regstr, unistr, wcslen (unistr)+1);#endifextern TCHAR **g_aPrincipal;extern bool *g_bPermit;DWORD DCOMPermissions(	TCHAR *IIDString,	bool bAccess,	TCHAR *Principal,	bool bSet,	bool bPermit	);DWORD DCOMSetRunAs(	TCHAR *IIDString,	TCHAR *Account,	TCHAR *Password	);bool DCOMGetACLPrincipals(	TCHAR *IIDString, 	bool bAccess, 	TCHAR **&aPrincipal,	bool *&bPermit	);//// Wrappers//DWORDListDefaultAccessACL();DWORDListDefaultLaunchACL();DWORDListAppIDAccessACL (    LPTSTR AppID    );DWORDListAppIDLaunchACL (    LPTSTR AppID    );DWORDChangeDefaultAccessACL (    LPTSTR Principal,    BOOL SetPrincipal,    BOOL Permit    );DWORDChangeDefaultLaunchACL (    LPTSTR Principal,    BOOL SetPrincipal,    BOOL Permit    );DWORDChangeAppIDAccessACL (    LPTSTR AppID,    LPTSTR Principal,    BOOL SetPrincipal,    BOOL Permit    );DWORDChangeAppIDLaunchACL (    LPTSTR AppID,    LPTSTR Principal,    BOOL SetPrincipal,    BOOL Permit    );DWORD GetRunAsPassword (    LPTSTR AppID,    LPTSTR Password    );DWORD SetRunAsPassword (    LPTSTR AppID,    LPTSTR Principal,    LPTSTR Password    );DWORD GetRunAsPassword (    LPTSTR AppID,    LPTSTR Password    );DWORD SetRunAsPassword (    LPTSTR AppID,    LPTSTR Password    );//// Internal functions//DWORDCreateNewSD (    SECURITY_DESCRIPTOR **SD    );DWORDMakeSDAbsolute (    PSECURITY_DESCRIPTOR OldSD,    PSECURITY_DESCRIPTOR *NewSD    );DWORDSetNamedValueSD (    HKEY RootKey,    LPTSTR KeyName,    LPTSTR ValueName,    SECURITY_DESCRIPTOR *SD    );DWORDGetNamedValueSD (    HKEY RootKey,    LPTSTR KeyName,    LPTSTR ValueName,    SECURITY_DESCRIPTOR **SD,    BOOL *NewSD    );DWORDListNamedValueSD (    HKEY RootKey,    LPTSTR KeyName,    LPTSTR ValueName    );DWORDAddPrincipalToNamedValueSD (    HKEY RootKey,    LPTSTR KeyName,    LPTSTR ValueName,    LPTSTR Principal,    BOOL Permit    );DWORDRemovePrincipalFromNamedValueSD (    HKEY RootKey,    LPTSTR KeyName,    LPTSTR ValueName,    LPTSTR Principal    );DWORDGetCurrentUserSID (    PSID *Sid    );DWORDGetPrincipalSID (    LPTSTR Principal,    PSID *Sid    );DWORDCopyACL (    PACL OldACL,    PACL NewACL    );DWORDAddAccessDeniedACEToACL (    PACL *Acl,    DWORD PermissionMask,    LPTSTR Principal    );DWORDAddAccessAllowedACEToACL (    PACL *Acl,    DWORD PermissionMask,    LPTSTR Principal    );DWORDRemovePrincipalFromACL (    PACL Acl,    LPTSTR Principal    );voidListACL (    PACL Acl    );DWORDSetAccountRights (    LPTSTR User,    LPTSTR Privilege    );//// Utility Functions//LPTSTRSystemMessage (    LPTSTR szBuffer,    HRESULT hr    );

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -