HOWTO: Broadcast Messages Using NetMessageBufferSend()

ID: 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 kbNTOS350 kbNTOS351 kbSDKPlatform kbNetAPI kbGrpNet
Version : WINDOWS:3.5,3.51
Platform : WINDOWS
Issue type : kbhowto


Last Reviewed: January 6, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.