NetSend (API)
NetSend ( API )
Syntaxe :
Call fNetSend("mon message", "NOMduPOSTE")
'/ '/ A placer dans la partie déclarative '/ Declare Function NetMessageBufferSend Lib "NETAPI32.DLL" _ (ByVal servername As Byte, msgname As Byte, _ ByVal fromname As Byte, buf As Byte, _ ByVal buflen As Long) As Long
La fonction :
Function fNetSend(strMsg As String, strTo As String) Dim bMessage() As Byte Dim bDestination() As Byte bMessage = strMsg & vbNullChar bDestination = strTo & vbNullChar If NetMessageBufferSend(0&, bDestination(0), 0&, bMessage(0), _ UBound(bMessage)) <> 0 Then MsgBox "Echec" End If End Function
Télécharger la base exemple : A2KNetMsg.zip (51ko)
Dernière modification : 08/02/2010 02:04
Catégorie : Les mémos - Net
Page lue 6513 fois