TIA-
You can use the NetMessageBufferSend API via PInvoke to implement Net Send
command for your application. You can try this:
[DllImport("netapi32.dll", CharSet=CharSet.Unicode)]
public static extern int NetMessageBufferSend( string serverName, string
msgName, string fromName, string buf, int bufLen)
enum NET_API_STATUS
{
NERR_Success = 0,
ERROR_ACCESS_DENIED = 5,
ERROR_INVALID_PARAMETER = 87,
ERROR_NOT_SUPPORTED = 50,
NERR_NetworkError = 2136,
NERR_NameNotFound = 2273
//
// For a complete list, please check lmerr.h
//
}
Alternatively, you can use the "net send" command as the following example
application does:
Windows Messenger like GUI for net send command (By Sunil TG)
http://www.codeproject.com/csharp/dotnetsenders.asp
It writes the "net send ..." commands into a .BAT file, and then execute
the BAT file with the Process class.
Hope this helps.
Regards,
Felix Wu
=============
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>From: "stever" <sklett_20...@yahoo.com>
>Subject: Using Net Send from my application
>Date: Thu, 5 Dec 2002 16:17:59 -0800
>Lines: 8
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
>Message-ID: <e#c0z1LnCHA.2404@TK2MSFTNGP10>
>Newsgroups: microsoft.public.dotnet.languages.csharp
>NNTP-Posting-Host: bdsl.66.13.180.45.gte.net 66.13.180.45
>Path: cpmsftngxa06!tkmsftngp01!TK2MSFTNGP10
>Xref: cpmsftngxa06 microsoft.public.dotnet.languages.csharp:114228
>X-Tomcat-NG: microsoft.public.dotnet.languages.csharp