Receive Multicast with Cancel and Error-Checking


Start the transfer with the Start Receive button. Cancel with the Cancel button. Start the receive file operation before starting the send file operation.

This demo will receive any file and store it in the directory specified by the %TEMP% environment variable. When the transfer is completed, a completion message will be displayed.

A message will be displayed when the transfer starts and when the transfer is completed. An error message will be displayed when the transfer request is made, when the transfer starts and is completed, and if the transfer is cancelled.

Note Make sure the IP address and port match the address and port of the server you want to listen to. This sample uses the following parameters:

This demo contains a function (ReturnError) that takes a number corresponding to an HRESULT error code and returns a corresponding error message string.