i´m sorry, but i´ve done the changes, it doesn´t really work... - the
return code is 2273 ...do you know the return codes?
Public Class Form1
Dim ret As String
Private Declare Unicode Function NetMessageBufferSend Lib
"netapi32.dll" ( _
ByVal servername As String, _
ByVal msgname As String, _
ByVal fromname As String, _
ByVal msgbuf As String, _
ByVal msgbuflen As Int32 _
) As Int32
Private Sub Button1_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim strmessage As String = "testmessage..."
Const servername As String = vbNullString
ret = NetMessageBufferSend(servername, "testmsgname",
"fromname", strmessage, strmessage.Length * 2 + 2)
MsgBox(ret)
End Sub
End Class
On Sat, 22 Jan 2005 14:21:19 +0100, "Herfried K. Wagner [MVP]"
<hi***************@gmx.at> wrote:
"Thomas" <ei*@gmx.net> schrieb: thanks, it looks really good,but it doesn´t send any message... my
code is now(taken from your hint):
[...]
ret = NetMessageBufferSend("*",
The first parameter expects a server name. MSDN:
---
Pointer to a constant string that specifies the DNS or NetBIOS name of the
remote server on which the function is to execute. If this parameter is
'NULL', the local computer is used.
Windows NT: This string must begin with "\\".
---
If you want to use the local computer, pass 'vbNullString' to the first
parameter. Otherwise construct the server name as described above.