I tried to make the program in the Windows API section of this site that describes how to make a Windows NT messenger. I couldn't get it to work despite passing three arguments like it explained. Can anyone help me?
Printable View
I tried to make the program in the Windows API section of this site that describes how to make a Windows NT messenger. I couldn't get it to work despite passing three arguments like it explained. Can anyone help me?
This is a section of code that I use to send a windows broadcast message:
*** Declaration ***
Public Declare Function NetMessageBufferSend Lib "netapi32" _
(ByVal servername As String, _
ByVal msgname As String, _
ByVal fromname As String, _
ByVal msgbuf As String, _
ByRef msgbuflen As Long) As Long
*** Code segment ***
Dim lRet As Long, toMach As String, frMach As String, _
strMsg As String, lenMsg As Long
toMach = "NHO-C1"
frMach = "NHO-C3"
strMsg = txtMsg
toMach = StrConv(toMach, vbUnicode)
frMach = StrConv(frMach, vbUnicode)
strMsg = StrConv(strMsg, vbUnicode)
lenMsg = Len(strMsg)
lRet = NetMessageBufferSend(frMach, toMach, frMach, strMsg, ByVal lenMsg)
If this doesn't answer your problem, can you post your code?