?
Solved

Send messages (using Netmessagebuffersend in Vb.net) to multiple people simultaneously.

Posted on 2004-10-13
21
Medium Priority
?
923 Views
Last Modified: 2008-01-16
Ok, what i want to accomplish is if a user selects multiple people in my listbox and types a message in the message box it sends that identical message to the selected people.  However, right now it only sends to the FIRST person they select.  Is this possible?  Here's my code below:

'declare variables
    Dim strUserID As String
    Dim msg As Byte()
    Dim rc As Integer
    Dim UserName As String = Environ("username")

    'According to Platform SDK, all string parameters are Unicode, so declare accordingly
    Declare Unicode Function NetMessageBufferSend Lib "netapi32.dll" ( _
        ByVal servername As String, _
        ByVal msgname As String, _
        ByVal fromname As String, _
        ByVal buf As Byte(), _
        ByVal len As UInt32) As Integer

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'add names to listbox
        ListBox1.Items.Add("Rita Behrens")
        ListBox1.Items.Add("Emmanuel Boudon")
        ListBox1.Items.Add("Tom Duch")
        ListBox1.Items.Add("Tony Hughes")
        ListBox1.Items.Add("Kerstin Kloesener")
        ListBox1.Items.Add("Roger Kolasinski")
        ListBox1.Items.Add("Bernie Kuhlmann")
        ListBox1.Items.Add("Aravinda Paladugu")
        ListBox1.Items.Add("Carol Petrone")
        ListBox1.Items.Add("Ray Poirier")
        ListBox1.Items.Add("Krishna Reddy")
        ListBox1.Items.Add("Jan Richter")
        ListBox1.Items.Add("Marcus Roewekamp")
        ListBox1.Items.Add("Stefan Schmidgall")
        ListBox1.Items.Add("Ed Seyler")
        ListBox1.Items.Add("Eric Soboslay")
        ListBox1.Items.Add("Martin Valach")
        ListBox1.Items.Add("Brian Walker")
        ListBox1.Items.Add("Dave Williams")
    End Sub

    Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged
        Select Case ListBox1.SelectedIndex
            Case 0
                strUserID = "behrri1"
            Case 1
                strUserID = "boudem1"
            Case 2
                strUserID = "duchto1"
            Case 3
                strUserID = "hughto1"
            Case 4
                strUserID = "kloeke1"
            Case 5
                strUserID = "kolaro1"
            Case 6
                strUserID = "kuhlbe1"
            Case 7
                strUserID = "palaar1"
            Case 8
                strUserID = "petrca1"
            Case 9
                strUserID = "poirra1"
            Case 10
                strUserID = "reddkr1"
            Case 11
                strUserID = "richja1"
            Case 12
                strUserID = "roewma1"
            Case 13
                strUserID = "schmst1"
            Case 14
                strUserID = "seyled1"
            Case 15
                strUserID = "soboer1"
            Case 16
                strUserID = "valama1"
            Case 17
                strUserID = "walkbr2"
            Case 18
                strUserID = "willda1"
        End Select
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        msg = System.Text.UnicodeEncoding.Unicode.GetBytes(TextBox1.Text)
        rc = NetMessageBufferSend(Nothing, strUserID, UserName, msg, Convert.ToUInt32(msg.Length))
        If rc = 0 Then
            MsgBox("Your Message was sent successfully")
        Else
            MsgBox("Could not find client.  Contact your Systems Administrator.")
        End If
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        End
    End Sub
End Class
0
Comment
Question by:lkingpinl
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 10
  • 9
21 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 12300192
You tell me, is it possible?  Does it run?  Do you get any errors?

Bob
0
 
LVL 2

Author Comment

by:lkingpinl
ID: 12300265
No, like I said, it only sends to the FIRST person I select in the list.  I want it to go to all persons that I select.  I get no errors. It takes the first selection, uses that as the case statement and executes the message to them.  It completely avoids the other selections.  As if they were never selected.

