Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I send NT messages in VB

Status
Not open for further replies.

BigViper

Programmer
Sep 25, 2001
3
0
0
US
How can I use a reference to NetApi32.dll to send a popup message to another computer on an NT network. It would also be nice if I could change the sender name. I have already messaged using Net.exe, but it only works on a floppy, and I don't like it.
 
Not sure about the API call, but you could just use the NET SEND command to send the message. You can use the Shell command to call it, or create a batch file with your series of NET SEND commands and run the batch file.

I use the batch file method but would also like to know how to access that directly from the API. Maybe this could help you in the meantime.
Code:
Dim ret

Open ("C:\Temp\SndMsg.bat") For Output As #1
  Print #1,"net send user1 this is the message for user1"
  Print #1,"net send user2 this is the message for user2"
Close #1

ret = Shell("C:\Temp\SndMsg.bat", vbMaximizedFocus)
 
NetApi32.dll works, but only if I set the from to the computer I am on. I want to send messages to people so that they don't know they came from me. I am a user of the network not admin. I get a name_not_found error if I try to use a different from name. Can anyone help me.
 
There are only a few reasons why you would want to send an anonymous message. Come back to the light side of the force Luke. :D
 
I am not a hacker.

I am in a high school and I like to send messages to people when we are in a computer lab. The problem is that the message has my computer name on it so the resipient know where the message came from. I don't want them to know it came from me.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top