Delphi - InetIsOffline, no funciona en win98

 
Vista:

InetIsOffline, no funciona en win98

Publicado por Paulo (6 intervenciones) el 13/12/2000 00:00:00
{Button1 on a Form1:}

procedure TForm1.Button1Click(Sender: TObject);

function FuncAvail(_dllname, _funcname: string;
var _p: pointer): boolean;
{return True if _funcname exists in _dllname}
var _lib: tHandle;
begin
Result := false;
if LoadLibrary(PChar(_dllname)) = 0 then exit;
_lib := GetModuleHandle(PChar(_dllname));
if _lib <> 0 then begin
_p := GetProcAddress(_lib, PChar(_funcname));
if _p <> NIL then Result := true;
end;
end;

{
Call SHELL32.DLL for Win > Win98
otherwise call URL.dll
}
{buton code:}
var
InetIsOffline : function(dwFlags: DWORD):
BOOL; stdcall;
begin
if FuncAvail(´URL.DLL´, ´InetIsOffline´,
@InetIsOffline) then
if InetIsOffLine(0) = true
then ShowMessage(´Not connected´)
else ShowMessage(´Connected!´);
end;
Uso este código, que está en todos lados y nmp tengo ninguna suerte.

¿Que es lo que pasa?

Gracias a todos.
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder