Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Example for NetServerEnum
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00837418
Message ID:
00837437
Vues:
29
I have an example here (though this is members area):
http://www.news2news.com/vfp/?example=165&function=252

What I can say: zero in this case means the function returned valid result. Otherwise this is an error code, like 87 (parameter is incorrect) or 234 (More data is available) etc.

MSDN says:
If the function succeeds, the return value is NERR_Success.


And NERR_Success is nothing else but
#DEFINE NERR_Success 0

Check MSDN description at
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/netmgmt/netmgmt/netserverenum.asp
...
LOCAL lnBuffer, lnCountRead, lnCountTotal, lnResult
STORE 0 TO lnBuffer, lnCountRead, lnCountTotal

WAIT WINDOW "Requesting data..." NOWAIT
lnResult = NetServerEnum (0, 101, @lnBuffer, MAX_PREFERRED_LENGTH,;
	@lnCountRead, @lnCountTotal, lnServerType, 0, 0)
WAIT CLEAR
	
IF lnResult <> 0
*  87 = The parameter is incorrect
* 234 = More data is available
	? "Error code:", lnResult
ELSE
...
ENDIF
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform