|
-
August 4th, 1999, 02:40 AM
#1
Sending message like Net Send command
Hi,
How can I read message (using code) arriving to a computer from another computer using the Net Send command.
I only know it uses mailslot, but what's its name ?
-
August 4th, 1999, 02:03 PM
#2
Re: Sending message like Net Send command
USES_CONVERSION;
CString sMessage;
sMessage.Format("This is a test message");
CString sMsgName = _T("EVERYONE");
LPCWSTR pszMessage = A2CW(sMessage);
DWORD dwLen = wcslen(pszMessage) * sizeof(WCHAR);
NET_API_STATUS nStatus;
nStatus = NetMessageNameAdd(NULL, A2CW(sMsgName));
nStatus = NetMessageBufferSend(NULL, A2CW(sMsgName), NULL, (LPBYTE)pszMessage, dwLen);
NetMessageNameDel(NULL, A2CW(sMsgName));
-
August 5th, 1999, 02:31 AM
#3
Re: Sending message like Net Send command
And for receiving arriving messages ?
-
February 15th, 2000, 09:36 AM
#4
Re: Sending message like Net Send command
I have tried this code and it works on my workstation but I am not able to send a message to another workstation.
I am trying to make use of the NetMessageNameAdd and NetMessageBufferSend commands. I want to specific want machine the message will be seen on but I don't see in the argument list how to specify that, how does one do that. The first argument in both functions is the server name and the notes state the string must start with \\ but when I place the name of my workstation there with the \\ it doesn't work. If I place the name of my workstation without the \\ it works...I don't understand.
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|