示例#1
0
        void sc_OnRecvOpen(SimConnect sender, SIMCONNECT_RECV_OPEN data)
        {
            // setup incoming request area for API 1 and setup recurring Request
            sender.CreateClientData(typeof(HostAPI1));
            sender.RequestClientData(Requests.HostAPI1, SIMCONNECT_CLIENT_DATA_PERIOD.ON_SET, typeof(HostAPI1));

            // setup regular response area for API1
            sender.CreateClientData(typeof(HostResponse1));
            // setup exception response area for API1
            sender.CreateClientData(typeof(HostException1));

            // setup read-only data structure for API 2
            sender.CreateClientData(typeof(HostAPI2));
        }