Ping Rudy: lpSecurityAttributes

Giganews Newsgroups
Subject: Ping Rudy: lpSecurityAttributes
Posted by:  T (T@invalid.invalid)
Date: Thu, 2 Apr 2020

Hi Rudy,

https://docs.microsoft.com/en-us/windows/win32/api/winreg/nf-winreg-regcreatekeyexw

https://docs.microsoft.com/en-us/previous-versions/windows/desktop/legacy/aa379560(v=vs.85)

How would you assembly code?

      lpSecurityAttributes

      A pointer to a SECURITY_ATTRIBUTES structure that
      determines whether the returned handle can be
      inherited by child processes. If lpSecurityAttributes
      is NULL, the handle cannot be inherited.

      c++

      typedef struct _SECURITY_ATTRIBUTES {
          DWORD  nLength;
          LPVOID lpSecurityDescriptor;
          BOOL  bInheritHandle;
      } SECURITY_ATTRIBUTES, *PSECURITY_ATTRIBUTES, *LPSECURITY_ATTRIBUTES;

Currently, randomly, when I make the above call,
my program just exists without an error code and
I don't get my new key.  I am suspicious that
sending lpSecurityAttributes a 0x0000 is not the
right thing to do.

Many thanks,
-T

Replies