 |
developer.garmin.com Garmin Developer Forum
|
| View previous topic :: View next topic |
| Author |
Message |
mingodad
Joined: 10 Sep 2009 Posts: 3
|
Posted: Thu Sep 10, 2009 8:35 am Post subject: I'm getting queErrInvalidVersion |
|
|
I'm getting queErrInvalidVersion on my test application running on wince mobile 6 with Garmin Mobile XT 4.20.10wp.
Isn't the sdk supposed to work with it too ? |
|
| Back to top |
|
 |
mingodad
Joined: 10 Sep 2009 Posts: 3
|
Posted: Thu Sep 10, 2009 8:46 am Post subject: I'm translating the garmin API to freepascal |
|
|
[code:1:ed0dfc23ec]
{
Automatically converted by H2Pas 1.0.0 from QueApiTypes.h
The following command line parameters were used:
QueApiTypes.h
}
{$IFDEF FPC}
{$PACKRECORDS C}
{$ENDIF}
{*****************************************************************************
*
* HEADER NAME:
* QueApiTypes.h
*
* DESCRIPTION:
* Types for the Application Program Interface to the Que technology
*
* Copyright 2004-2007 by Garmin Ltd. or its subsidiaries.
*
***************************************************************************** }
{-----------------------------------------------------------------------------
GENERAL INCLUDES
----------------------------------------------------------------------------- }
{-----------------------------------------------------------------------------
LITERAL CONSTANTS
----------------------------------------------------------------------------- }
const
QUE_ADDR_BUF_LENGTH = 50;
QUE_POST_BUF_LENGTH = 11;
{-----------------------------------------------------------------------------
TYPES
----------------------------------------------------------------------------- }
{----------------------------------------------------------
Que API Result Codes
---------------------------------------------------------- }
type
QueErrT16 = uint16;
QueErrEnum = (
queErrNone = 0, (* Success *)
queErrNotOpen = firstQueAPIErr, (* Close() without having called open() first *)
queErrBadArg, (* Invalid parameter passed to function *)
queErrMemory, (* Out of memory *)
queErrNoData, (* No data available *)
queErrAlreadyOpen,(* The Que API is already open *)
queErrInvalidVersion,(* The Que API is an incompatible version *)
queErrComm, (* There was an error communicating with the API *)
queErrCmndUnavail,(* The command is unavailable *)
queErrStillOpen,(* Library is still open *)
queErrFail, (* General failure *)
queErrCancel, (* Action cancelled by user *)
queErrRelaunchNeeded(* Relaunch needed to load the libraries *)
);
{----------------------------------------------------------
Que Time Types
---------------------------------------------------------- }
const
queTimeInvalid = $FFFFFFFF;
{ Garmin Time. Seconds since (TODO) }
type
PQueGarminTimeT32 = ^QueGarminTimeT32;
QueGarminTimeT32 = uint32;
{----------------------------------------------------------
Que Sun/Moon Rise and Set Data Type
---------------------------------------------------------- }
PQueRiseSetType = ^QueRiseSetType;
QueRiseSetType = record
rise: QueGarminTimeT32;(* Rise time *)
settime: QueGarminTimeT32;(* Set time *)
isDay: uint8;(* Non-zero if day, zero if night *)
end;
{----------------------------------------------------------
Que Point Types
---------------------------------------------------------- }
const
queInvalidSemicircles = $80000000;
queInvalidAltitude = 1.0e25;
queInvalidPointHandle = nil;
quePointIdLen = 25;
queInvalidSymbol = $FFFF;
type
PQuePositionDataType = ^QuePositionDataType;
QuePositionDataType = record
lat: sint32;{ Latitude (semicircles) }
lon: sint32;{ Longitude (semicircles) }
altMSL: single;{ Altitude above mean sea level (meters) }
end;
PQuePointHandle = ^QuePointHandle;
QuePointHandle = uint32;
QueSymbolT16 = uint16;
QueSymbolEnum = (
(*-----------------------------------------------------------
The symbol type is used to indicate the symbol for a waypoint.
Please refer to "Garmin GPS Interface Specification" section 7.4.9
-----------------------------------------------------------*)
(*---------------------------------------------------------------
Symbols for marine (group 0...0-8191...bits 15-13=000).
---------------------------------------------------------------*)
SYM_ANCHOR = 0, (* white anchor symbol *)
SYM_BELL = 1, (* white bell symbol *)
SYM_DIAMOND_GRN = 2,(* green diamond symbol *)
SYM_DIAMOND_RED = 3,(* red diamond symbol *)
SYM_DIVE1 = 4, (* diver down flag 1 *)
SYM_DIVE2 = 5, (* diver down flag 2 *)
SYM_DOLLAR = 6, (* white dollar symbol *)
SYM_FISH = 7, (* white fish symbol *)
SYM_FUEL = 8, (* white fuel symbol *)
SYM_HORN = 9, (* white horn symbol *)
SYM_HOUSE = 10, (* white house symbol *)
SYM_KNIFE = 11, (* white knife & fork symbol *)
SYM_LIGHT = 12, (* white light symbol *)
SYM_MUG = 13, (* white mug symbol *)
SYM_SKULL = 14, (* white skull and crossbones symbol*)
SYM_SQUARE_GRN = 15,(* green square symbol *)
SYM_SQUARE_RED = 16,(* red square symbol *)
SYM_WBUOY = 17, (* white buoy waypoint symbol *)
SYM_WPT_DOT = 18,(* waypoint dot *)
SYM_WRECK = 19, (* white wreck symbol *)
SYM_NULL = 20, (* null symbol (transparent) *)
SYM_MOB = 21, (* man overboard symbol *)
(*------------------------------------------------------
marine navaid symbols
------------------------------------------------------*)
SYM_BUOY_AMBR = 22,(* amber map buoy symbol *)
SYM_BUOY_BLCK = 23,(* black map buoy symbol *)
SYM_BUOY_BLUE = 24,(* blue map buoy symbol *)
SYM_BUOY_GRN = 25,(* green map buoy symbol *)
SYM_BUOY_GRN_RED = 26,(* green/red map buoy symbol *)
SYM_BUOY_GRN_WHT = 27,(* green/white map buoy symbol *)
SYM_BUOY_ORNG = 28,(* orange map buoy symbol *)
SYM_BUOY_RED = 29,(* red map buoy symbol *)
SYM_BUOY_RED_GRN = 30,(* red/green map buoy symbol *)
SYM_BUOY_RED_WHT = 31,(* red/white map buoy symbol *)
SYM_BUOY_VIOLET = 32,(* violet map buoy symbol *)
SYM_BUOY_WHT = 33,(* white map buoy symbol *)
SYM_BUOY_WHT_GRN = 34,(* white/green map buoy symbol *)
SYM_BUOY_WHT_RED = 35,(* white/red map buoy symbol *)
SYM_DOT = 36, (* white dot symbol *)
SYM_RBCN = 37,(* radio beacon symbol *)
(*------------------------------------------------------
leave space for more navaids (up to 128 total)
------------------------------------------------------*)
SYM_BOAT_RAMP = 150,(* boat ramp symbol *)
SYM_CAMP = 151, (* campground symbol *)
SYM_RESTROOMS = 152,(* restrooms symbol *)
SYM_SHOWERS = 153, (* shower symbol *)
SYM_DRINKING_WTR = 154,(* drinking water symbol *)
SYM_PHONE = 155, (* telephone symbol *)
SYM_1ST_AID = 156, (* first aid symbol *)
SYM_INFO = 157, (* information symbol *)
SYM_PARKING = 158, (* parking symbol *)
SYM_PARK = 159, (* park symbol *)
SYM_PICNIC = 160, (* picnic symbol *)
SYM_SCENIC = 161, (* scenic area symbol *)
SYM_SKIING = 162, (* skiing symbol *)
SYM_SWIMMING = 163,(* swimming symbol *)
SYM_DAM = 164, (* dam symbol *)
SYM_CONTROLLED = 165,(* controlled area symbol *)
SYM_DANGER = 166, (* danger symbol *)
SYM_RESTRICTED = 167,(* restricted area symbol *)
SYM_NULL_2 = 168, (* null symbol *)
SYM_BALL = 169, (* ball symbol *)
SYM_CAR = 170, (* car symbol *)
SYM_DEER = 171, (* deer symbol *)
SYM_SHPNG_CART = 172,(* shopping cart symbol *)
SYM_LODGING = 173, (* lodging symbol *)
SYM_MINE = 174, (* mine symbol *)
SYM_TRAIL_HEAD = 175,(* trail head symbol *)
SYM_TRUCK_STOP = 176,(* truck stop symbol *)
SYM_USER_EXIT = 177,(* user exit symbol *)
SYM_FLAG = 178, (* flag symbol *)
SYM_CIRCLE_X = 179,(* circle with x in the center *)
SYM_OPEN_24HR = 180,(* open 24 hours symbol *)
SYM_FHS_FACILITY = 181,(* Fishing Hot Spots? Facility *)
SYM_BOT_COND = 182,(* Bottom Conditions *)
SYM_TIDE_PRED_STN = 183,(* Tide/Current Prediction Station *)
SYM_ANCHOR_PROHIB = 184,(* anchor prohibited symbol *)
SYM_BEACON = 185, (* beacon symbol *)
SYM_COAST_GUARD = 186,(* coast guard symbol *)
SYM_REEF = 187, (* reef symbol *)
SYM_WEEDBED = 188, (* weed bed symbol *)
SYM_DROPOFF = 189, (* drop off symbol *)
SYM_DOCK = 190, (* dock symbol *)
SYM_MARINA = 191, (* marina symbol *)
SYM_BAIT_TACKLE = 192,(* bait and tackle symbol *)
SYM_STUMP = 193, (* stump symbol *)
(*-----------------------------------------------------------
Symbols for user-customizable waypoint images (7680-8191)
-----------------------------------------------------------*)
SYM_FRST_USER_WSYM = 7680,(* first user-customizable symbol *)
SYM_LAST_USER_WSYM = 8191,(* last user-customizable symbol *)
(*---------------------------------------------------------------
Symbols for land (group 1...8192-16383...bits 15-13=001).
---------------------------------------------------------------*)
SYM_IS_HWY = 8192, (* interstate hwy symbol *)
SYM_US_HWY = 8193, (* us hwy symbol *)
SYM_ST_HWY = 8194, (* state hwy symbol *)
SYM_MI_MRKR = 8195, (* mile marker symbol *)
SYM_TRCBCK = 8196, (* TracBack (feet) symbol *)
SYM_GOLF = 8197, (* golf symbol *)
SYM_SML_CTY = 8198, (* small city symbol *)
SYM_MED_CTY = 8199, (* medium city symbol *)
SYM_LRG_CTY = 8200, (* large city symbol *)
SYM_FREEWAY = 8201, (* intl freeway hwy symbol *)
SYM_NTL_HWY = 8202, (* intl national hwy symbol *)
SYM_CAP_CTY = 8203, (* capitol city symbol (star) *)
SYM_AMUSE_PK = 8204,(* amusement park symbol *)
SYM_BOWLING = 8205, (* bowling symbol *)
SYM_CAR_RENTAL = 8206,(* car rental symbol *)
SYM_CAR_REPAIR = 8207,(* car repair symbol *)
SYM_FASTFOOD = 8208,(* fast food symbol *)
SYM_FITNESS = 8209, (* fitness symbol *)
SYM_MOVIE = 8210, (* movie symbol *)
SYM_MUSEUM = 8211, (* museum symbol *)
SYM_PHARMACY = 8212,(* pharmacy symbol *)
SYM_PIZZA = 8213, (* pizza symbol *)
SYM_POST_OFC = 8214,(* post office symbol *)
SYM_RV_PARK = 8215, (* RV park symbol *)
SYM_SCHOOL = 8216, (* school symbol *)
SYM_STADIUM = 8217, (* stadium symbol *)
SYM_STORE = 8218, (* dept. store symbol *)
SYM_ZOO = 8219, (* zoo symbol *)
SYM_GAS_PLUS = 8220,(* convenience store symbol *)
SYM_FACES = 8221, (* live theater symbol *)
SYM_RAMP_INT = 8222,(* ramp intersection symbol *)
SYM_ST_INT = 8223, (* street intersection symbol *)
SYM_WEIGH_STTN = 8226,(* inspection/weigh station symbol *)
SYM_TOLL_BOOTH = 8227,(* toll booth symbol *)
SYM_ELEV_PT = 8228, (* elevation point symbol *)
SYM_EX_NO_SRVC = 8229,(* exit without services symbol *)
SYM_GEO_PLACE_MM = 8230,(* Geographic place name, man-made *)
SYM_GEO_PLACE_WTR = 8231,(* Geographic place name, water *)
SYM_GEO_PLACE_LND = 8232,(* Geographic place name, land *)
SYM_BRIDGE = 8233, (* bridge symbol *)
SYM_BUILDING = 8234,(* building symbol *)
SYM_CEMETERY = 8235,(* cemetery symbol *)
SYM_CHURCH = 8236, (* church symbol *)
SYM_CIVIL = 8237, (* civil location symbol *)
SYM_CROSSING = 8238,(* crossing symbol *)
SYM_HIST_TOWN = 8239,(* historical town symbol *)
SYM_LEVEE = 8240, (* levee symbol *)
SYM_MILITARY = 8241,(* military location symbol *)
SYM_OIL_FIELD = 8242,(* oil field symbol *)
SYM_TUNNEL = 8243, (* tunnel symbol *)
SYM_BEACH = 8244, (* beach symbol *)
SYM_FOREST = 8245, (* forest symbol *)
SYM_SUMMIT = 8246, (* summit symbol *)
SYM_LRG_RAMP_INT = 8247,(* large ramp intersection symbol *)
SYM_LRG_EX_NO_SRVC = 8248,(* large exit without services smbl *)
SYM_BADGE = 8249, (* police/official badge symbol *)
SYM_CARDS = 8250, (* gambling/casino symbol *)
SYM_SNOWSKI = 8251, (* snow skiing symbol *)
SYM_ICESKATE = 8252,(* ice skating symbol *)
SYM_WRECKER = 8253, (* tow truck (wrecker) symbol *)
SYM_BORDER = 8254, (* border crossing (port of entry) *)
SYM_GEOCACHE = 8255,(* U geocache symbol *)
SYM_GEOCACHE_FND = 8256,(* U geocache found symbol *)
SYM_CNTCT_SMILEY = 8257,(* contact symbol - smiley face *)
SYM_CNTCT_BALL_CAP = 8258,(* contact symbol - guy w/ ball cap *)
SYM_CNTCT_BIG_EARS = 8259,(* contact symbol - guy w/ big ears *)
SYM_CNTCT_SPIKE = 8260,(* contact symbol - guy w/ spike hair *)
SYM_CNTCT_GOATEE = 8261,(* contact symbol - guy w/ goatee *)
SYM_CNTCT_AFRO = 8262,(* contact symbol - guy w/ afro *)
SYM_CNTCT_DREADLOCKS = 8263,(* contact symbol - guy w/ dreadlocks *)
SYM_CNTCT_FEMALE1 = 8264,(* contact symbol - general female *)
SYM_CNTCT_FEMALE2 = 8265,(* contact symbol - general female *)
SYM_CNTCT_FEMALE3 = 8266,(* contact symbol - general female *)
SYM_CNTCT_RANGER = 8267,(* contact symbol - park ranger *)
SYM_CNTCT_KUNG_FU = 8268,(* contact symbol - guy w/ head band *)
SYM_CNTCT_SUMO = 8269,(* contact symbol - sumo wrestler *)
SYM_CNTCT_PIRATE = 8270,(* contact symbol - pirate *)
SYM_CNTCT_BIKER = 8271,(* contact symbol - biker *)
SYM_CNTCT_ALIEN = 8272,(* contact symbol - alien *)
SYM_CNTCT_BUG = 8273,(* contact symbol - bug *)
SYM_CNTCT_CAT = 8274,(* contact symbol - cat *)
SYM_CNTCT_DOG = 8275,(* contact symbol - dog *)
SYM_CNTCT_PIG = 8276,(* contact symbol - pig *)
SYM_CNTCT_RESERVED1 = 8277,(* contact symbol - *)
SYM_CNTCT_RESERVED2 = 8278,(* contact symbol - *)
SYM_CNTCT_RESERVED3 = 8279,(* contact symbol - *)
SYM_CNTCT_RESERVED4 = 8280,(* contact symbol - *)
SYM_CNTCT_RESERVED5 = 8281,(* contact symbol - *)
SYM_HYDRANT = 8282, (* fire hydrant *)
SYM_VOICE_REC = 8283,(* icon for a voice recording *)
SYM_BLUE_FLAG = 8284,(* blue flag *)
SYM_GREEN_FLAG = 8285,(* green flag *)
SYM_RED_FLAG = 8286,(* red flag *)
SYM_BLUE_PIN = 8287,(* blue pin *)
SYM_GREEN_PIN = 8288,(* green pin *)
SYM_RED_PIN = 8289, (* red pin *)
SYM_BLUE_BLOCK = 8290,(* blue block *)
SYM_GREEN_BLOCK = 8291,(* green block *)
SYM_RED_BLOCK = 8292,(* red block *)
SYM_BIKE_TRAIL = 8293,(* bike trail *)
SYM_RED_CIRCLE = 8294,(* red circle *)
SYM_GREEN_CIRCLE = 8295,(* green circle *)
SYM_BLUE_CIRCLE = 8296,(* blue circle *)
SYM_BLUE_DIAMOND = 8299,(* blue diamond *)
SYM_RED_OVAL = 8300,(* red oval *)
SYM_GREEN_OVAL = 8301,(* green oval *)
SYM_BLUE_OVAL = 8302,(* blue oval *)
SYM_RED_RECT = 8303,(* red rect *)
SYM_GREEN_RECT = 8304,(* green rect *)
SYM_BLUE_RECT = 8305,(* blue rect *)
SYM_BLUE_SQUARE = 8308,(* blue square *)
SYM_RED_A = 8309, (* red a *)
SYM_RED_B = 8310, (* red b *)
SYM_RED_C = 8311, (* red c *)
SYM_RED_D = 8312, (* red d *)
SYM_GREEN_A = 8313, (* green a *)
SYM_GREEN_B = 8314, (* green b *)
SYM_GREEN_C = 8315, (* green c *)
SYM_GREEN_D = 8316, (* green d *)
SYM_BLUE_A = 8317, (* blue a *)
SYM_BLUE_B = 8318, (* blue b *)
SYM_BLUE_C = 8319, (* blue c *)
SYM_BLUE_D = 8320, (* blue d *)
SYM_RED_0 = 8321, (* red 0 *)
SYM_RED_1 = 8322, (* red 1 *)
SYM_RED_2 = 8323, (* red 2 *)
SYM_RED_3 = 8324, (* red 3 *)
SYM_RED_4 = 8325, (* red 4 *)
SYM_RED_5 = 8326, (* red 5 *)
SYM_RED_6 = 8327, (* red 6 *)
SYM_RED_7 = 8328, (* red 7 *)
SYM_RED_8 = 8329, (* red 8 *)
SYM_RED_9 = 8330, (* red 9 *)
SYM_GREEN_0 = 8331, (* green 0 *)
SYM_GREEN_1 = 8332, (* green 1 *)
SYM_GREEN_2 = 8333, (* green 2 *)
SYM_GREEN_3 = 8334, (* green 3 *)
SYM_GREEN_4 = 8335, (* green 4 *)
SYM_GREEN_5 = 8336, (* green 5 *)
SYM_GREEN_6 = 8337, (* green 6 *)
SYM_GREEN_7 = 8338, (* green 7 *)
SYM_GREEN_8 = 8339, (* green 8 *)
SYM_GREEN_9 = 8340, (* green 9 *)
SYM_BLUE_0 = 8341, (* blue 0 *)
SYM_BLUE_1 = 8342, (* blue 1 *)
SYM_BLUE_2 = 8343, (* blue 2 *)
SYM_BLUE_3 = 8344, (* blue 3 *)
SYM_BLUE_4 = 8345, (* blue 4 *)
SYM_BLUE_5 = 8346, (* blue 5 *)
SYM_BLUE_6 = 8347, (* blue 6 *)
SYM_BLUE_7 = 8348, (* blue 7 *)
SYM_BLUE_8 = 8349, (* blue 8 *)
SYM_BLUE_9 = 8350, (* blue 9 *)
SYM_BLUE_TRIANGLE = 8351,(* blue triangle *)
SYM_GREEN_TRIANGLE = 8352,(* green triangle *)
SYM_RED_TRIANGLE = 8353,(* red triangle *)
SYM_LIBRARY = 8354, (* library (book) *)
SYM_BUS = 8355, (* ground transportation *)
SYM_CITY_HALL = 8356,(* city hall *)
SYM_WINE = 8357, (* winery *)
(*---------------------------------------------------------------
Symbols for aviation (group 2...16383-24575...bits 15-13=010).
---------------------------------------------------------------*)
SYM_AIRPORT = 16384, (* airport symbol *)
SYM_INT = 16385, (* intersection symbol *)
SYM_NDB = 16386, (* non-directional beacon symbol *)
SYM_VOR = 16387, (* VHF omni-range symbol *)
SYM_HELIPORT = 16388,(* heliport symbol *)
SYM_PRIVATE = 16389, (* private field symbol *)
SYM_SOFT_FLD = 16390,(* soft field symbol *)
SYM_TALL_TOWER = 16391,(* tall tower symbol *)
SYM_SHORT_TOWER = 16392,(* short tower symbol *)
SYM_GLIDER = 16393, (* glider symbol *)
SYM_ULTRALIGHT = 16394,(* ultralight symbol *)
SYM_PARACHUTE = 16395,(* parachute symbol *)
SYM_VORTAC = 16396, (* VOR/TACAN SYMBOL *)
SYM_VORDME = 16397, (* VOR-DME symbol *)
SYM_FAF = 16398, (* first approach fix *)
SYM_LOM = 16399, (* localizer outer marker *)
SYM_MAP = 16400, (* missed approach point *)
SYM_TACAN = 16401, (* TACAN symbol *)
SYM_SEAPLANE = 16402,(* Seaplane Base *)
SYM_INVALID = $FFFF(* invalid symbol value (last) *)
);(* QueSymbolT16 *)
PQuePointType = ^QuePointType;
QuePointType = record
id: array[0..quePointIdLen] of char;(* Point id *)
smbl: QueSymbolT16;(* Point symbol *)
posn: QuePositionDataType;(* Point position *)
end;
{----------------------------------------------------------
Address type for specifying addresses to find.
---------------------------------------------------------- }
type
PQueSelectAddressType = ^QueSelectAddressType;
QueSelectAddressType = record
streetAddress: ^WCHAR;
city: ^WCHAR;
state: ^WCHAR;
country: ^WCHAR;
postalCode: ^WCHAR;
end;
PQueAddressType = ^QueAddressType;
QueAddressType = record
streetAddress: array[0..(QUE_ADDR_BUF_LENGTH + 1) - 1] of WCHAR;
city: array[0..(QUE_ADDR_BUF_LENGTH + 1) - 1] of WCHAR;
state: array[0..(QUE_ADDR_BUF_LENGTH + 1) - 1] of WCHAR;
country: array[0..(QUE_ADDR_BUF_LENGTH + 1) - 1] of WCHAR;
postalCode: array[0..(QUE_POST_BUF_LENGTH + 1) - 1] of WCHAR;
end;
{----------------------------------------------------------
Que App Launch Types
Added in Que API version 1.50
---------------------------------------------------------- }
QueAppT8 = uint8;
QueAppEnum = (queAppMap, queAppWhereTo, queAppGps, queAppTurns,
queAppTrip, queAppSettings, queAppGpsSettings,
queAppMarkWaypoint,
queAppMenu,{ Launch the main page of the app. }
queAppLaunchBackground,{ Launch the app in the background (no UI) }
queAppCloseBackground,
{ Done with background app (called 1 time for every call to LaunchBackground) }
{Close but delay 1st so if client immediately then does queAppLaunchBackground, Que will respond quickly }
queAppCloseBackgroundDelay,
queAppInvalid = 255);
{----------------------------------------------------------
QueRouteToVias Sort Types
Added in Que API version 1.50
---------------------------------------------------------- }
QueRouteSortT8 = uint8;
QueRouteSortEnum = (queRouteSortNone = 0, queRouteSortAll = 1,
queRouteSortIgnoreDest = 3, queRouteSortIgnoreStart = 5,
queRouteSortIgnoreStartAndDest = 7
);
{----------------------------------------------------------
QueRouteStatusT8
Added in Que API version 1.60
---------------------------------------------------------- }
QueRouteStatusT8 = uint8;
QueRouteStatusEnum = (
queRouteStatusNone = 0,// No active route
queRouteStatusActive,// Actively routing
queRouteStatusOffRoute,// Point to point route
queRouteStatusArrived,// Route destination reached
queRouteStatusCalculating,// Route calculation in progress
queRouteStatusCanceled,// Route calculation canceled by user
queRouteStatusInvalidStart,// The route start point isn't valid
queRouteStatusInvalidEnd,// The route end point isn't valid
queRouteStatusFailed// Route calculation failed (general)
);
{----------------------------------------------------------
QueRouteInfoType
Added in Que API version 1.60
---------------------------------------------------------- }
PQueRouteInfoType = ^QueRouteInfoType;
QueRouteInfoType = record
routeStatus: QueRouteStatusT8;{ Status of route }
distanceToTurn: single;{ Distance to turn (in meters) }
distanceToDest: single;{ Distance to destination (in meters) }
timeOfTurn: QueGarminTimeT32;{ Estimated time of the next turn }
timeOfArrival: QueGarminTimeT32;{ Estimated time of arrival }
destName: array[0..40] of WCHAR;{ Name of the route destination }
end;
{-----------------------------------------------------------------------------
END OF FILE
----------------------------------------------------------------------------- }
{ __QUEAPITYPES_H__ }
----
{$IFDEF FPC}
{$PACKRECORDS C}
{$ENDIF}
{*****************************************************************************
*
* HEADER NAME:
* GPSLib.h
*
* DESCRIPTION:
* Application Program Interface to the Global Positioning System Library.
*
* Copyright 2002-2003 by Garmin Ltd. or its subsidiaries.
*
***************************************************************************** }
{-----------------------------------------------------------------------------
GENERAL INCLUDES
----------------------------------------------------------------------------- }
{-----------------------------------------------------------------------------
LITERAL CONSTANTS
----------------------------------------------------------------------------- }
{-----------------------------------------------------------------------------
TYPES
----------------------------------------------------------------------------- }
{----------------------------------------------------------
GPS API Result Codes
---------------------------------------------------------- }
type
GPSErrT8 = uint8;
GPSErrEnum = (
gpsErrNone = 0, (* success *)
gpsErrNotOpen = 1,(* unable to communicate with GPS API *)
gpsErrBadArg = 2, (* invalid parameter passed to function *)
gpsErrMemory = 3, (* out of memory *)
gpsErrNoData = 4, (* no data available *)
gpsErrAlreadyOpen = 5,(* the Que API is already open *)
gpsErrInvalidVersion = 6,(* the Que API is an incompatable version *)
gpsErrComm = 7, (* there was an error communicating with the API*)
gpsErrCmndUnavail = 8(* the command is unavaialbe *));
{----------------------------------------------------------
Satellite Data Type
---------------------------------------------------------- }
GPSSatDataType = record
svid: uint8; { space vehicle identifier }
status: uint8; { status bitfield }
snr: sint16; { signal to noise ratio * 100 (dB Hz) }
azimuth: single; { azimuth (radians) }
elevation: single; { elevation (radians) }
end;
const
gpsInvalidSVID = 255; { invalid space vehicle ID }
{ Satellite Status Bitfield Mask Values }
gpsSatEphMask = 1; { ephemeris mask }
gpsSatDifMask = 2; { differential mask }
gpsSatUsedMask = 4; { used in solution mask }
gpsSatRisingMask = 8; { rising mask }
{----------------------------------------------------------
GPS Mode Type
---------------------------------------------------------- }
type
GPSModeT8 = uint8;
GPSModeEnum = (
gpsModeOff = 0, (* GPS is off *)
gpsModeNormal = 1, (* continuous satellite tracking *)
gpsModeBatSaver = 2,(* periodic satellite tracking *)
gpsModeSim = 3, (* simulated GPS information *)
gpsModeExternal = 4,(* external source of GPS information *)
gpsModeCount = 5 (* count of mode type enumerations *)
);
{----------------------------------------------------------
GPS Fix Type
---------------------------------------------------------- }
GPSFixT8 = uint8;
GPSFixEnum = (
gpsFixUnusable = 0,(* failed integrity check *)
gpsFixInvalid = 1, (* invalid or unavailable *)
gpsFix2D = 2, (* 2 dimension *)
gpsFix3D = 3, (* 3 dimension *)
gpsFix2DDiff = 4, (* 2 dimension differential *)
gpsFix3DDiff = 5, (* 3 dimension differential *)
gpsFixCount = 6 (* count of fix type enumerations *)
);
{----------------------------------------------------------
GPS Status Data Type
---------------------------------------------------------- }
GPSStatusDataType = record
mode: GPSModeT8;(* mode type *)
fix: GPSFixT8; (* fix type *)
filler2: sint16; (* alignment padding *)
epe: single; (* estimated position error, 1-sigma (meters) *)
eph: single; (* epe, horizontal only (meters) *)
epv: single; (* epe, vertical only (meters) *)
end;
{----------------------------------------------------------
GPS Position Data Type
The GPSPositionDataType uses integers to indicate latitude
and longitude in semicircles, where 2^31 semicircles equals
180 degrees. North latitudes and East longitudes are
indicated with positive numbers; South latitudes and West
longitudes are indicated with negative numbers. The
following formulas show how to convert between degrees and
semicircles:
degrees = semicircles * ( 180 / 2^31 )
semicircles = degrees * ( 2^31 / 180 )
invalid semicircles = 2^31
invalid altitude = 1.0e25
---------------------------------------------------------- }
GPSPositionDataType = record
lat: sint32;(* latitude (semicircles) *)
lon: sint32;(* longitude (semicircles) *)
altMSL: single;(* altitude above mean sea level (meters) *)
altWGS84: single;(* altitude above WGS84 ellipsoid (meters)
NOTE: If WGS84 unknown, gpsInvalidAltitude
is returned *)
end;
const
gpsInvalidSemicircles = $80000000;
gpsInvalidAltitude = single(1.0e25);
{----------------------------------------------------------
GPS Velocity Data Type
---------------------------------------------------------- }
type
GPSVelocityDataType = record
east: single;(* east (m/s) *)
north: single;(* north (m/s) *)
up: single;(* upwards (m/s) *)
track: single;(* track (radians) *)
speed: single;(* speed, horizontal only (m/s) *)
end;
{----------------------------------------------------------
GPS Time Data Type
---------------------------------------------------------- }
GPSTimeDataType = record
seconds: dword; { seconds since midnight (UTC) }
fracSeconds: dword; { 0..1 second * 2^32 }
end;
{----------------------------------------------------------
GPS Comprehensive Data Type
---------------------------------------------------------- }
PGPSPVTDataType = ^GPSPVTDataType;
GPSPVTDataType = record
status: GPSStatusDataType;
position: GPSPositionDataType;
velocity: GPSVelocityDataType;
time: GPSTimeDataType;
end;
{----------------------------------------------------------
GPS CPO Data Types
---------------------------------------------------------- }
GPSCarrierPhaseOutputPositionDataType = record
lat: double;
lon: double;
tow: double;
alt: single;
epe: single;
eph: single;
epv: single;
msl: single;
east: single;
north: single;
up: single;
grmn_days: uint32;
fix: uint16;
leap_scnds: uint16;
end;
PGPSSatelliteInstRecordDataType = ^GPSSatelliteInstRecordDataType;
GPSSatelliteInstRecordDataType = record
pr: double; (* pseudorange *)
cycles: uint32; (* cycles *)
phse: uint16; (* carrier phase, 1/2048 cycle *)
svid: uint8; (* satellite id *)
snr_dbhz: uint8; (* snr in dB*Hz *)
slp_dtct: boolean;(* cycle slip detected *)
valid: boolean; (* pseudorange valid flag *)
end;
{ Data Instrumentation Record }
{ (test only) }
GPSSatelliteEphInstDataType = record
epoch: sint32; { data epoch counter }
wrd: uint32; { current SDM word }
svid: uint8; { satellite id }
end;
TGPSSatelliteEphInstDataTypeArray24 = array[0..23] of GPSSatelliteEphInstDataType;
{-----------------------------------------------------------------------------
END OF FILE
----------------------------------------------------------------------------- }
-----
unit QuePubApi;
interface
{
Automatically converted by H2Pas 1.0.0 from QuePubApi.h
The following command line parameters were used:
QuePubApi.h
}
{$IFDEF FPC}
{$PACKRECORDS C}
{$ENDIF}
uses Windows;
{*****************************************************************************
*
* HEADER NAME:
* QueAPI.h
*
* DESCRIPTION:
* Application Program Interface to the Que technology
*
* Copyright 2002-2005 by Garmin Ltd. or its subsidiaries.
*
***************************************************************************** }
{-----------------------------------------------------------------------------
GENERAL INCLUDES
----------------------------------------------------------------------------- }
{-----------------------------------------------------------------------------
LITERAL CONSTANTS
----------------------------------------------------------------------------- }
{ Que API version 1.60 }
const
queAPIVersion = 160;
{-----------------------------------------------------------------------------
TYPES
----------------------------------------------------------------------------- }
{----------------------------------------------------------
Basic types
---------------------------------------------------------- }
type
uint8 = byte;
puint8 = ^uint8;
uint16 = word;
puint16 = ^uint16;
uint32 = dword;
sint8 = char;
sint16 = smallint;
sint32 = longint;
PPWCHAR = ^PWCHAR;
{----------------------------------------------------------
Error range start
---------------------------------------------------------- }
const
firstQueAPIErr = 1;
QueApiLib = 'QueApi.dll';
{----------------------------------------------------------
Notification information
---------------------------------------------------------- }
type
QueNotificationT8 = uint8;
QueNotificationEnum = (
queLocationChange = 0,(* The GPS position has changed *)
queStatusChange = 1, (* The GPS status has changed *)
queLostFix = 2,(* The quality of the GPS position computation
has become less than two dimensional *)
queSatDataChange = 3,(* The GPS satellite data has changed *)
queModeChange = 4, (* The GPS mode has changed *)
queEvent = 5, (* An event has occurred (sunrise/set, etc.) *)
queCPOPositionChange = 6,(* The GPS CPO position data has been updated
(M3/M5 only) *)
queSatelliteInstChange = 7,(* The GPS CPO satellite data has been updated
(M3/M5 only) *)
queNavigationEvent = 8,(* The users navigation state changed
(Added in 1.50) *)
queTerminationEvent = 9,(* The application has been closed and the API
will no longer be available (Added in 1.60) *)
queUserNotificationCount(* Count of change type enumerations(user only) *)
);
{----------------------------------------------------------
Notification callback signature
---------------------------------------------------------- }
QueNotificationCallback = procedure(qn: QueNotificationT8); cdecl;
{-----------------------------------------------------------------------------
SHARED TYPES
----------------------------------------------------------------------------- }
{$include GPSLibTypes.inc}
{$include QueAPITypes.inc}
{-----------------------------------------------------------------------------
PROCEDURES
----------------------------------------------------------------------------- }
{ C++ extern C conditionnal removed }
{-----------------------------------------------------------------------------
OPEN/CLOSE PROCEDURES
----------------------------------------------------------------------------- }
{********************************************************************
*
* PROCEDURE NAME:
* QueAPIOpen - Open QueAPI
*
* DESCRIPTION:
* Opens QueAPI and prepares it for use. Called by any application or
* library that wants to use the services that QueAPI provides.
*
* QueAPIOpen *must* be called before calling any other GPS* or Que*
* functions, with the exception of QueGetAPIVersion.
* If an error occurs during initialization, QueAPIOpen returns the
* error code and exits cleanly.
*
******************************************************************** }
function QueAPIOpen(callback: QueNotificationCallback): QueErrT16;
cdecl; external QueApiLib;(*QueAPIExport*)
{********************************************************************
*
* PROCEDURE NAME:
* QueAPIClose - Close QueAPI
*
* DESCRIPTION:
* Closes QueAPI and disposes of the global data memory if
* required. Called by any application or library that's been
* using QueAPI and is now finished with it. Supply the callback
* function supplied in the corresponding QueAPIOpen call.
*
******************************************************************** }
function QueAPIClose(callback: QueNotificationCallback): QueErrT16;
cdecl; external QueApiLib;(*QueAPIExport*)
{********************************************************************
*
* PROCEDURE NAME:
* QueGetApiVersion - Get QueAPI API Version
*
* DESCRIPTION:
* Returns the QueAPIVersion constant.
*
* NOTES:
* The Que API dosen't need to be opened to call this function.
*
******************************************************************** }
function QueGetAPIVersion: uint16; cdecl; external QueApiLib; (*QueAPIExport*)
{-----------------------------------------------------------------------------
GPS DATA PROCEDURES
----------------------------------------------------------------------------- }
{********************************************************************
*
* PROCEDURE NAME:
* GPSGetMaxSatellites - Get the Maximum Number of Satellites
*
* DESCRIPTION:
* Returns the maximum number of satellites that are currently supported.
*
* The value returned by this routine should be used in the dynamic
* allocation of the array of satellites (GPSSatDataType).
*
******************************************************************** }
function GPSGetMaxSatellites: uint8; cdecl; external QueApiLib; (*QueAPIExport*)
{********************************************************************
*
* PROCEDURE NAME:
* GPSGetPosition - Get Current Position Data
*
* DESCRIPTION:
* Returns a GPSPositionDataType structure with the latest position
* from the GPS.
*
* If the return value is not gpsErrNone the data should be
* considered invalid.
*
******************************************************************** }
function GPSGetPosition(var position: GPSPositionDataType): QueErrT16;
cdecl; external QueApiLib;(*QueAPIExport*)
{********************************************************************
*
* PROCEDURE NAME:
* GPSGetPVT - Get Current Position/Velocity/Time Data
*
* DESCRIPTION:
* Returns a GPSPVTDataType structure with the latest position,
* velocity, and time data from the GPS.
*
* If p_pvt->status.fix is equal to gpsFixUnusable or
* gpsFixInvalid, the rest of the data in the structure should
* be assumed to be invalid.
*
******************************************************************** }
function GPSGetPVT(var pvt: GPSPVTDataType): QueErrT16; cdecl; external QueApiLib;
(*QueAPIExport*)
{********************************************************************
*
* PROCEDURE NAME:
* GPSGetSatellites - Get Current Satellite Data
*
* DESCRIPTION:
* Returns a GPSSatDataType structure with the latest satellite
* information from the GPS. The data must be an array of at least
* GPSGetMaxSatellites items!
*
* NOTES:
* an M3/M5, we expect SNR to be between 30dB and 50dB.
* On an M4 we expect SNR to be between 15dB and 40dB.
*
******************************************************************** }
function GPSGetSatellites(var sat: GPSSatDataType): QueErrT16; cdecl;
external QueApiLib;(*QueAPIExport*)
{********************************************************************
*
* PROCEDURE NAME:
* GPSGetStatus - Get Current Status Data
*
* DESCRIPTION:
* Returns a GPSStatusDataType structure with the latest status
* from the GPS.
*
* If the return value is not gpsErrNone the data should be
* considered invalid.
*
******************************************************************** }
function GPSGetStatus(var status: GPSStatusDataType): QueErrT16; cdecl;
external QueApiLib;(*QueAPIExport*)
{********************************************************************
*
* PROCEDURE NAME:
* GPSGetTime - Get Current Time Data
*
* DESCRIPTION:
* Returns a GPSTimeDataType structure with the latest time
* from the GPS.
*
* If the return value is not gpsErrNone the data should be
* considered invalid.
*
******************************************************************** }
function GPSGetTime(var time: GPSTimeDataType): QueErrT16; cdecl;
external QueApiLib;(*QueAPIExport*)
{********************************************************************
*
* PROCEDURE NAME:
* GPSGetVelocity - Get Current Velocity Data
*
* DESCRIPTION:
* Returns a GPSVelocityDataType structure with the latest velocity
* from the GPS.
*
* If the return value is not gpsErrNone the data should be
* considered invalid.
*
******************************************************************** }
function GPSGetVelocity(var velocity: GPSVelocityDataType): QueErrT16;
cdecl; external QueApiLib;(*QueAPIExport*)
{********************************************************************
*
* PROCEDURE NAME:
* GPSSetMode - Set the Current GPS Mode
*
* DESCRIPTION:
* Set the GPS mode. If the mode isn't supported queErrBadArg
* is returned
*
* NOTES:
* Added in Que API version 1.50
*
******************************************************************** }
function GPSSetMode(mode: GPSModeT8): QueErrT16; cdecl; external QueApiLib;
(*QueAPIExport*)
{-----------------------------------------------------------------------------
GPS CPO DATA PROCEDURES
(iQue M3/M5 only)
----------------------------------------------------------------------------- }
{********************************************************************
*
* PROCEDURE NAME:
* GPSGetCPOPositionData
*
* DESCRIPTION:
*
*
******************************************************************** }
function GPSGetCPOPositionData(
var position: GPSCarrierPhaseOutputPositionDataType): QueErrT16; cdecl;
external QueApiLib;(*QueAPIExport*)
{********************************************************************
*
* PROCEDURE NAME:
* GPSGetSatelliteInstRecordData
*
* DESCRIPTION:
* The sats inst data must be an array of at least
* GPSGetMaxSatellites items!
*
******************************************************************** }
function GPSGetSatelliteInstRecordData(var rcvr_tow: double; var rcvr_wn: uint16;
var sats_inst: GPSSatelliteInstRecordDataType): QueErrT16; cdecl;
external QueApiLib;(*QueAPIExport*)
{********************************************************************
*
* PROCEDURE NAME:
* GPSGetSatelliteEphInstData
*
* DESCRIPTION:
* The sats inst data must be an array of 24 items!
*
******************************************************************** }
function GPSGetSatelliteEphInstData(var eph_inst: TGPSSatelliteEphInstDataTypeArray24;
var valid_sats: uint8): QueErrT16; cdecl; external QueApiLib;(*QueAPIExport*)
{-----------------------------------------------------------------------------
PROGRAM LAUNCH PROCEDURES
----------------------------------------------------------------------------- }
{********************************************************************
*
* PROCEDURE NAME:
* QueLaunchApp - Launch given app, or bring it to the foreground
*
* DESCRIPTION:
* Launches the specified application if it isn't already running
* and brings to the foreground.
*
* NOTES:
* The Que Lib dosen't need to be opened to call this function.
* Added in Que API version 1.50
*
******************************************************************** }
function QueLaunchApp(app: QueAppT8): QueErrT16; cdecl; external QueApiLib;
(*QueAPIExport*)
{-----------------------------------------------------------------------------
GENERAL INFORMATION PROCEDURES
----------------------------------------------------------------------------- }
{********************************************************************
*
* PROCEDURE NAME:
* QueGetNearestAddress - Get Nearest Address Data
*
* DESCRIPTION:
* Returns a structure with the nearest address.
*
* If the return value is not queErrNone the data should be
* considered invalid.
*
* NOTES:
* Added in version 1.40
*
******************************************************************** }
function QueGetNearestAddress( //(*QueAPIExport*)
var aAddress: QueAddressType // in: Address
): QueErrT16; cdecl; external QueApiLib;
{********************************************************************
*
* PROCEDURE NAME:
* QueGetAddressString - Get Current Address Data
*
* DESCRIPTION:
* Returns a string with the latest address.
*
* If the return value is not queErrNone the data should be
* considered invalid.
*
* NOTES:
* Added in version 1.30
*
******************************************************************** }
function QueGetAddressString //(*QueAPIExport*)
(var aString: WCHAR; aStringLen: uint16): QueErrT16;
cdecl; external QueApiLib;
{********************************************************************
*
* PROCEDURE NAME:
* QueGetAddress - Get Current Address Data
*
* DESCRIPTION:
* Returns a string with the latest address. The caller is
* responsible for freeing the memory for the string by calling
* LocalFree(*aAddress).
*
* If the return value is not queErrNone the data should be
* considered invalid.
*
* NOTES:
* Deprecated in version 1.30
*
******************************************************************** }
function QueGetAddress(var aAddress: WCHAR): QueErrT16; cdecl;
external QueApiLib;(*QueAPIExport*)
{********************************************************************
*
* PROCEDURE NAME:
* QueGetDrvRteStatusString - Get Current Driving/Routing Status
*
* DESCRIPTION:
* Returns a string with the latest driving/routing status
* The caller is responsible for freeing the memory
* for the string by calling LocalFree(*aStatus).
*
* If the return value is not queErrNone the data should be
* considered invalid.
*
* NOTES:
* Added in version 1.30
*
******************************************************************** }
function QueGetDrvRteStatusString(*QueAPIExport*)
(var aString: WCHAR; aStringLen: uint16): QueErrT16;
cdecl; external QueApiLib;
{********************************************************************
*
* PROCEDURE NAME:
* QueGetDrvRteStatus - Get Current Driving/Routing Status
*
* DESCRIPTION:
* Returns a string with the latest driving/routing status
* The caller is responsible for freeing the memory
* for the string by calling LocalFree(*aStatus).
*
* If the return value is not queErrNone the data should be
* considered invalid.
*
* NOTES:
* Deprecated in version 1.30
*
******************************************************************** }
function QueGetDrvRteStatus(var aStatus: PWCHAR): QueErrT16; cdecl;
external QueApiLib;(*QueAPIExport*)
{********************************************************************
*
* PROCEDURE NAME:
* QueGetStringFromLocation - Get Text String for given location
*
* DESCRIPTION:
* Returns the given location as a text string
* If the return value is not queErrNone the data should be
* considered invalid. If the position is NULL, the current
* position is used.
* The caller is responsible for freeing the memory
* for the string by calling LocalFree(*aStatus).
*
* NOTES:
* Added in version 1.30
*
******************************************************************** }
function QueGetStringFromLocation( //(*QueAPIExport*)
const aPosn: PQuePositionDataType;// in: Position
var aString: WCHAR;// out: string
aStringLen: uint16 // in: string length of buffer
): QueErrT16; cdecl; external QueApiLib;
{********************************************************************
*
* PROCEDURE NAME:
* QueGetLocationString - Get Text String for given location
*
* DESCRIPTION:
* Returns the given location as a text string
* If the return value is not queErrNone the data should be
* considered invalid. If the position is NULL, the current
* position is used.
* The caller is responsible for freeing the memory
* for the string by calling LocalFree(*aStatus).
*
* NOTES:
* Deprecated in version 1.30
*
******************************************************************** }
function QueGetLocationString( //(*QueAPIExport*)
var aPosn: QuePositionDataType;// in: Position
var aString: PWCHAR// out: Pointer to string containing position
): QueErrT16; cdecl; external QueApiLib;
{********************************************************************
*
* PROCEDURE NAME:
* QueGetSunRiseSet - Get sunrise and sunset times for given location
*
* DESCRIPTION:
* Returns a QueRiseSetType structure for the given location.
*
* If the return value is not queErrNone the data should be
* considered invalid.
*
******************************************************************** }
function QueGetSunRiseSet( //(*QueAPIExport*)
var aPosition: QuePositionDataType;
// in: position for which to calculate rise or set. If null current posn used.
var aDate: QueGarminTimeT32;
// in: date for which to calculate rise or set. If null current time used
var aRiseSet: QueRiseSetType// out: sunrise/sunset info
): QueErrT16; cdecl; external QueApiLib;
{********************************************************************
*
* PROCEDURE NAME:
* QueGetMoonRiseSet - Get moonrise and moonset times for given location
*
* DESCRIPTION:
* Returns a QueRiseSetType structure for the given location.
*
* If the return value is not queErrNone the data should be
* considered invalid. It is valid for this function to retun
* queTimeInvalid in the rise member of the aRiseSet parameter
* if the moon does not rise that day or in the set member
* of the aRiseSet parameter if the moon does not set that day.
*
******************************************************************** }
function QueGetMoonRiseSet( //(*QueAPIExport*)
var aPosition: QuePositionDataType;
// in: position for which to calculate rise or set. If null current posn used.
var aDate: QueGarminTimeT32;
// in: date for which to calculate rise or set. If null current time used
var aRiseSet: QueRiseSetType// out: moonrise/moonset info
): QueErrT16; cdecl; external QueApiLib;
{********************************************************************
*
* PROCEDURE NAME:
* QueGetRouteInformation - Get information route
*
* DESCRIPTION:
* Returns information about the current route.
*
* NOTES:
* Added in version 1.60
*
******************************************************************** }
function QueGetRouteInformation( //(*QueAPIExport*)
var aRouteInformation: QueRouteInfoType): QueErrT16; cdecl; external QueApiLib;
{-----------------------------------------------------------------------------
TIME CONVERSION PROCEDURES
----------------------------------------------------------------------------- }
{********************************************************************
*
* PROCEDURE NAME:
* QueConvertGarminToSystemTime - Convert from Garmin time to system time
*
* DESCRIPTION:
* Converts the given Garmin time value to a SYSTEMTIME structure.
* If the input time is invalid, the SYSETMTIME contains all 0's.
*
******************************************************************** }
function QueConvertGarminToSystemTime ( input :QueGarminTimeT32; var output : SYSTEMTIME ):QueErrT16;cdecl; external QueApiLib;(*QueAPIExport*)
{********************************************************************
*
* PROCEDURE NAME:
* QueConvertGarminToSystemTime - Convert from Garmin time to system time
*
* DESCRIPTION:
* Converts the given SYSETMTIME value to a QueGarminTimeT32 value.
* If the input time is invalid, the output is 0xFFFFFFFF.
*
******************************************************************** }
function QueConvertSystemToGarminTime ( {const} var input :SYSTEMTIME; var output : QueGarminTimeT32):QueErrT16;cdecl; external QueApiLib;(*QueAPIExport*)
{-----------------------------------------------------------------------------
QUE POINT PROCEDURES
--------------------------------------------------- |
|
| Back to top |
|
 |
mingodad
Joined: 10 Sep 2009 Posts: 3
|
Posted: Thu Sep 10, 2009 9:17 am Post subject: Porting SDK to freepascal continuation |
|
|
| Code: |
{-----------------------------------------------------------------------------
QUE POINT PROCEDURES
----------------------------------------------------------------------------- }
{********************************************************************
*
* PROCEDURE NAME:
* QueCreatePoint - Create a point handle with given data
*
* DESCRIPTION:
* Create a point.
*
******************************************************************** }
function QueCreatePoint({const} var point: QuePointType; var handle: QuePointHandle): QueErrT16;
cdecl; external QueApiLib;(*QueAPIExport*)
{********************************************************************
*
* PROCEDURE NAME:
* QueClosePoint - Close the point
*
* DESCRIPTION:
* This procedures closes a QuePointHandle to a given point.
*
******************************************************************** }
function QueClosePoint(point: QuePointHandle): QueErrT16; cdecl;
external QueApiLib;(*QueAPIExport*)
{********************************************************************
*
* PROCEDURE NAME:
* QueGetPointInfo - Get the point info for the given point handle
*
* DESCRIPTION:
* Get information about a point.
*
******************************************************************** }
function QueGetPointInfo(point: QuePointHandle; var point_data: QuePointType): QueErrT16;
cdecl; external QueApiLib;(*QueAPIExport*)
{********************************************************************
*
* PROCEDURE NAME:
* QueSerializePoint - Serialze the point for long term storage.
*
* DESCRIPTION:
* Returns all data needed to recreate the point handle to caller.
* Point can then be reconstituted by a call to QueDeserializePoint.
* The function returns the size of the serialized data. If the
* buffer passed in is not big enough, no data will be copied.
*
******************************************************************** }
function QueSerializePoint(point: QuePointHandle; point_data: pointer;
point_data_sz: uint32): uint32; cdecl; external QueApiLib;(*QueAPIExport*)
{********************************************************************
*
* PROCEDURE NAME:
* QueDeserializePoint - Deserialze the point from long term storage.
*
* DESCRIPTION:
* Recreates a handle to a point from serialized data.
*
******************************************************************** }
function QueDeserializePoint(point_data: pointer; point_data_sz: uint32;
var handle: QuePointHandle): QueErrT16; cdecl; external QueApiLib;(*QueAPIExport*)
{********************************************************************
*
* PROCEDURE NAME:
* QueRouteDetour - Create a detour
*
* DESCRIPTION:
* Cause the current route to avoid the next aDistance meters
* of the route.
*
* NOTES:
* Added in version 1.50
*
******************************************************************** }
function QueRouteDetour(aDistance: single): QueErrT16; cdecl;
external QueApiLib;(*QueAPIExport*)
{********************************************************************
*
* PROCEDURE NAME:
* QueRouteIsActive - Is route active
*
* DESCRIPTION:
* aIsActive set to TRUE if the user is currently navigating
* a route.
*
* NOTES:
* Added in version 1.50
*
******************************************************************** }
function QueRouteIsActive(var aIsActive: boolean): QueErrT16; cdecl;
external QueApiLib;(*QueAPIExport*)
(* error
QueAPIExport QueErrT16 QueRouteIsActive( boolean* aIsActive );
in declarator_list *)
{********************************************************************
*
* PROCEDURE NAME:
* QueRouteStop - Stop routing to a point
*
* DESCRIPTION:
* Stop the active route
*
* NOTES:
* Added in version 1.50
*
******************************************************************** }
function QueRouteStop: QueErrT16; cdecl; external QueApiLib;(*QueAPIExport*)
{********************************************************************
*
* PROCEDURE NAME:
* QueRouteToPoint - Route to a point
*
* DESCRIPTION:
* Create a route from your current location to the given point
*
******************************************************************** }
function QueRouteToPoint(point: QuePointHandle): QueErrT16; cdecl;
external QueApiLib;(*QueAPIExport*)
{********************************************************************
*
* PROCEDURE NAME:
* QueRouteToVias - Route to a series of points
*
* DESCRIPTION:
* Create a route from your current location to the given points
*
* NOTES:
* Added in Que API version 1.50
*
******************************************************************** }
function QueRouteToVias( {const} var points: QuePointHandle; point_count: uint32;
sort_type: QueRouteSortT8): QueErrT16; cdecl; external QueApiLib;(*QueAPIExport*)
{********************************************************************
*
* PROCEDURE NAME:
* QueViewPointOnMap - View a point on the map
*
* DESCRIPTION:
* Show the details page for this point.
*
* NOTES:
* This function brings up the details page in Que's process.
*
******************************************************************** }
function QueViewPointOnMap(point: QuePointHandle): QueErrT16; cdecl;
external QueApiLib;(*QueAPIExport*)
{********************************************************************
*
* PROCEDURE NAME:
* QueViewPointDetails - Shows a details page for the point
*
* DESCRIPTION:
* Bring up QueMap with the given point selected
*
* NOTES:
* This function brings up the details page in Que's process.
*
******************************************************************** }
function QueViewPointDetails(point: QuePointHandle): QueErrT16;
cdecl; external QueApiLib;(*QueAPIExport*)
{********************************************************************
*
* PROCEDURE NAME:
* QueSelectPointFromMap - Select a point using the map dialog
*
* DESCRIPTION:
* This function blocks until the user selects a point. If no point
* is selected, queInvalidPointHandle is returned.
*
* NOTES:
* The value of orig can be queInvalidPointHandle if you don't
* want to move a point.
*
******************************************************************** }
function QueSelectPointFromMap(*QueAPIExport*)
(parent: HWND;// in: Handle to parent window. NULL if no parent.
orig: QuePointHandle;// in: Handle to point to move.
var point: QuePointHandle
// out: Handle to selected point. Must be closed with QueClosePoint.
): QueErrT16; cdecl; external QueApiLib;
{********************************************************************
*
* PROCEDURE NAME:
* QueSelectPointFromFind - Select a point using the find dialog
*
* DESCRIPTION:
* This function blocks until the user selects a point. If no point
* is selected, queInvalidPointHandle is returned.
*
******************************************************************** }
function QueSelectPointFromFind(*QueAPIExport*)
(parent: HWND;// in: Handle to parent window. NULL if no parent.
var point: QuePointHandle
// out: Handle to selected point. Must be closed with QueClosePoint.
): QueErrT16; cdecl; external QueApiLib;
{********************************************************************
*
* PROCEDURE NAME:
* QueSelectAddressFromFind - Select a point using QueFind's address dialog
*
* DESCRIPTION:
* This function blocks until the user selects a point. If no point
* is selected, queInvalidPointHandle is returned.
*
******************************************************************** }
function QueSelectAddressFromFind(*QueAPIExport*)
(parent: HWND;
// in: Handle to parent window. NULL if no parent.
var addr: QueSelectAddressType;// in: Address data to search on.
var point: QuePointHandle
// out: Handle to selected point. Must be closed with QueClosePoint.
): QueErrT16; cdecl; external QueApiLib;
{********************************************************************
*
* PROCEDURE NAME:
* QueCreatePointFromAddress - Create a point from the given address
*
* DESCRIPTION:
* This attempt to find a point for the given address. If no point
* is found, queInvalidPointHandle is returned.
*
******************************************************************** }
function QueCreatePointFromAddress(*QueAPIExport*)
(var addr: QueSelectAddressType; // in: Address data to search on.
var point: QuePointHandle
// out: Handle to selected point. Must be closed with QueClosePoint.
): QueErrT16; cdecl; external QueApiLib;
implementation
end.
|
|
|
| Back to top |
|
 |
aandagroup
Joined: 21 Sep 2009 Posts: 1
|
Posted: Mon Sep 21, 2009 12:12 am Post subject: queErrInvalidVersion |
|
|
| I have the same problem..i get that error on QueAPIOpen. Did you find out why you get it? |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|