So you tell me, is it possible?  :)
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 12300494
Ok, now that I understand (misread the question), it is very possible:

  Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

    SendMessageToAllSelected()

  End Sub


  Private Sub SendMessageToAllSelected()

    For Each itemCurrent As String In Me.ListBox1.SelectedItems

      SendMessage(TextBox1.Text, itemCurrent)

    Next

  End Sub


  Private Sub SendMessage(ByVal messageText As String, ByVal userName As String)

    Dim strUserID As String = UserNameToUserID(userName)

    Dim bytMessage() As Byte = System.Text.UnicodeEncoding.Unicode.GetBytes(messageText)

    Dim rc As Integer = NetMessageBufferSend(Nothing, strUserID, userName, bytMessage, Convert.ToUInt32(messageText.Length))

    If rc = 0 Then
      MsgBox("Your Message was sent successfully")
    Else
      MsgBox("Could not find client.  Contact your Systems Administrator.")
    End If

  End Sub


  Private Function UserNameToUserID(ByVal userName As String) As String

    Dim strUserID As String = String.Empty

    Select Case userName

      Case "Rita Behrens"
        strUserID = "behrri1"

      Case "Emmanuel Boudon"
        strUserID = "boudem1"

      Case "Tom Duch"
        strUserID = "duchto1"

      Case "Tony Hughes"
        strUserID = "hughto1"

      Case "Kerstin Kloesener"
        strUserID = "kloeke1"

      Case "Roger Kolasinski"
        strUserID = "kolaro1"

      Case "Bernie Kuhlmann"
        strUserID = "kuhlbe1"

      Case "Aravinda Paladugu"
        strUserID = "palaar1"

      Case "Carol Petrone"
        strUserID = "petrca1"

      Case "Ray Poirier"
        strUserID = "poirra1"

      Case "Krishna Reddy"
        strUserID = "reddkr1"

      Case "Jan Richter"
        strUserID = "richja1"

      Case "Marcus Roewekamp"
        strUserID = "roewma1"

      Case "Stefan Schmidgall"
        strUserID = "schmst1"

      Case "Ed Seyler"
        strUserID = "seyled1"

      Case "Eric Soboslay"
        strUserID = "soboer1"

      Case "Martin Valach"
        strUserID = "valama1"

      Case "Brian Walker"
        strUserID = "walkbr2"

      Case "Dave Williams"
        strUserID = "willda1"

      Case Else
        Throw New ArgumentException("Invalid user name = " & userName)

    End Select

    Return strUserID

  End Function

Bob

   
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
LVL 2

Author Comment

by:lkingpinl
ID: 12300844
Still not working correctly.  I IMMEDIATELY get a "Could not find client" error (which is the error message I wrote in).  It comes so fast meaning it's not executing correctly.  I changed all the Case "(name here)" to case 0 - 18 and then I get an Application Error of "Invalid User Name = (first name selected)"

Any thoughts?

