|
-
Aug 29th, 2001, 08:38 AM
#1
Thread Starter
New Member
Windows NT Broadcast Message problem
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?
-
Aug 29th, 2001, 12:35 PM
#2
Lively Member
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?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|