Ejemplo n.º 1
0
        public GpsDeviceState GetDeviceState()
        {
            GpsDeviceState device     = null;
            IntPtr         pGpsDevice = Utils.LocalAlloc(GpsDeviceState.GpssDeviceStructureSize);

            Marshal.WriteInt32(pGpsDevice, 1);
            Marshal.WriteInt32(pGpsDevice, 4, GpsDeviceState.GpsDeviceStructureSize);
            int result = GPSGetDeviceState(pGpsDevice);

            if (result == 0)
            {
                device = new GpsDeviceState(pGpsDevice);
            }
            Utils.LocalFree(pGpsDevice);
            return(device);
        }
 public DeviceStateChangedEventArgs(GpsDeviceState deviceState)
 {
     this.deviceState = deviceState;
 }
 public DeviceStateChangedEventArgs(GpsDeviceState deviceState)
 {
     this.deviceState = deviceState;
 }
Ejemplo n.º 4
0
 public GpsDeviceState GetDeviceState()
 {
     GpsDeviceState device = null;
     IntPtr pGpsDevice = Utils.LocalAlloc (GpsDeviceState.GpssDeviceStructureSize);
     Marshal.WriteInt32 (pGpsDevice, 1);
     Marshal.WriteInt32 (pGpsDevice, 4, GpsDeviceState.GpsDeviceStructureSize);
     int result = GPSGetDeviceState (pGpsDevice);
     if (result == 0) {
         device = new GpsDeviceState (pGpsDevice);
     }
     Utils.LocalFree (pGpsDevice);
     return device;
 }