Here's my new code:

 'declare variables
    Dim strUserID As String
    Dim msg As Byte()
    Dim rc As Integer
    Dim UserName As String = Environ("username")

    'According to Platform SDK, all string parameters are Unicode, so declare accordingly
    Declare Unicode Function NetMessageBufferSend Lib "netapi32.dll" ( _
        ByVal servername As String, _
        ByVal msgname As String, _
        ByVal fromname As String, _
        ByVal buf As Byte(), _
        ByVal len As UInt32) As Integer

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'add names to listbox
        ListBox1.Items.Add("Rita Behrens")
        ListBox1.Items.Add("Emmanuel Boudon")
        ListBox1.Items.Add("Tom Duch")
        ListBox1.Items.Add("Tony Hughes")
        ListBox1.Items.Add("Kerstin Kloesener")
        ListBox1.Items.Add("Roger Kolasinski")
        ListBox1.Items.Add("Bernie Kuhlmann")
        ListBox1.Items.Add("Aravinda Paladugu")
        ListBox1.Items.Add("Carol Petrone")
        ListBox1.Items.Add("Ray Poirier")
        ListBox1.Items.Add("Krishna Reddy")
        ListBox1.Items.Add("Jan Richter")
        ListBox1.Items.Add("Marcus Roewekamp")
        ListBox1.Items.Add("Stefan Schmidgall")
        ListBox1.Items.Add("Ed Seyler")
        ListBox1.Items.Add("Eric Soboslay")
        ListBox1.Items.Add("Martin Valach")
        ListBox1.Items.Add("Brian Walker")
        ListBox1.Items.Add("Dave Williams")
    End Sub

    Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged
        Select Case ListBox1.SelectedIndex
            Case 0
                strUserID = "behrri1"
            Case 1
                strUserID = "boudem1"
            Case 2
                strUserID = "duchto1"
            Case 3
                strUserID = "hughto1"
            Case 4
                strUserID = "kloeke1"
            Case 5
                strUserID = "kolaro1"
            Case 6
                strUserID = "kuhlbe1"
            Case 7
                strUserID = "palaar1"
            Case 8
                strUserID = "petrca1"
            Case 9
                strUserID = "poirra1"
            Case 10
                strUserID = "reddkr1"
            Case 11
                strUserID = "richja1"
            Case 12
                strUserID = "roewma1"
            Case 13
                strUserID = "schmst1"
            Case 14
                strUserID = "seyled1"
            Case 15
                strUserID = "soboer1"
            Case 16
                strUserID = "valama1"
            Case 17
                strUserID = "walkbr2"
            Case 18
                strUserID = "willda1"
        End Select
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        SendMessageToAllSelected()

    End Sub


    Private Sub SendMessageToAllSelected()

        For Each itemCurrent As String In Me.ListBox1.SelectedItems

            SendMessage(TextBox1.Text, itemCurrent)

        Next

    End Sub


    Private Sub SendMessage(ByVal messageText As String, ByVal userName As String)

        Dim strUserID As String = UserNameToUserID(userName)

        Dim bytMessage() As Byte = System.Text.UnicodeEncoding.Unicode.GetBytes(messageText)

        Dim rc As Integer = NetMessageBufferSend(Nothing, strUserID, userName, bytMessage, Convert.ToUInt32(messageText.Length))

        If rc = 0 Then
            MsgBox("Your Message was sent successfully")
        Else
            MsgBox("Could not find client.  Contact your Systems Administrator.")
        End If

    End Sub


    Private Function UserNameToUserID(ByVal userName As String) As String

        Dim strUserID As String = String.Empty

        Select Case userName

            Case 0
                strUserID = "behrri1"

            Case 1
                strUserID = "boudem1"

            Case 2
                strUserID = "duchto1"

            Case 3
                strUserID = "hughto1"

            Case 4
                strUserID = "kloeke1"

            Case 5
                strUserID = "kolaro1"

            Case 6
                strUserID = "kuhlbe1"

            Case 7
                strUserID = "palaar1"

            Case 8
                strUserID = "petrca1"

            Case 9
                strUserID = "poirra1"

            Case 10
                strUserID = "reddkr1"

            Case 11
                strUserID = "richja1"

            Case 12
                strUserID = "roewma1"

            Case 13
                strUserID = "schmst1"

            Case 14
                strUserID = "seyled1"

            Case 15
                strUserID = "soboer1"

            Case 16
                strUserID = "valama1"

            Case 17
                strUserID = "walkbr2"

            Case 18
                strUserID = "willda1"

            Case Else
                Throw New ArgumentException("Invalid user name = " & userName)

        End Select

        Return strUserID

    End Function


    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        End
    End Sub
End Class
0
 
LVL 2

Author Comment

by:lkingpinl
ID: 12300857
upped amount of points to 200
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 12301351
What is the return value from the API call?

Bob
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 12301355
I thought that you said that it sent to only 1 person?  Now, it is that it won't send to anybody, right?

