/* * Directory Service Setup interface definition */ #include typedef [context_handle] HANDLE RPC_HKEY; typedef RPC_HKEY *PRPC_HKEY; typedef [handle] PWCHAR PREGISTRY_SERVER_NAME; typedef struct value_ent { PRPC_UNICODE_STRING ve_valuename; DWORD ve_valuelen; LPDWORD ve_valueptr; DWORD ve_type; } RVALENT, *PRVALENT; typedef ULONG REGSAM; typedef struct _RPC_SECURITY_DESCRIPTOR { [size_is(cbInSecurityDescriptor), length_is(cbOutSecurityDescriptor)] PBYTE lpSecurityDescriptor; DWORD cbInSecurityDescriptor; DWORD cbOutSecurityDescriptor; } RPC_SECURITY_DESCRIPTOR, *PRPC_SECURITY_DESCRIPTOR; typedef struct _RPC_SECURITY_ATTRIBUTES { DWORD nLength; RPC_SECURITY_DESCRIPTOR RpcSecurityDescriptor; BOOLEAN bInheritHandle; } RPC_SECURITY_ATTRIBUTES, *PRPC_SECURITY_ATTRIBUTES; [ uuid(338CD001-2244-31F1-AAAA-900038001003), version(1.0), pointer_default(unique), endpoint("ncacn_np:[\\pipe\\winreg]") #ifndef __midl ,explicit_handle #endif ] interface winreg { /* Function 0 */ error_status_t __stdcall OpenClassesRoot( [in, unique] PREGISTRY_SERVER_NAME ServerName, [in] REGSAM samDesired, [out] PRPC_HKEY phKey); /* Function 1 */ error_status_t __stdcall OpenCurrentUser( [in, unique] PREGISTRY_SERVER_NAME ServerName, [in] REGSAM samDesired, [out] PRPC_HKEY phKey); /* Function 2 */ error_status_t __stdcall OpenLocalMachine( [in, unique] PREGISTRY_SERVER_NAME ServerName, [in] REGSAM samDesired, [out] PRPC_HKEY phKey); /* Function 3 */ error_status_t __stdcall OpenPerformanceData( [in, unique] PREGISTRY_SERVER_NAME ServerName, [in] REGSAM samDesired, [out] PRPC_HKEY phKey); /* Function 4 */ error_status_t __stdcall OpenUsers( [in, unique] PREGISTRY_SERVER_NAME ServerName, [in] REGSAM samDesired, [out] PRPC_HKEY phKey); /* Function 5 */ error_status_t __stdcall BaseRegCloseKey( [in, out] PRPC_HKEY hKey); /* Function 6 */ error_status_t __stdcall BaseRegCreateKey( [in] RPC_HKEY hKey, [in] PRPC_UNICODE_STRING lpSubKey, [in] PRPC_UNICODE_STRING lpClass, [in] DWORD dwOptions, [in] REGSAM samDesired, [in, unique] PRPC_SECURITY_ATTRIBUTES lpSecurityAttributes, [out] PRPC_HKEY phkResult, [in, out, unique] LPDWORD lpdwDisposition); /* Function 7 */ error_status_t __stdcall BaseRegDeleteKey( [in] RPC_HKEY hKey, [in] PRPC_UNICODE_STRING lpSubKey); /* Function 8 */ error_status_t __stdcall BaseRegDeleteValue( [in] RPC_HKEY hKey, [in] PRPC_UNICODE_STRING lpValueName); /* Function 9 */ error_status_t __stdcall BaseRegEnumKey( [in] RPC_HKEY hKey, [in] DWORD dwIndex, [in] PRPC_UNICODE_STRING lpNameIn, [out] PRPC_UNICODE_STRING lpNameOut, [in, unique] PRPC_UNICODE_STRING lpClassIn, [out] PRPC_UNICODE_STRING *lplpClassOut, [in, out, unique] PFILETIME lpftLastWriteTime); /* Function 10 */ error_status_t __stdcall BaseRegEnumValue( [in] RPC_HKEY hKey, [in] DWORD dwIndex, [in] PRPC_UNICODE_STRING lpValueNameIn, [out] PRPC_UNICODE_STRING lpValueNameOut, [in, out, unique] LPDWORD lpType, [in, out, unique, size_is(lpcbData ? *lpcbData : 0), length_is(lpcbLen ? *lpcbLen : 0)] LPBYTE lpData, /* range(0, 0x4000000) */ [in, out, unique] LPDWORD lpcbData, [in, out, unique] LPDWORD lpcbLen); /* Function 11 */ error_status_t __stdcall BaseRegFlushKey( [in] RPC_HKEY hKey); /* Function 12 */ error_status_t __stdcall BaseRegGetKeySecurity( [in] RPC_HKEY hKey, [in] SECURITY_INFORMATION SecurityInformation, [in] PRPC_SECURITY_DESCRIPTOR pRpcSecurityDescriptorIn, [out] PRPC_SECURITY_DESCRIPTOR pRpcSecurityDescriptorOut); /* Function 13 */ error_status_t __stdcall BaseRegLoadKey( [in] RPC_HKEY hKey, [in] PRPC_UNICODE_STRING lpSubKey, [in] PRPC_UNICODE_STRING lpFile); /* Function 14 */ void __stdcall Opnum14NotImplemented(void); /* Function 15 */ error_status_t __stdcall BaseRegOpenKey( [in] RPC_HKEY hKey, [in] PRPC_UNICODE_STRING lpSubKey, [in] DWORD dwOptions, [in] REGSAM samDesired, [out] PRPC_HKEY phkResult); /* Function 16 */ error_status_t __stdcall BaseRegQueryInfoKey( [in] RPC_HKEY hKey, [in] PRPC_UNICODE_STRING lpClassIn, [out] PRPC_UNICODE_STRING lpClassOut, [out] LPDWORD lpcSubKeys, [out] LPDWORD lpcbMaxSubKeyLen, [out] LPDWORD lpcbMaxClassLen, [out] LPDWORD lpcValues, [out] LPDWORD lpcbMaxValueNameLen, [out] LPDWORD lpcbMaxValueLen, [out] LPDWORD lpcbSecurityDescriptor, [out] PFILETIME lpftLastWriteTime); /* Function 17 */ error_status_t __stdcall BaseRegQueryValue( [in] RPC_HKEY hKey, [in] PRPC_UNICODE_STRING lpValueName, [in, out, unique] LPDWORD lpType, [in, out, unique, size_is(lpcbData ? *lpcbData : 0), length_is(lpcbLen ? *lpcbLen : 0)] LPBYTE lpData, /* range(0, 0x4000000) */ [in, out, unique] LPDWORD lpcbData, [in, out, unique] LPDWORD lpcbLen); /* Function 18 */ error_status_t __stdcall BaseRegReplaceKey( [in] RPC_HKEY hKey, [in] PRPC_UNICODE_STRING lpSubKey, [in] PRPC_UNICODE_STRING lpNewFile, [in] PRPC_UNICODE_STRING lpOldFile); /* Function 19 */ error_status_t __stdcall BaseRegRestoreKey( [in] RPC_HKEY hKey, [in] PRPC_UNICODE_STRING lpFile, [in] DWORD Flags); /* Function 20 */ error_status_t __stdcall BaseRegSaveKey( [in] RPC_HKEY hKey, [in] PRPC_UNICODE_STRING lpFile, [in, unique] PRPC_SECURITY_ATTRIBUTES pSecurityAttributes); /* Function 21 */ error_status_t __stdcall BaseRegSetKeySecurity( [in] RPC_HKEY hKey, [in] SECURITY_INFORMATION SecurityInformation, [in] PRPC_SECURITY_DESCRIPTOR pRpcSecurityDescriptor); /* Function 22 */ error_status_t __stdcall BaseRegSetValue( [in] RPC_HKEY hKey, [in] PRPC_UNICODE_STRING lpValueName, [in] DWORD dwType, [in, size_is(cbData)] LPBYTE lpData, [in] DWORD cbData); /* Function 23 */ error_status_t __stdcall BaseRegUnLoadKey( [in] RPC_HKEY hKey, [in] PRPC_UNICODE_STRING lpSubKey); /* Function 24 */ ULONG __stdcall BaseInitiateSystemShutdown( [in, unique] PREGISTRY_SERVER_NAME ServerName, [in, unique] PRPC_UNICODE_STRING lpMessage, [in] ULONG dwTimeout, [in] BOOLEAN bForceAppsClosed, [in] BOOLEAN bRebootAfterShutdown); /* Function 25 */ ULONG __stdcall BaseAbortSystemShutdown( [in, unique] PREGISTRY_SERVER_NAME ServerName); /* Function 26 */ error_status_t __stdcall BaseRegGetVersion( [in] RPC_HKEY hKey, [out] LPDWORD lpdwVersion); /* Function 27 */ error_status_t __stdcall OpenCurrentConfig( [in, unique] PREGISTRY_SERVER_NAME ServerName, [in] REGSAM samDesired, [out] PRPC_HKEY phKey); /* Function 28 */ void __stdcall Opnum28NotImplemented(void); /* Function 29 */ error_status_t __stdcall BaseRegQueryMultipleValues( [in] RPC_HKEY hKey, [in, size_is(num_vals), length_is(num_vals)] PRVALENT val_listIn, [out, size_is(num_vals), length_is(num_vals)] PRVALENT val_listOut, [in] DWORD num_vals, [in, out, unique, size_is(*ldwTotsize), length_is(*ldwTotsize)] char *lpvalueBuf, [in, out, ref] LPDWORD ldwTotsize); /* Function 30 */ ULONG __stdcall BaseInitiateSystemShutdownEx( [in, unique] PREGISTRY_SERVER_NAME ServerName, [in, unique] PRPC_UNICODE_STRING lpMessage, [in] ULONG dwTimeout, [in] BOOLEAN bForceAppsClosed, [in] BOOLEAN bRebootAfterShutdown, [in] ULONG dwReason); /* Function 31 */ error_status_t __stdcall BaseRegSaveKeyEx( [in] RPC_HKEY hKey, [in] PRPC_UNICODE_STRING lpFile, [in, unique] PRPC_SECURITY_ATTRIBUTES pSecurityAttributes, [in] DWORD Flags); /* Function 32 */ error_status_t __stdcall OpenPerformanceText( [in, unique] PREGISTRY_SERVER_NAME ServerName, [in] REGSAM samDesired, [out] PRPC_HKEY phKey); /* Function 33 */ error_status_t __stdcall OpenPerformanceNlsText( [in, unique] PREGISTRY_SERVER_NAME ServerName, [in] REGSAM samDesired, [out] PRPC_HKEY phKey); /* Function 34 */ error_status_t __stdcall BaseRegQueryMultipleValues2( [in] RPC_HKEY hKey, [in, size_is(num_vals), length_is(num_vals)] PRVALENT val_listIn, [out, size_is(num_vals), length_is(num_vals)] PRVALENT val_listOut, [in] DWORD num_vals, [in, out, unique, size_is(*ldwTotsize), length_is(*ldwTotsize)] char *lpvalueBuf, [in] LPDWORD ldwTotsize, [out] LPDWORD ldwRequiredSize); /* Function 35 */ error_status_t __stdcall BaseRegDeleteKeyEx( [in] RPC_HKEY hKey, [in] PRPC_UNICODE_STRING lpSubKey, [in] REGSAM AccessMask, [in] DWORD Reserved); }