|
|
|
|
|
Dicas
|
|
Visual Basic (Redes/Comunicações)
|
|
|
Título da Dica: Enviando mensagens de rede no padrão WinPopup
|
|
|
|
Postada em 7/10/2003 por ^HEAVY-METAL^
Private Declare Function NetMessageBufferSend Lib _ "NETAPI32.DLL" (yServer As Any, yToName As Byte, _ yFromName As Any, yMsg As Byte, ByVal lSize As Long) As Long
Private Const NERR_Success As Long = 0&
Public Function BroadcastMessage(sToUser As String, _ sFromUser As String, sMessage As String) As Boolean Dim yToName() As Byte Dim yFromName() As Byte Dim yMsg() As Byte Dim l As Long
yToName = sToUser & vbNullChar yFromName = sFromUser & vbNullChar yMsg = sMessage & vbNullChar
If NetMessageBufferSend(ByVal 0&, yToName(0), ByVal 0&, _ yMsg(0), UBound(yMsg)) = NERR_Success Then BroadcastMessage = True
End If
End Function
T+,
|
|
|
|
|