Bob
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 12301406
Error codes:
Const ERROR_ACCESS_DENIED = 5
Const ERROR_INVALID_PARAMETER = 87
Const ERROR_NOT_SUPPORTED = 50

Bob



0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 12301418
Also:

Dim rc As Integer = NetMessageBufferSend(String.Empty, strUserID, userName, bytMessage, Convert.ToUInt32(messageText.Length))
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 12301447
Also:

Private Function GetNetSendMessageStatus(nError As Integer) As String
   
Const ERROR_ACCESS_DENIED As Integer= 5
Const ERROR_BAD_NETPATH As Integer= 53
Const ERROR_INVALID_PARAMETER As Integer= 87
Const ERROR_NOT_SUPPORTED As Integer= 50
Const ERROR_INVALID_NAME As Integer= 123
Const NERR_BASE As Integer= 2100
Const NERR_Success As Integer= 0               'success
Const NERR_NetworkError As Integer= (NERR_BASE + 36)   'general network error occurred.
Const NERR_NameNotFound As Integer= (NERR_BASE + 173)  'message alias could not be found on the network.
Const NERR_UseNotFound As Integer= (NERR_BASE + 150)   'network connection could not be found.

Dim msg As String
   
   Select Case nError
   
     Case NERR_Success:            msg = "The message was successfully sent."
     Case NERR_NameNotFound:       msg = "Send To: user or workstation was not found."
     Case NERR_NetworkError:       msg = "A general network error occurred."
     Case NERR_UseNotFound:        msg = "The network connection could not be found."
     
     Case ERROR_ACCESS_DENIED:     msg = "Access to the computer denied."
     Case ERROR_BAD_NETPATH:       msg = "Sent From: server name was not found."
     Case ERROR_INVALID_PARAMETER: msg = "Invalid parameter(s) have been specified."
     Case ERROR_NOT_SUPPORTED:     msg = "Network request not supported."
     Case ERROR_INVALID_NAME:      msg = "Illegal character or malformed name."

     Case Else:                    msg = "Unknown error executing command."
     
   End Select
   
   Return msg
   
End Function

Bob
0
 
LVL 2

Author Comment

by:lkingpinl
ID: 12301537
An unhandled exception of type 'System.ArgumentException' occurred in InstantMessaging.exe

Additional information: Invalid user name = Martin Valach

That is what I get when I use the code shown in my last post.  It highlights the End Select statement.  
0
 
LVL 2

Author Comment

by:lkingpinl
ID: 12337999
i've added the code you put here, and still get the same error.

An unhandled exception of type 'System.ArgumentException' occurred in InstantMessaging.exe

Additional information: Invalid user name = Brian Walker (highest selected name in the list)

Any ideas?
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 12338663
I think that you might be mixing my code with yours.  Can you show me the complete set?

Bob
0
 
LVL 2

Author Comment

