Was passt an diesem Code nicht? Habe ihn schon mehrmals verändert. Manchmal gibt es einen Invaild Memory Access und manchmal kommt ein leerer String als Rückgabe heraus
Code: Alles auswählen
GetHandle = RegOpenKeyEx_(#HKEY_LOCAL_MACHINE,"SYSTEM\ControlSet001\Services\{02FA8931-DD7E-4B43-A9D8-C8F846F00D8B}\Parameters\Tcpip\", 0, #KEY_ALL_ACCESS, @hKey)
If GetHandle = #ERROR_SUCCESS
lpcbData = 255
lpData = Space(255)
lType = #REG_MULTI_SZ
GetHandle = RegQueryValueEx_(#HKEY_LOCAL_MACHINE,"IPAddress", 0, @lType, @lpData, @lpcbData)
Debug lpData
EndIf
RegCloseKey_(hKey)
Danke,
PureBasic4.0