#DEFINE HKEY_CLASSES_ROOT 0x80000000 #DEFINE HKEY_CURRENT_USER 0x80000001 #DEFINE HKEY_CURRENT_CONFIG 0x80000005 #DEFINE ERROR_SUCCESS 0 DECLARE INTEGER RegCloseKey IN advapi32 INTEGER hKey DECLARE INTEGER RegOpenKeyEx IN advapi32; INTEGER hKey, STRING lpSubKey, INTEGER ulOptions,; INTEGER samDesired, INTEGER @phkResult DECLARE INTEGER RegQueryInfoKey IN advapi32; INTEGER hKey, STRING @lpClass, INTEGER @lpcClass,; INTEGER lpReserved, INTEGER @lpcSubKeys,; INTEGER @lpcMaxSubKeyLen, INTEGER @lpcMaxClassLen,; INTEGER @lpcValues, INTEGER @lpcMaxValueNameLen,; INTEGER @lpcMaxValueLen, INTEGER @lpcbSecurityDescriptor,; STRING @lpftLastWriteTime *|typedef struct _FILETIME { *| DWORD dwLowDateTime; *| DWORD dwHighDateTime; *} FILETIME, *PFILETIME; 8 bytes LOCAL lpClass, lpcClass, lpcSubKeys, lpcMaxSubKeyLen,; lpcMaxClassLen, lpcValues, lpcMaxValueNameLen,; lpcMaxValueLen, lpcbSecurityDescriptor,; lpftLastWriteTime, nResult lpcClass = 64 lpClass = Repli(Chr(0), lpcClass) STORE 0 TO lpcSubKeys, lpcMaxSubKeyLen, lpcMaxClassLen, lpcValues,; lpcMaxValueNameLen, lpcMaxValueLen, lpcbSecurityDescriptor lpftLastWriteTime = Repli(Chr(0), 8) && FILETIME, two DWORDs nResult = RegQueryInfoKey(HKEY_CURRENT_USER,; @lpClass, @lpcClass, 0, @lpcSubKeys, @lpcMaxSubKeyLen,; @lpcMaxClassLen, @lpcValues, @lpcMaxValueNameLen,; @lpcMaxValueLen, @lpcbSecurityDescriptor, @lpftLastWriteTime) IF nResult <> ERROR_SUCCESS ? 'Error code:', nResult RETURN ENDIF ? 'Class:', LEFT(lpClass, lpcClass) ? 'Number of subkeys:', lpcSubKeys ? 'The longest name:', lpcMaxSubKeyLen ? 'The longest class:', lpcMaxClassLen ? 'Associated values:', lpcValues ? 'The longest value name:', lpcMaxValueNameLen ? 'The longest data component:', lpcMaxValueLen ? 'Size of the security descriptor', lpcbSecurityDescriptor * end of main