Results 1 to 2 of 2

Thread: Windows NT Broadcast Message problem

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2001
    Location
    South Australia
    Posts
    3

    Unhappy 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?

  2. #2
    Lively Member
    Join Date
    Aug 2001
    Location
    Crossroads of America
    Posts
    72
    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
  •  



Click Here to Expand Forum to Full Width