--- a/Win32OperatingSystem.st Wed Dec 05 13:03:24 2018 +0100
+++ b/Win32OperatingSystem.st Thu Dec 06 15:08:54 2018 +0100
@@ -16160,28 +16160,22 @@
Return nil if no such key exists
WARNING: subKeyIndex is 0-based!!"
-
- |subKeyName subKeyClassName errorNumber|
+ |subKeyName errorNumber|
%{
HKEY myKey, subKey = 0;
-/* lpName (nameBuffer):
- * A pointer to a buffer that receives the name of the subkey, including the
- * terminating null character. The function copies only the name of the subkey,
- * not the full key hierarchy, to the buffer. If the function fails, no information is copied to this buffer.
- *
- * note: This actually means that the if the path fits within 255 chacaters you could get another 255 characters for the key itself.
- * This could help if you are having issues with the registry path lenght.
- */
+ /* lpName (nameBuffer):
+ * A pointer to a buffer that receives the name of the subkey, including the
+ * terminating null character. The function copies only the name of the subkey,
+ * not the full key hierarchy, to the buffer. If the function fails, no information is copied to this buffer.
+ *
+ * note: This actually means that the if the path fits within 255 chacaters you could get another 255 characters for the key itself.
+ * This could help if you are having issues with the registry path lenght.
+ */
wchar_t nameBuffer[256]; // 256 is due to Key name limit (including path)
DWORD nameSize = sizeof(nameBuffer);
- /* lpClass (classNameBuffer):
- * A pointer to a buffer that receives the user-defined class of the enumerated subkey.
- */
- wchar_t classNameBuffer[256];
- DWORD classNameSize = sizeof(classNameBuffer);
FILETIME modificationTime;
int _retVal;
@@ -16191,12 +16185,10 @@
if ((_retVal = RegEnumKeyExW(myKey, __intVal(subKeyIndex),
nameBuffer, &nameSize,
NULL,
- classNameBuffer, &classNameSize,
+ NULL, NULL, //classNameBuffer, classNameSize
&modificationTime)) == ERROR_SUCCESS) {
nameBuffer[nameSize] = '\0';
- classNameBuffer[classNameSize] = '\0';
subKeyName = __MKU16STRING(nameBuffer);
- subKeyClassName = __MKU16STRING(classNameBuffer);
} else {
if ((_retVal != ERROR_PATH_NOT_FOUND)
&& (_retVal != ERROR_FILE_NOT_FOUND)