On 2019-12-29 05:46, WFB wrote:
Hi Todd,
I am curious, what was the problem?
I tried 0 in the first place and the script died. Though it has
something to do with the 0 but obviously it has not.
Hi Bill,
I have a major rewrite underway for several of my
modules. Hopefully I will post them her today
for evaluation.
On the "null and native call question", Native
Call translates a zero into a C NULL for you.
My run and die issue was not lpReserved being
sent a NULL incorrectly. The culprit was M$ and
lpType.
https://docs.microsoft.com/en-us/windows/win32/api/winreg/nf-winreg-regqueryvalueexw
C++
LSTATUS RegQueryValueExW(
HKEY hKey,
LPCWSTR lpValueName,
LPDWORD lpReserved,
LPDWORD lpType,
LPBYTE lpData,
LPDWORD lpcbData
);
lpType
A pointer to a variable that receives a code
indicating the type of data stored in the
specified value. For a list of the possible
type codes, see Registry Value Types. The
lpType parameter can be NULL if the type code
is not required.
I was sending lpType the value for REG_DWORD (0x00000004)
and sometimes REG_SZ (0x00000001). This caused
the call to die with no error message.
The ONLY value of lpType that actually works is 0
(NULL).
Ha! M$ STRIKES AGAIN! Good gracious I wasted and
a lot of others helping me wasted a lot of time on this!
<Editorial comment> AAAAAAHHHHHHH!!!!!!! </Editorial commend>
-T