It's in the source he linked in the post.
See help.
Code: Select all
RunProgram("ie4uinit.exe","-show","")Code: Select all
EnableExplicit 
Procedure.s RegRead(Root, KeyPath.s, ValueName.s) 
	Protected valueData.s, hKey, size, type 
	If #ERROR_SUCCESS = RegOpenKeyEx_(Root, KeyPath, 0, #KEY_READ, @hKey)                 ; open with READ access rights 
		If #ERROR_SUCCESS = RegQueryValueEx_(hKey, ValueName, 0, @type, 0, @size)           ; get type and size 
			ValueData = Space(size)                                                           ; alloc memory 
			If #ERROR_SUCCESS = RegQueryValueEx_(hKey, ValueName, 0, 0, @valueData, @size)    ; get data to return 
			EndIf 
		EndIf
		RegCloseKey_(hKey) 
	EndIf
	ProcedureReturn valueData  ; return the result 
EndProcedure
; show the results (compared to the regedit this works fine) 
Global appname.s 
appname = RegRead(#HKEY_CLASSES_ROOT, ".pb", "") 
Debug "Application : " + appname 
If appname 
  Debug "  DefaultIcon: " + RegRead(#HKEY_CLASSES_ROOT, appname + "\DefaultIcon", "")  
  Debug "  CommandLine: " + RegRead(#HKEY_CLASSES_ROOT, appname + "\Shell\Open\Command", "") 
Else 
  Debug "  Nothing found " + #DQUOTE$ + appname + #DQUOTE$ 
EndIf 
Code: Select all
 RegCreateKeyEx_()  Code: Select all
Procedure.s FormatMessage(ErrorCode)   ; 
  ; handle system messages  (LINK: https://docs.microsoft.com/en-us/windows/win32/debug/system-error-codes) 
  Protected result.s, *msg, msglen 
  msglen = FormatMessage_(#FORMAT_MESSAGE_ALLOCATE_BUFFER|#FORMAT_MESSAGE_FROM_SYSTEM|#FORMAT_MESSAGE_IGNORE_INSERTS, 0, ErrorCode, 0, @*msg, 0, 0) 
  If msglen 
    result = PeekS(*msg, msglen - 2)   ; remove #CRLF$, acc. to MSDN 
    LocalFree_(*msg) 
  EndIf 
  ProcedureReturn result 
EndProcedure