예제 #1
0
            protected override ReturnValue InternalInvoke(IntPtr hSimConnect)
            {
                // hSimConnect should be zero for when calling open.'
                IntPtr retHSimConnect;
                int    hr = SimConnectNative.Open(out retHSimConnect, szName, IntPtr.Zero, 0, IntPtr.Zero, 0);

                return(new ReturnValue.Open(hr, retHSimConnect));
            }
예제 #2
0
            protected override ReturnValue InternalInvoke(IntPtr hSimConnect)
            {
                IntPtr pData = IntPtr.Zero;

                byte [] data   = null;
                uint    cbData = 0;

                var hr = SimConnectNative.GetNextDispatch(hSimConnect, ref pData, ref cbData);

                if (hr >= 0)
                {
                    data = new byte [cbData];
                    Marshal.Copy(pData, data, 0, (int)cbData);
                }

                return(new ReturnValue.GetNextDispatch(hr, data, cbData));
            }
예제 #3
0
 protected override ReturnValue InternalInvoke(IntPtr hSimConnect)
 {
     return(new ReturnValue(SimConnectNative.AddClientEventToNotificationGroup(hSimConnect, groupId, eventId, bMaskable)));
 }
예제 #4
0
 protected override ReturnValue InternalInvoke(IntPtr hSimConnect)
 {
     return(new ReturnValue(SimConnectNative.MapClientEventToSimEvent(hSimConnect, Convert.ToUInt32(eventId), eventName)));
 }
예제 #5
0
 protected override ReturnValue InternalInvoke(IntPtr hSimConnect)
 {
     return(new ReturnValue(SimConnectNative.TransmitClientEvent(hSimConnect, objectId, eventId, dwData, groupId, flags)));
 }
예제 #6
0
 protected override ReturnValue InternalInvoke(IntPtr hSimConnect)
 {
     return(new ReturnValue(SimConnectNative.RequestDataOnSimObject(hSimConnect, requestId, defineId, objectId, period, flags, origin, interval, limit)));
 }
예제 #7
0
 protected override ReturnValue InternalInvoke(IntPtr hSimConnect)
 {
     return(new ReturnValue(SimConnectNative.AddToDataDefinition(hSimConnect, defineId, datumName, unitsName, datumType, fEpsilon, datumId)));
 }
예제 #8
0
 protected override ReturnValue InternalInvoke(IntPtr hSimConnect)
 {
     return(new ReturnValue(SimConnectNative.SetNotificationGroupPriority(hSimConnect, groupId, priority)));
 }