by:lkingpinl
ID: 12340051
Here you go:

    'declare variables
    Dim strUserID As String
    Dim msg As Byte()
    Dim rc As Integer
    Dim UserName As String = Environ("username")

    'According to Platform SDK, all string parameters are Unicode, so declare accordingly
    Declare Unicode Function NetMessageBufferSend Lib "netapi32.dll" ( _
        ByVal servername As String, _
        ByVal msgname As String, _
        ByVal fromname As String, _
        ByVal buf As Byte(), _
        ByVal len As UInt32) As Integer

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'add names to listbox
        ListBox1.Items.Add("Rita Behrens")
        ListBox1.Items.Add("Emmanuel Boudon")
        ListBox1.Items.Add("Tom Duch")
        ListBox1.Items.Add("Tony Hughes")
        ListBox1.Items.Add("Kerstin Kloesener")
        ListBox1.Items.Add("Roger Kolasinski")
        ListBox1.Items.Add("Bernie Kuhlmann")
        ListBox1.Items.Add("Aravinda Paladugu")
        ListBox1.Items.Add("Carol Petrone")
        ListBox1.Items.Add("Ray Poirier")
        ListBox1.Items.Add("Krishna Reddy")
        ListBox1.Items.Add("Jan Richter")
        ListBox1.Items.Add("Marcus Roewekamp")
        ListBox1.Items.Add("Stefan Schmidgall")
        ListBox1.Items.Add("Ed Seyler")
        ListBox1.Items.Add("Eric Soboslay")
        ListBox1.Items.Add("Martin Valach")
        ListBox1.Items.Add("Brian Walker")
        ListBox1.Items.Add("Dave Williams")
    End Sub

    Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged
        Select Case ListBox1.SelectedIndex
            Case 0
                strUserID = "behrri1"
            Case 1
                strUserID = "boudem1"
            Case 2
                strUserID = "duchto1"
            Case 3
                strUserID = "hughto1"
            Case 4
                strUserID = "kloeke1"
            Case 5
                strUserID = "kolaro1"
            Case 6
                strUserID = "kuhlbe1"
            Case 7
                strUserID = "palaar1"
            Case 8
                strUserID = "petrca1"
            Case 9
                strUserID = "poirra1"
            Case 10
                strUserID = "reddkr1"
            Case 11
                strUserID = "richja1"
            Case 12
                strUserID = "roewma1"
            Case 13
                strUserID = "schmst1"
            Case 14
                strUserID = "seyled1"
            Case 15
                strUserID = "soboer1"
            Case 16
                strUserID = "valama1"
            Case 17
                strUserID = "walkbr2"
            Case 18
                strUserID = "willda1"
        End Select
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        SendMessageToAllSelected()

    End Sub


    Private Sub SendMessageToAllSelected()

        For Each itemCurrent As String In Me.ListBox1.SelectedItems

            SendMessage(TextBox1.Text, itemCurrent)

        Next

    End Sub


    Private Sub SendMessage(ByVal messageText As String, ByVal userName As String)

        Dim strUserID As String = UserNameToUserID(userName)

        Dim bytMessage() As Byte = System.Text.UnicodeEncoding.Unicode.GetBytes(messageText)

        Dim rc As Integer = NetMessageBufferSend(String.Empty, strUserID, userName, bytMessage, Convert.ToUInt32(messageText.Length))

        If rc = 0 Then
            MsgBox("Your Message was sent successfully")
        Else
            MsgBox("Could not find client.  Contact your Systems Administrator.")
        End If

    End Sub

    Private Function GetNetSendMessageStatus(ByVal nError As Integer) As String

        Const ERROR_ACCESS_DENIED As Integer = 5
        Const ERROR_BAD_NETPATH As Integer = 53
        Const ERROR_INVALID_PARAMETER As Integer = 87
        Const ERROR_NOT_SUPPORTED As Integer = 50
        Const ERROR_INVALID_NAME As Integer = 123
        Const NERR_BASE As Integer = 2100
        Const NERR_Success As Integer = 0              'success
        Const NERR_NetworkError As Integer = (NERR_BASE + 36)  'general network error occurred.
        Const NERR_NameNotFound As Integer = (NERR_BASE + 173) 'message alias could not be found on the network.
        Const NERR_UseNotFound As Integer = (NERR_BASE + 150)  'network connection could not be found.

        Dim msg As String

        Select Case nError

            Case NERR_Success : msg = "The message was successfully sent."
            Case NERR_NameNotFound : msg = "Send To: user or workstation was not found."
            Case NERR_NetworkError : msg = "A general network error occurred."
            Case NERR_UseNotFound : msg = "The network connection could not be found."

            Case ERROR_ACCESS_DENIED : msg = "Access to the computer denied."
            Case ERROR_BAD_NETPATH : msg = "Sent From: server name was not found."
            Case ERROR_INVALID_PARAMETER : msg = "Invalid parameter(s) have been specified."
            Case ERROR_NOT_SUPPORTED : msg = "Network request not supported."
            Case ERROR_INVALID_NAME : msg = "Illegal character or malformed name."

            Case Else : msg = "Unknown error executing command."

        End Select

        Return msg

    End Function

    Private Function UserNameToUserID(ByVal userName As String) As String

        Dim strUserID As String = String.Empty

        Select Case userName

            Case 0
                strUserID = "behrri1"

            Case 1
                strUserID = "boudem1"

            Case 2
                strUserID = "duchto1"

            Case 3
                strUserID = "hughto1"

            Case 4
                strUserID = "kloeke1"

            Case 5
                strUserID = "kolaro1"

            Case 6
                strUserID = "kuhlbe1"

            Case 7
                strUserID = "palaar1"

            Case 8
                strUserID = "petrca1"

            Case 9
                strUserID = "poirra1"

            Case 10
                strUserID = "reddkr1"

            Case 11
                strUserID = "richja1"

            Case 12
                strUserID = "roewma1"

            Case 13
                strUserID = "schmst1"

            Case 14
                strUserID = "seyled1"

            Case 15
                strUserID = "soboer1"

            Case 16
                strUserID = "valama1"

            Case 17
                strUserID = "walkbr2"

            Case 18
                strUserID = "willda1"

            Case Else
                Throw New ArgumentException("Invalid user name = " & userName)

        End Select

        Return strUserID

    End Function


    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        End
    End Sub
