Sample Virtual Interface Walk-through

[This is preliminary documentation and subject to change.]

The following steps briefly describe creation, use, and destruction for the Mc_out.dll sample. The Mc_out.dll functions mentioned in this section are described in greater detail in Virtual Interface Functions.

  1. At run time, the MMR loads Mc_out.dll with an output loader and retrieves the address of each exported function of the DLL. The MMR then calls the msbdnOutputCreate function and specifies the version of the required output system so it can retrieve details of the specific virtual interface implementation. The msbdnOutputCreate function then connects to the appropriate output system with specific options obtained from the virtual interface's configuration and configures the output system. The msbdnOutputCreate function calls the WinSock socket function to create a socket that uses UDP for the Internet address family and then calls the WinSock bind function to bind a local address to such a socket. If the socket could not be bound to a UDP/IP port, msbdnOutputCreate calls the msbdnBridgeReportEvent function and passes the EVENTLOG_ERROR_TYPE error type and the error code provided by WinSock to inform the MMR to record the error directly in the system event log.
  2. When the MMR requires dynamic values of the virtual interface's configuration, it calls the msbdnOutputGetValueCount and msbdnOutputGetValue functions.
  3. When the MMR assigns a dynamic value to a virtual interface's configuration, it calls the msbdnOutputSetValue function.
  4. When the MMR has data to send, it calls the msbdnOutputSendPacket function to send a packet of a data stream to the output system. After msbdnOutputSendPacket has finished processing the packet, it informs the MMR by calling the PacketBufferComplete function and provides status on the completed packet.
  5. Before exiting, the MMR calls the msbdnOutputDestroy function to stop all data transmissions and free all resources that the virtual interface allocated.