Čiže chyba nastala tu?
ResultInt:=WlanOpenHandle(1, nil, @dwVersion, @hClient);
try
if ResultInt<> ERROR_SUCCESS then
begin
WriteLn('Error Open CLient'+IntToStr(ResultInt));
Exit;
end;
Trošku som na to v rýchlosti pozrel na msdn a vyzerá to tak, že je tam "zlý" parameter:WlanOpenHandle(1, nil, @dwVersion, @hClient);
Zrejme ak sa použije parameter "1" - funguje pod XP, ak "2" - Vista a vyššie.dwClientVersion [in]
The highest version of the WLAN API that the client supports.
Value Meaning
1
Client version for Windows XP with SP3 and Wireless LAN API for Windows XP with SP2.
2
Client version for Windows Vista and Windows Server 2008
Fakt nemám čas to skúmať do podrobna, to by si mal Ty - študovať API na msdn a nie iba copy/paste...
msdn.microsoft.com