cosmo0920 / windows-pr

A collection of Windows functions, constants and macros predefined for you for win32-api
23 stars 9 forks source link

Other functions missing from registry.rb (as of 2011-02-22) #2

Closed DanRathbun closed 13 years ago

DanRathbun commented 13 years ago

MISSING from registry.rb ( as of 2011-02-22 )


  # Note:  
  # Functions provided only for compatibility with 16-bit versions of Windows.  
  # New applications should use the equivalent ...Ex function, instead:  
  # ------------------------------------------------------------  
  # RegCreateKey  
  # RegEnumKey  
  #  
  #  
  # Functions provided only for compatibility with 32-bit versions of Windows.  
  # New 64bit applications (or 32bit apps running under WOW64) should use the  
  # equivalent ...Ex function, instead:  
  # ------------------------------------------------------------  
  # RegDeleteKey  

if Win version >= 5.0
API.new('RegGetKeySecurity','LLPP','L','advapi32')
API.new('RegSetKeySecurity','LLP','L','advapi32')


if Win version >= 5.1
API.new('GetSystemRegistryQuota','LPLL','L') # kernel32.dll


if Win version >= 5.2
API.new('RegDeleteKeyEx','LPLL','L','advapi32')
API.new('RegDisableReflectionKey', 'L', 'L', 'advapi32')
API.new('RegEnableReflectionKey', 'L', 'L', 'advapi32')
API.new('RegQueryReflectionKey','LB','L','advapi32')


if Win version >= 6.0
API.new('RegCopyTree','LPL','L','advapi32')
API.new('RegCreateKeyTransacted','LPLPLLPPPLV','L','advapi32')
API.new('RegDeleteKeyValue','LP','L','advapi32')
API.new('RegDeleteTree','LP','L','advapi32')
API.new('RegDeleteKeyTransacted','LPLLLV','L','advapi32')
API.new('RegDisablePredefinedCacheEx', 'V', 'L', 'advapi32')
API.new('RegLoadAppKey','PPLLL','L','advapi32')
API.new('RegLoadMUIString', 'LPPLPLP', 'L', 'advapi32')
API.new('RegOpenKeyTransacted','LPLLPLV','L','advapi32')
API.new('RegSetKeyValue','LPPLPL','L','advapi32')
* unsure about the last parameters for:*
RegCreateKeyTransacted
RegDeleteKeyTransacted
RegOpenKeyTransacted
The docs say "__reserved PVOID pExtendedParameter"
'pExtendedParameter
This parameter is reserved and must be NULL.'
* I set them to 'V'.. do they need to be 'P' ?? *


DanRathbun commented 13 years ago

Perhaps the ver 6+ calls could go in a separate file called "registry6.rb" that coders could explictly require if they need them ??

djberg96 commented 13 years ago

I've committed these, thanks! All of the ones I tested worked on Vista, btw.

For RegCreateKeyTransacted, etc, I don't think it matters, but they should probably be 'P'.

djberg96 commented 13 years ago

Pushed out windows-pr 1.2.0 tonight. Thanks for the patches!