HOWTO: Broadcast Messages Using NetMessageBufferSend() |
Q131458
The NetMessageBufferSend() API can be used to broadcast a message. To broadcast a copy a of a particular message to all workstations running messanger service in a particular domain, the LPWSTR msgname parameter needs to be specified as "DOMAINNAME*" - where DOMAINNAME is the name of the domain to which a message is to be sent. In this case, you can use the following piece of code to call this API:
#define UNICODE
#define MESGLEN 50
WCHAR awcToName[] = TEXT("DomainName*");
WCHAR awcFromName[] = Text("MyComputer");
WCHAR awcMesgBuffer[MESGLEN] = Text("This ia Test Message");
NET_API_STATUS nasStatus;
nasStatus = NetMessageBufferSend(NULL,
awcToName,
awcFromName,
awcMesgBuffer,
MESGLEN);
Additional query words:
Keywords : kbnetwork kbAPI kbOSWinNT350 kbOSWinNT351 kbSDKPlatform kbNetAPI kbGrpDSNet
Issue type : kbhowto
Technology : kbWin32SDKSearch kbAudDeveloper kbSDKSearch kbWin32sSearch kbWin32SDK350 kbWin32SDK351
|
Last Reviewed: January 8, 2000 © 2001 Microsoft Corporation. All rights reserved. Terms of Use. |