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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Net Send or NetMessageBufferSend equivalent?

Status
Not open for further replies.

caf

Programmer
Sep 19, 2000
124
ZA
Hi all

Is there a .NET Framework equivalent to using the NetMessageBufferSend api call?

If not, I've been trying to use NetMessageBufferSend but the examples either use [blue]Bytes[/blue] or [blue]Any[/blue] as arguments.
I'd appreciate it if someone could show me some code on how to make this work.

Until such time, I'll use the Process class to start net.exe and pass commandline arguments. [thumbsdown]

PS: Using Bytes or Any works well in VB6. I have no problems using it there. As soon as I port the code to VB.NET and use Object or string, it doesn't budge.
 
I usually just cycle through an array of User Id's and use the following line to send network messages:

For x = 0 To Ubound(aryUsers)
Call Shell(Environ$("COMSPEC") & " /c NET SEND " & aryUsers(x) & " " & txtMessage.Text, vbHide)
Next x

Hope this works for you.

Shane
 
Thanx for replying

Your solution is exactly what I've implemented (only through the use of the Process class - which sort of allows you more control over the process you've started than what the tried and trusted old Shell command does.)

I'm looking for the customi(s/z)ation allowed by the NetMessageBufferSend Api call. For instance, you can specify the sender and not rely on the sometimes cryptic "Message from ComputerName to ComputerName"

Any ideas appreciated! :)

Thank You
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top