PDA

Ver la Versión Completa : WNET API Windows Networking


luiguiray
13-10-2004, 22:05:41
Alguien sabe como usar esta API?...únicamente la necesito para saber la información de la red, específicamente si está desconectado el cable de red o no, en el supuesto de que la red funciona perfectamente al igual que la tarjeta de red...
Según la información de Microsoft en MSDN hay una función para esto...

[The lpProvider ("]WNetGetNetworkInformation[/url] function returns extended information about a specific network provider whose name was returned by a previous network enumeration.]

DWORD WNetGetNetworkInformation( LPCTSTR NETINFOSTRUCT[/b] ("]lpNetInfoStruct);
Parameters

lpProvider Pointer to a constant null-terminated string that contains the name of the network provider for which information is required. [i]lpNetInfoStruct [out] Pointer to a [url="http://msdn.microsoft.com/library/en-us/wnet/wnet/netinfostruct_str.asp) structure. The structure describes characteristics of the network. Y bueno, la he utilizado y siempre me regresa 0. Alguien sabe algo al respecto?...pues he buscado por internet y no he encontrado ningún ejemplo...

De antemano gracias!