
 1. About
 
 DADVAPI is HX's emulation of ADVAPI32.DLL. The registry API is 
 implemented to some degree, the rest are just dummies.
 
 The content of the registry is stored in private profile files. This is
 a simple approach and it also makes it easy to add new entries, because
 this format is supported when a registry branch is to be exported.

 The profile files must be located in the same directory where DADVAPI.DLL
 is stored, and the filenames are:

 root key             filename
 --------------------------------------------
 HKEY_CLASSES_ROOT    "Classes"
 HKEY_LOCAL_MACHINE   "System"
 HKEY_CURRENT_USER    %USERNAME% (or "DOS")


 2. Supported Functions
 
 Name                              Dummy
 --------------------------------------------------
 AddAccessAllowedAce               Y
 AdjustTokenPrivileges             Y
 AllocateAndInitializeSid          Y
 AllocateLocallyUniqueId           Y
 CloseServiceHandle                Y
 ControlService                    Y
 CopySid                           Y
 CreateServiceA                    Y
 CryptAcquireContextA              Y
 CryptAcquireContextW              Y
 CryptCreateHash                   Y
 CryptDecrypt                      Y
 CryptDeriveKey                    Y
 CryptDestroyHash                  Y
 CryptDestroyKey                   Y
 CryptEncrypt                      Y
 CryptEnumProvidersA               Y
 CryptExportKey                    Y
 CryptGenKey                       Y
 CryptGenRandom                    Y
 CryptGetHashParam                 Y
 CryptGetKeyParam                  Y
 CryptGetProvParam                 Y
 CryptGetUserKey                   Y
 CryptHashData                     Y
 CryptImportKey                    Y
 CryptReleaseContext               Y
 CryptSetHashParam                 Y
 CryptSetKeyParam                  Y
 CryptSignHashA                    Y
 CryptProvKeyParam                 Y
 CryptVerifySignatureA             Y
 DeleteAce                         Y
 DeleteService                     Y
 DuplicateToken                    Y
 DuplicateTokenEx                  Y
 EqualSid                          Y
 FreeSid                           Y
 GetAce                            Y
 GetFileSecurityA                  Y
 GetFileSecurityW                  Y
 GetKernelObjectSecurity           Y
 GetLengthSid                      Y
 GetSecurityDescriptorControl      Y
 GetSecurityDescriptorDacl         Y
 GetSecurityDescriptorGroup        Y
 GetSecurityDescriptorLength       Y
 GetSecurityDescriptorOwner        Y
 GetSecurityDescriptorSacl         Y
 GetSidIdentifierAuthority         Y
 GetSidSubAuthority                Y
 GetSidSubAuthorityCount           Y
 GetTokenInformation               Y
 GetUserNameA                       
 GetUserNameW
 ImpersonateLoggedOnUser           Y
 InitializeAcl                     Y
 InitializeSecurityDescriptor      Y
 InitializeSid                     Y
 IsValidAcl                        Y
 IsValidSecurityDescriptor         Y
 IsValidSid                        Y
 LookupAccountSidA                 Y
 LookupAccountSidW                 Y
 LookupPrivilegeValueA             Y
 MakeAbsoluteSD                    Y
 OpenProcessToken                  Y
 OpenSCManagerA                    Y
 OpenServiceA                      Y
 QueryServiceStatus                Y
 RegCloseKey
 RegConnectRegistryA               Y
 RegCreateKeyA
 RegCreateKeyExA
 RegCreateKeyExW
 RegCreateKeyW
 RegDeleteKeyA
 RegDeleteKeyW
 RegDeleteValueA
 RegDeleteValueW
 RegEnumKeyA
 RegEnumKeyExA
 RegEnumKeyExW
 RegEnumKeyW
 RegEnumValueA
 RegEnumValueW
 RegFlushKey                       Y
 RegOpenKeyA
 RegOpenKeyExA
 RegOpenKeyExW
 RegOpenKeyW
 RegQueryInfoKeyA                  Y
 RegQueryInfoKeyW                  Y
 RegQueryValueA
 RegQueryValueExA
 RegQueryValueExW
 RegQueryValueW
 RegRestoreKeyA                    Y
 RegSaveKeyA                       Y
 RegSetValueA
 RegSetValueExA
 RegSetValueExW                    Y
 RegSetValueW                      Y
 RevertToSelf                      Y
 SetFileSecurityA                  Y
 SetFileSecurityW                  Y
 SetKernelObjectSecurity           Y
 SetSecurityDescriptorDacl         Y
 StartServiceA                     Y
 SystemFunction036


 3. History

 2011/05/27:  V2.11

  SystemFunction036 added (RtlGenRandom).

 2009/11/16:  V2.10

  bugfix: RegEnumKey/RegEnumKeyEx didn't work.
  bugfix: RegDeleteKey didn't work.
  RegSetValueEx+RegQueryValueEx support REG_BINARY and REG_DWORD types.
  RegConnectRegistryA added (dummy)
  DuplicateTokenEx added (stub)
 
 2009/01/20:  V2.9
 
  source assembled with JWasm.
 
 2008/01/11:  V2.8
 
  RegEnumKeyW, RegEnumKeyExW and RegEnumValueW implemented
  RegisterEventSourceW, ReportEventW added (dummies)
  OpenThreadToken, SetThreadToken added (dummies)
  CryptDestroyKey, CryptImportKey, CryptExportKey, CryptDeriveKey,
   CryptGenKey, CryptDecrypt, CryptEncrypt, CryptSetKeyParam,
   CryptGetKeyParam, CryptSetProvParam, CryptGetProvParam, CryptGetUserKey,
   CryptSetHashParam, CryptVerifySignatureA, CryptSignHashA,
   CryptEnumProvidersA added (dummies)
  GetAce, DeleteAce added (dummies)
  GetSidIdentifierAuthority, GetSidSubAuthority, GetSidSubAuthorityCount,
   LookupAccountSidA, LookupAccountSidW added (dummies)
  DuplicateToken added (dummies)
  RevertToSelf added
  GetSecurityInfo added (dummy)
  SetEntriesInAclW added (dummy)
  QueryServiceStatus added (dummy)
 
 2007/07/15:  V2.7
 
  RegQueryInfoKeyW added (dummy)
  RegEnumKeyA and RegEnumKeyExA implemented
 
 2007/03/15:  V2.6
 
  CreateServiceA, StartServiceA, DeleteService, OpenServiceA, ControlService,
   CloseServiceHandle, OpenSCManagerA added (dummies)
  RegisterEventSourceA, DeregisterEventSource, ReportEventA added (dummies)
  RegSaveKeyA, RegRestoreKeyA added (dummies)
 
 2006/12/14:  V2.5
 
  ImpersonateLoggedOnUser added (dummy)
 
 2006/07/15:  V2.4
 
  RegCreateKeyW, RegDeleteKeyW, RegDeleteValueW, RegOpenKeyW,
   RegOpenKeyExW implemented
  RegFlushKey added (dummy)
  CopySid, GetLengthSid added (dummy)
  InitializeAcl, AddAccessAllowedAce added (dummy)
 
 2006/06/14:  V2.3
 
  LookupAccountNameA added (dummy)
 
 2006/05/15:  V2.2
 
  support for HKEY_CURRENT_USER added (file %USERNAME% or "DOS")
  RegCreateKeyA, RegSetValueA added
  RegDeleteKeyA, RegDeleteValueA, RegEnumValueA implemented
  RegSetValueExA implemented for string values (REG_SZ)
  RegCreateKeyW, RegCreateKeyExW, RegOpenKeyW, RegDeleteKeyW, RegQueryValueW,
   RegSetValueW, RegSetValueExW, RegDeleteValueW, RegEnumKeyW, RegEnumKeyExW
   added (dummies)
  GetUserNameA now returns value of environment variable USERNAME (or "DOS")
 
 2006/03/18:  V2.1
 
  GetUserNameW added
  RegOpenKeyA, RegQueryValueA check for NULL key handle parameter
  RegQueryValueExA implemented for string type (just calls RegQueryValueA)
  RegOpenKeyExA implemented (just calls RegOpenKeyA)
  support for HKEY_LOCAL_MACHINE added.
  set hKey to 0 as default for RegOpenKeyXX.
  InitializeSid added (dummy)
  catch invalid handle 0 in RegCloseKey
  clear handle in RegCreateKeyExA if function fails (which currently is
   always the case because it is not implemented)
  RegDeleteValueA added (dummy)
  bugfix: function AllocateLocallyUniqueId had no RET
 
 2006/01/22:  V2.0
 
  RegOpenKeyA, RegQueryValueA and RegCloseKey now work with HKEY_CLASSES_ROOT.
 
 2005/11/24:  V1.9
 
  AllocateLocallyUniqueId added (dummy)
  RegEnumValueA added (dummy)
  AllocateAndInitializeSid, FreeSid added (dummy)
 
 2005/11/03:  V1.8
 
  MakeAbsoluteSD, EqualSid added (dummy)
 
 2005/09/01:  V1.7
 
  CryptAquireContextW, CryptCreateHash, CryptDestroyHash,
   CryptHashData, CryptGetHashParam, RegOpenKeyExW,
   RegQueryValueExW added (dummies)
   
 2005/07/17:  V1.6
 
  RegDeleteKeyA + RegEnumKeyExA added (dummies)
  SetSecurityDescriptorDacl added (dummy)
 
 2005/05/14:  V1.5
 
  GetUserNameA added (returns "DOS")
 
 2004/11/25:  V1.4
 
  RegQueryInfoKeyA added (dummy)
 
 2004/10/12:  V1.3
 
  RegCreateKeyExA + RegSetValueExA added (dummies)
  InitializeSecurityDescriptor added
 
 2004/09/23:  V1.2
 
  RegOpenKeyA + RegEnumKey added (dummies)
 
 2004/03/21:  V1.1
 
  CryptGenRandom, CryptAquireContextA, CryptReleaseContext added
 
 2003/12/03:  V1.0

 
 4. Copyright
 
 DADVAPI is part of HX DOS extender. This extender is freeware.
 View file HXRT.TXT for license details.
 
 Japheth
 
