Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Fox Date type LPBYTE
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00806517
Message ID:
00806707
Vues:
17
Try this code:
DECLARE INTEGER NetMessageBufferSend IN netapi32;
	STRING servername, STRING msgname, STRING fromname,;
	STRING @buf, INTEGER buflen

LOCAL cSrvName, cMsgName, cFromName, cMsg
cSrvName = Null  && or a server name like '\\MYSERVER'
cMsgName = 'RECIPIENT'
cFromName = 'ME-MYSELF'
cMsg = 'Test message'

? NetMessageBufferSend(cSrvName, cMsgName, cFromName, @cMsg, Len(cMsg))
NETAPI set of functions sometimes requires input parameters to be converted to Unicode. I'm not sure about this particular function, but check it as a possible option for parameters servername, msgname and fromname.

Also check the value returned by NetMessageBufferSend -- it is either 0 or an error code, which is informative enough.

For example 123 means ERROR_INVALID_NAME (The filename, directory name, or volume label syntax is incorrect).
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform