Определение статуса компьютера в сети
Код:
OutfFle "NetGetJoinInformation.exe"
;http://msdn.microsoft.com/en-us/library/windows/desktop/aa370423(v=vs.85).aspx
Section
System::Call 'Netapi32::NetGetJoinInformation(w "", *i.r0,*i.r1)i.r2'
System::Call '*$0(&w1024.r3)'
System::Call 'Netapi32::NetApiBufferFree(ir0)'
Messagebox MB_OK "NETSETUP_JOIN_STATUS=$1 Name=$3"
;NETSETUP_JOIN_STATUS=(NetSetupUnknownStatus,NetSetupUnjoined,NetSetupWorkgroupName,NetSetupDomainName);
;NetSetupUnknownStatus = 0 - The status is unknown * Статус не определён
;NetSetupUnjoined = 1 - The computer is not joined * Отсутствует соединение компьютера
;NetSetupWorkgroupName = 2 - The computer is joined to a workgroup * Компьютер присоединен к рабочей группе
;NetSetupDomainName = 3 - The computer is joined to a domain * Компьютер присоединен к домену
SectionEnd