mfc >> My app calling API NetMessageBufferSend doesn't work recently!

by David » Wed, 03 Dec 2003 15:46:37 GMT

Hi,
I have an API call problem in VC6 to ask you for help.
I wrote a LAN application to send pop up message between PCs in LAN as
command "net send" does.
I called Platform SDK API NetMessageBufferSend in my VC program:

......
success = NetMessageBufferSend(
NULL, //pszServerName,
wszMsgTo,
wszMsgFrom,
(LPBYTE)wszMsg,
dwLen*2);
......

The wszMsgTo parameter is an unicode string for string such as
"192.168.0.x".

In fact, it worked fine some days ago while it fails to send message now.
The return value "success" is 2273 NERR_NameNotFound. To my surprise, now,
Windows command "Net Send" still works fine as it did.

So, my question is, why my app which calls this API doesn't work now?
Doesn't "Net Send" call that API?
Our NT domain has not any changes recently. The only change is that the
number of our LAN client grows from about 40
to about 70.

Any ideas? Thanks in advance.

David




Similar Threads

1. Advanced API & C++ Using NetMessageBufferSend

Greetings,

I have been banging my head into this for hours now, and I'm not
getting anywhere...

I have written a system service that on certain conditions must send
messages to other users on the network.

Similar to the old:
net send * This Message command.

I have been trying to get NetMessageBufferSend to work, and am having
NO luck at all and can't run a conventional debugger, 'cause of the
services status of the code.

Please, can someone give me a pointer or two?  Example code?
MSDN is NO help...

Roughly, this is what I have tried to use:

	WCHAR netTo[128];
	char netMsg[256];

	wcscpy(netTo,L"Pentium1000");
	strcpy(netMsg,"Message Here.");
	NetMessageBufferSend(NULL, netTo, NULL,
		 (unsigned char)netMsg, strlen(netMsg));

Thanks for any input!

Greg





Dr. Know

2. some api doesn't work - Windows CE

3. Call NetMessageBufferSend from a c# service return 2273 error

Hi,

I have a service made in csharp language and I try to send message to 
network computer with the NetMessageBufferSend.
Here's the import of the function :
[DllImport("netapi32.dll",CharSet=CharSet.Unicode,ExactSpelling=false, 
SetLastError=true)]
  static extern int NetMessageBufferSend(
   /*[MarshalAs(UnmanagedType.LPWStr)] */string servername,
   /*[MarshalAs(UnmanagedType.LPWStr)] */string msgname,
   /*[MarshalAs(UnmanagedType.LPWStr)] */string fromname,
   /*[MarshalAs(UnmanagedType.LPWStr)] */string buf,
   int buflen);

The call failed with the 2273 return code "Alias not found on the network", 
but if I use the net send in a command window, I can send the message. I 
tried to change the service account with "local system" or a "domain admin", 
but I failed too.

It seems that it is a right problem, but I can't find it.


4. StandardOutput.ReadLine() doesn't work until the app exits??? - CSharp/C#

5. TAB Key doesn't work in my DLL dialog app

I created a dialog based application in a DLL.

When I run my dialog, I can not Tab between items.  Basically the Tab
key doesn't do anything.

Is there a fix to this.... am I missing some option somewhere in MFC?

6. std::cout doesn't work in windows qt app

7. Why doesn't "checked" work for sub calls?

Dear Members
Hi,
I have a question:
Why doesn't "checked" work for sub calls? For example consider the
following snippet of code:

checked
{
	Overflower();
}

void 	Overflower()
{
	int t=int.MaxValue;
	t++;
}

Why Overflower doesn't throw overflow exception?

8. c# Problem: Call to GetDiskFreeSpaceExA API not Working!! - CSharp/C#