Microsoft KB Archive/131458

{|
 * width="100%"|

HOWTO: Broadcast Messages Using NetMessageBufferSend

 * }

Q131458

-

The information in this article applies to:


 * Microsoft Win32 Software Development Kit (SDK), versions 3.5, 3.51

-

SUMMARY
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