End Class
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 12352026
Sorry for the delay:

Private Function UserNameToUserID(ByVal userName As String) As String

    Dim strUserID As String = String.Empty

    Select Case userName

      Case "Rita Behrens"
        strUserID = "behrri1"

      Case "Emmanuel Boudon"
        strUserID = "boudem1"

      Case "Tom Duch"
        strUserID = "duchto1"

      Case "Tony Hughes"
        strUserID = "hughto1"

      Case "Kerstin Kloesener"
        strUserID = "kloeke1"

      Case "Roger Kolasinski"
        strUserID = "kolaro1"

      Case "Bernie Kuhlmann"
        strUserID = "kuhlbe1"

      Case "Aravinda Paladugu"
        strUserID = "palaar1"

      Case "Carol Petrone"
        strUserID = "petrca1"

      Case "Ray Poirier"
        strUserID = "poirra1"

      Case "Krishna Reddy"
        strUserID = "reddkr1"

      Case "Jan Richter"
        strUserID = "richja1"

      Case "Marcus Roewekamp"
        strUserID = "roewma1"

      Case "Stefan Schmidgall"
        strUserID = "schmst1"

      Case "Ed Seyler"
        strUserID = "seyled1"

      Case "Eric Soboslay"
        strUserID = "soboer1"

      Case "Martin Valach"
        strUserID = "valama1"

      Case "Brian Walker"
        strUserID = "walkbr2"

      Case "Dave Williams"
        strUserID = "willda1"

      Case Else
        Throw New ArgumentException("Invalid user name = " & userName)

    End Select

    Return strUserID

  End Function

Bob
0
 
LVL 2

Author Comment

by:lkingpinl
ID: 12361621
I get an immediate "Could not find client.  Contact you Administrator."
0
 
LVL 2

Author Comment

by:lkingpinl
ID: 12361671
Whether I choose one person or more than one person I get that message.  It happens immediately, which tells me it is not excuting the send message properly.  In my original code I would get that message after about 15 seconds.  it usually meant the user's messenger service needs to be restarted.  

But with this code, no messages get sent at all.
0
 
LVL 96

Accepted Solution

by:
Bob Learned earned 600 total points
ID: 12361687
Use GetNetSendMessageStatus to get the real error message from the return code.

Dim errorMessage As String = GetNetSendMessageStatus(rc)

Bob
0
 
LVL 2

Author Comment

by:lkingpinl
ID: 12369607
No real error message appears.  I get the same thing.  I'm all confused....  ;)
0

Featured Post

What is a Denial of Service (DoS)?

A DoS is a malicious attempt to prevent the normal operation of a computer system. You may frequently see the terms 'DDoS' (Distributed Denial of Service) and 'DoS' used interchangeably, but there are some subtle differences.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question