Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. sending a message from one machine to the other in LAN ......

sending a message from one machine to the other in LAN ......

Scheduled Pinned Locked Moved Visual Basic
linuxhelpquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mohan G
    wrote on last edited by
    #1

    hello to all i am using this code to send a message from my system (sys 1) to the other system (sys 2). its working fine..... for this i need to use APIs. but i want to send a message using the shell command. can any body give the exact syntax for it ?. next one ... is there any way to know in/from the sencond system (sys 2) ( ... to which i am sending the message ) that it has got the message when ever i send a message to sys 2 ?. so that i can show a popup (just like msn messenger do) or play some sound when ever sys 2 gets a message from sys 1. here is the code ... Private Declare Function NetMessageBufferSend Lib "NETAPI32.DLL" (yServer As Any, yToName As Byte, yFromName As Any, yMsg As Byte, ByVal lSize As Long) As Long Private Const NERR_Success As Long = 0& Public Function BroadcastMessage(sToUser As String, sFromUser As String, sMessage As String) As Boolean Dim yToName() As Byte Dim yFromName() As Byte Dim yMsg() As Byte Dim l As Long yToName = sToUser & vbNullChar yFromName = sFromUser & vbNullChar yMsg = sMessage & vbNullChar If NetMessageBufferSend(ByVal 0&, yToName(0), ByVal 0&, _ yMsg(0), UBound(yMsg)) = NERR_Success Then BroadcastMessage = True End If End Function Private Sub Command1_Click() Dim x As Boolean x = BroadcastMessage(TxtTo.Text, TxtFrom.Text, TxtMsg.Text) If x Then MsgBox "Message Sent" Else MsgBox "Message Not Sent" End If End Sub any body please help me Mohan G

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups