OziExplorer API

Version 1.09

Contents


Overview


The OziExplorer API provides an interface which can be used to control the OziExplorer software.

The OziExplorer API provides a DLL which contains many functions which can be called by a user written program. The DLL then passes these commands to the OziExplorer software which reacts to the command.

This document provides the details of the function calls that are available in the OziExplorer API

To use the API the DLL OziAPI.dll must be available in the default folder of the application you write or a folder on the windows search path.

The OziAPI.dll requires OziExplorer version 3.90.4g or better - many functions will require a later version so it is always advisable to make sure you have the latest version of OziExplorer, these are indicated with the function description.

The functions return

Note that this is a controlling interface, it subject to the following limitations.

OziExplorer will react to the command when it is able, this is usually instantly but it may take a few moments if it is busy.

OziExplorer will attempt to carry out the command but there may be reasons why the command could not be completed, it is not always possible to report this. The controlling program using the API should do as much checking as it can before sending the command. Example - if loading a map check that the .map file exists before sending the command.

Notes

In many commands the Data Length of the "string" (char) data is returned. The data length in not usually required as the strings returned are zero delimited and standard string handling functions can be used.

Any strings returned from the API dll are stored in temporary buffers which get reused. The application program should make a copy of any string variables returned as the same buffers may be used for subsequent API calls.

Many functions in the API will only work with the full purchased version of OziExplorer.


System Commands


Timeout Value

function oziAPIsetTimeout(timeout:integer):integer;stdcall;

This sets the timeout value (in milliseconds) (The DLL defaults to 5000 msec).

This is the length of time the API waits before it returns if it has not received acknowledgement of the command from OziExplorer, the acknowledgement is sent after the command has been done. This can cause your software to appear to freeze as it waits.

In some cases a long timeout is not required, it is suggested the timeout be set to a small value (say 200 msec).

Example - checking if OziExplorer is running using the oziFindOzi function does not require a long timeout.


Closing the API

function oziCloseApi:integer;stdcall;

Versions
API - 1.08

Frees up any windows or data the dll has created for its own use.

The function should be called before your own program exits otherwise you may get an error (especially if running on win 2000).

If programming in Delphi you could place the call in the Destroy method of your main form.


Get API Version

function oziGetApiVersion(var Version:pansichar;var DataLength:integer):integer;stdcall;

The version of the API is returned in the Version variable.


Get OziExplorer Version

function oziGetOziVersion(var Version:pansichar;var DataLength:integer):integer;stdcall;

The version of OziExplorer is returned in the Version variable.


Get path to OziExplorer EXE file

function oziGetExePath(var Path:pansichar;var DataLength:integer):integer;stdcall;

The path of the OziExplorer exe file (oziexp.exe) is returned in the Path variable.


Close OziExplorer

function oziCloseProgram:integer;stdcall;

Closes OziExplorer.


Check if OziExplorer is running

function oziFindOzi:integer;stdcall;

If OziExplorer is running the function returns 0 otherwise it returns -1


Check if OziExplorer is Registered (purchased)

function oziRegisterStatus:integer;stdcall;

Checks the Registration Status of OziExplorer

The function returns

Shareware version - 0
Trial version - 1
Registered (purchased) - 2


General Commands


Redraw the map screen

function oziRefreshMap:integer;stdcall;

Versions
API - 1.05
OziExplorer - 3.95.2

Will redraw the map screen in OziExplorer.

Some commands require that you call the oziRefreshmap command so OziExplorer will redraw the map to display the changed data.

Example - if you add a track point the new point will not be drawn unless you call the oziRefreshMap command.


Get Map File path

function oziGetMapFilePath(var MapFilePath:pansichar):integer;stdcall;

Versions
API - 1.05
OziExplorer - 3.95.2

Returns the Map File path setting in OziExplorer.

Useful if you want to use the oziFindBestMap command and want to search the Map File Path.


Get datum of loaded map

function oziGetMapDatum(var Datum:pansichar;var DataLength:integer):integer;stdcall;

Returns the Datum of the currently loaded map in the Datum variable.


Convert between datums

function oziConvertDatum(var DatumFrom:pchar; var DatumTo:pchar; var lat:double; var lon:double):integer;stdcall;

Converts the position from the Datum specified in DatumFrom to the Datum specified in DatumTo.

The position is sent in the lat,lon variables and the converted position is returned in the lat,lon variables.

The datum names must be from the list of Datums in OziExplorer (althought not case sensitive).


Convert Lat/Lon position to grid position

function oziConvertLL2Grid(GridNumber:integer;lat,lon:double;var Datum:pchar;var Zone:pchar; var Easting,Northing:double;
                                            Lat0,Lon0,Lat1,Lat2,K0,X0,Y0:double):integer;stdcall;

;the grid is a number from the list below.

;1=UTM Grid
;2=Transverse Mercator (user grid)
;3=British National grid (BNG,OSGB)
;4=Irish Grid
;5=New Zealand Grid
;6=Swedish Grid
;7=Swiss Grid
;8=France I
;9=France II
;10=France III
;11=France IV
;12=Italy 1 Grid
;13=Italy 2 Grid
;14=Vicmap TM Grid

These parameters are only required for map projections and the Transverse Mercator User Grid.

Returned


Convert grid position to Lat/Lon position

function oziConvertGrid2LL(GridNumber:integer;var Zone:pchar;var ns:pchar; Easting,Northing:double;var Datum:pchar;var lat,lon:double;
                                         lat0,Lon0,lat1,Lat2,K0,X0,Y0:double):integer;stdcall;

Versions
API - 1.07
OziExplorer - 3.95.3e

For the grid numbers to use and map projection parameters see the oziConvertLL2Grid function description above

Zone - the Zone number, for UTM the zone letter need not be included.
ns - for the UTM grid only, N = northern hemisphere, S = southern hemisphere, can be left as null ("") if the utm zone letter is included withthe zone.

Returned


Get elevation at position

function oziGetElevation(lat,lon:double;var Elevation:double;var FileName:pansichar;var resolution:pansichar):integer;stdcall;

Versions
API - 1.07
OziExplorer - 3.95.3e

Parameters

lat,lon - the position in decimal degrees (WGS 84 datum)

Returns

Elevation - the elevation in meters
Filename - the name of the height data file the elevation was extracted from
resolution - the resolution (grid spacing) of the height data as a string


Get map image location for position

function oziGetPixelXY(lat,lon:double;var x,y:integer):integer;stdcall;

Versions
API - 1.07
OziExplorer - 3.95.3e

Parameters

lat,lon - the position in decimal degrees (WGS 84 datum)

Returns

x,y - pixel position representing the lat,lon coordinates


Callback Commands


Enable procedure for single map clicks

function oziMapSingleClickON(p:TMapSingleClickCallback):integer;stdcall;

When turned ON OziExplorer will return the single map clicks by calling the procedure which has its address specified in the p variable. This must be a procedure defined as below.

The Callback Procedure

procedure MapSingleClickCallback(var oType:pchar; x,y:integer; Lat,Lon:double;var UTMZone:pchar; easting,northing:double);stdcall;


Disable single map click intercept

function oziMapSingleClickOFF:integer;stdcall;

Turns off the single click


Enable procedure for double map clicks

function oziMapDblClickON(p:TMapDblClickCallback):integer;stdcall;

When turned ON OziExplorer will return the double map clicks by calling the procedure which has its address specified in the p variable. This must be a procedure defined as below.

The Callback Procedure

procedure MapDblClickCallback(var oType:pchar; x,y:integer; Lat,Lon:double;var UTMZone:pchar; easting,northing:double);stdcall;


Disable double map click intercept

function oziMapDblClickOFF:integer;stdcall;

Turns off the double click.


Enable procedure for map object clicks

function oziObjectClickON(p:TObjectClickCallback):integer;stdcall;

When turned ON OziExplorer will return the Object map clicks by calling the procedure which has its address specified in the p variable. This must be a procedure defined as below.

The Callback Procedure

procedure(var oType:pchar;  Lat,Lon:double;var UTMZone:pchar; easting,northing:double; var sName:pchar);stdcall;


Disable map object click intercept

function oziObjectClickOFF:integer;stdcall;

Turns off the Object click.


Map Commands


Load Map

function oziLoadMap(var MapName:pansichar):integer;stdcall;

Loads a map file

Specify the full path and name of the file.


Save map

function oziSaveMap(var MapName:pansichar):integer;stdcall;

Saves a map file

If the MapName is empty the map file is saved using its current name

If the MapName is not empty the map file is saved using the specified name.


Toggle map saved flag

function oziSaveMapFlag(Flag:boolean):integer;stdcall;

If Flag is true then the map loaded into OziExplorer is assumed to be saved and the user will not be prompted to save it when a new map is loaded or OziExplorer is closed.


Find map at position

function oziFindMapAtPosition(Lat,Lon:double):integer;stdcall;

Requires OziExplorer version 3.90.4h2 or later

The available maps will be scanned and a list of maps presented for selection (within OziExplorer), the map will be centered on the specified position and a mark added at the position (a bullseye).


Center map at position

function oziCenterMapAtPosition(Lat,Lon:double):integer;stdcall;

The map will be centered at the specified position.


Center map at position, with mark

function oziCenterMapAtPositionWithMark(Lat,Lon:double):integer;stdcall;

The map will be centered at the specified position and a mark added at the position (a bullseye).


Check if position on map

function oziIsPositionOnMap(lat,lon:double):integer;stdcall;

Versions
API - 1.05
OziExplorer - 3.95.2

lat,lon - the position in decimal degrees (WGS 84 datum)

Returns 1 if the position is on the current map 0 if it is not on the map.

Useful to create a moving map in OziExplorer without using the OziExplorer built in moving map function.


Find best map for position

function oziFindBestMap(lat,lon:double;SubFolders:integer;var MapPath:pansichar;var MapFile:pansichar):integer;stdcall;

Versions
API - 1.05
OziExplorer - 3.95.2

lat,lon - the position in decimal degrees (WGS 84 datum)
SubFolders - 0 = do not search subfolders ; 1=search subfolders
MapPath - the path to search, use the oziGetMapFilePath command if you want the Map File path setting.
MapFile - the name of the best map is returned in this variable

Will return the best (most detailed) map it finds which matches the lat,lon position.

Useful to create a moving map in OziExplorer without using the OziExplorer built in moving map function.


Save map image

function oziSaveMapImage(FileName:pansichar):integer;stdcall;

Versions
API - 1.07
OziExplorer - 3.95.3e

Parameters

FileName - the name of the file to save the map image to (.png or .bmp extensions can be used).

Note - some licensed image formats cannot be saved.


Waypoint Commands


Get waypoint number for name

function oziGetWpNumberFromName(var name:pansichar):integer;stdcall;

Versions
API - 1.05
OziExplorer - 3.95.2

name - the waypoint name

Will return the first waypoint number which matches the name.

0 = name not found


Delete waypoint by name

function oziDeleteWpByName(var name:pansichar):integer;stdcall;

Versions
API - 1.05
OziExplorer - 3.95.2

Will delete the first waypoint it finds with the specified name.


Delete waypoint by number

function oziDeleteWpByNumber(wpNum:integer):integer;stdcall;

Versions
API - 1.05
OziExplorer - 3.95.2

Will delete the specified waypoint.

Caution - Since Version 3.95.4 of OziExplorer waypoint numbers will not remain constant, as waypoints are deleted OziExplorer changes the numbers for waypoints as it removes the space from the internal memory array of waypoints. The best option is not to use this function at all, use the oziDeleteWpByName function.


Clear all waypoints

function oziClearWPs:integer;stdcall;

Will clear all Waypoints from the map.


Create waypoint(extended)

function oziCreateWPex(var Name:pchar;Symbol:integer;lat,lon:double;Altitude:double;wpDate:double
;MapDisplayFormat:integer;PointerDirection:integer;GarminDisplayFormat:integer
;ForeColor,BackColor:integer;ProximityDistance:integer;var Description:pchar
;FontSize:integer;FontStyle:integer;SymbolSize:integer
;ProximitySymbolPos:integer;ProximityTime:double;ProximityRoute:integer
;var FileAttachmentName:pchar;var ProximityFileAttachmentName:pchar
;var ProximitySymbolName:pchar ):integer;stdcall;

Requires OziExplorer version 3.90.4j or later

Creates a waypoint at the specified position with the specified parameters.

The return value is the internal OziExplorer number of the Waypoint created. This number may need to be stored locally if the Waypoint is to be manipulated later in your program.

For most parameters a value of -1 can be specified, this means use the OziExplorer default,
The ** indicates that the above option applies for the field.

Name - the name of the waypoint
Symbol - the symbol number ; **
lat,lon - the position in decimal degrees (WGS 84 datum)
Altitude - in meters (-777 = altitude unknown)
wpDate - the format of the date is at the end of this document ; -1 = use todays date and time.
MapDisplayFormat - 0 to 8 ; **
PointerDirection - 0 to 3 ; **
GarminDisplayFormat - 0 to 2 ; **
ForeColor - RGB color ; **
BackColor - RGB color ; **
ProximityDistance - in meters (0 = no proximity)
Description - text string
FontSize - in points ; **
FontStyle - 0 = normal ; 1 = bold ; **
SymbolSize - 17 = normal ; **
ProximitySymbolPos -
0 to 7, 0 = top left
ProximityTime -
time in seconds
ProximityRoute -
0 = proximity, 1 = route, 2 = proximity and route
FileAttachmentName -
file name with path.
ProximityFileAttachmentName -
file name with path.
ProximitySymbolName -
file name with path.


Create waypoint

function oziCreateWP(var Name:pchar;Symbol:integer;lat,lon:double;Altitude:double;wpDate:double ;MapDisplayFormat:integer;PointerDirection:integer;GarminDisplayFormat:integer
;ForeColor,BackColor:integer;ProximityDistance:integer;var Description:pchar
;FontSize:integer;FontStyle:integer;SymbolSize:integer):integer;stdcall;

Also see oziCreateWPex above.

Creates a waypoint at the specified position with the specified parameters.

The return value is the internal OziExplorer number of the Waypoint created. This number may need to be stored locally if the Waypoint is to be manipulated later in your program.

For most parameters a value of -1 can be specified, this means use the OziExplorer default,
The ** indicates that the above option applies for the field.

Name - the name of the waypoint
Symbol - the symbol number ; **
lat,lon - the position in decimal degrees (WGS 84 datum)
Altitude - in meters (-777 = altitude unknown)
wpDate - the format of the date is at the end of this document ; -1 = use todays date and time.
MapDisplayFormat - 0 to 8 ; **
PointerDirection - 0 to 3 ; **
GarminDisplayFormat - 0 to 2 ; **
ForeColor - RGB color ; **
BackColor - RGB color ; **
ProximityDistance - in meters (0 = no proximity)
Description - text string
FontSize - in points ; **
FontStyle - 0 = normal ; 1 = bold ; **
SymbolSize - 17 = normal ; **


Load waypoint file

function oziLoadWPfile(var FileName:pansichar):integer;stdcall;

Loads a waypoint file.

Specify the full path and name of the file.


Save waypoint file

function oziSaveWPfile(var FileName:pansichar):integer;stdcall;

Saves a waypoint file.

Specify the full path and name of the file.


Toggle waypoints saved flag

function oziSaveWPflag(Flag:boolean):integer;stdcall;

If Flag is true then the waypoints loaded into OziExplorer are assumed to be saved and the user will not be prompted to save it when a new waypoint file is loaded or OziExplorer is closed.


Reposition waypoint

function oziRepositionWP(Number:integer;lat,lon:double):integer;stdcall;

The waypoint pointed to by the specified number is repositioned to the specified position.

The waypoint number is returned when a new waypoint is created via the API.


Route Commands


Clear all routes

function oziClearRTEs:integer;stdcall;

Will clear all Routes from the map.


Toggle routes saved flag

function oziSaveRTEflag(Flag:boolean):integer;stdcall;

Requires OziExplorer version 3.90.4j or later

If Flag is true then the routes loaded into OziExplorer are assumed to be saved and the user will not be prompted to save it when a new route file is loaded or OziExplorer is closed.


Load route file

function oziLoadRTEfile(var FileName:pansichar):integer;stdcall;

Requires OziExplorer version 3.90.4j or later

Loads a route file.

Specify the full path and name of the file.


Point Commands


Toggle points saved flag

function oziSavePTflag(Flag:boolean):integer;stdcall;

If Flag is true then the points loaded into OziExplorer are assumed to be saved and the user will not be prompted to save it when a new point file is loaded or OziExplorer is closed.


Clear all points

function oziClearPTs:integer;stdcall;

Will clear all Points from the map.


Load point file

function oziLoadPTfile(PointSetNum:integer;var FileName:pansichar):integer;stdcall;

Loads a point file.

Specify the point set number to load into (1 to 75).

Specify the full path and name of the file.


Event Commands


Clear all events

function oziClearEVs:integer;stdcall;

Will clear all Events from the map.


Track Commands


Clear all tracks

function oziClearAllTracks:integer;stdcall;

Versions
API - 1.05
OziExplorer - 3.95.2

Will clear all Tracks from the map.


Clear a track

function oziClearTrack(TrackNum:integer):integer;stdcall;

Versions
API - 1.05
OziExplorer - 3.95.2

Will clear the specified Track Number from the map.


Show all tracks

function oziShowAllTracks:integer;stdcall;

Versions
API - 1.05
OziExplorer - 3.95.2

Will turn on the display of the tracks.


Hide all tracks

function oziHideAllTracks:integer;stdcall;

Versions
API - 1.05
OziExplorer - 3.95.2

Will turn off the display of the tracks.


Show a track

function oziShowTrack(TrackNum:integer):integer;stdcall;

Versions
API - 1.05
OziExplorer - 3.95.2

Will turn on the display of the specified track.

Note - track display must be turned on as well.

Except for track 1, all tracks are initially turned off so the use of this command is necessary if you are adding track points to a track.


Hide a track

function oziHideTrack(TrackNum:integer):integer;stdcall;

Versions
API - 1.05
OziExplorer - 3.95.2

Will turn off the display of the specified track.


Create track point

function oziCreateTrackPoint(TrackNum,Code:integer;lat,lon,altitude:double;tpDate:double):integer;stdcall;

Versions
API - 1.05
OziExplorer - 3.95.2

TrackNum - the number of the track (1..75)
Code - 1 = new track section ; 0 = draw line from last point
lat,lon - the latitude and longitude in the WGS 84 datum
altitude - the altitude ; -777 = no altitude
tpDate - the date in the correct format (see the bottom of this document)

Don't forget to turn on the individual track using oziShowTrack and display all tracks using oziShowAllTracks.


Set track description

function oziSetTrackDescription(TrackNum:integer;var TrackDescription:pansichar):integer;stdcall;

Versions
API - 1.05
OziExplorer - 3.95.2

Specify the description for the track.


Set track type

function oziSetTrackType(TrackNum,TrackType:integer):integer;stdcall;

Versions
API - 1.05
OziExplorer - 3.95.2

Specify the track type

0 = line
1 = points only (no lines)
10 = closed polygon
20 = alarm zone


Set track width

function oziSetTrackWidth(TrackNum,TrackWidth:integer):integer;stdcall;

Versions
API - 1.05
OziExplorer - 3.95.2

Set the track width in pixels.


Set track color

function oziSetTrackColor(TrackNum,TrackColor:integer):integer;stdcall;

Versions
API - 1.05
OziExplorer - 3.95.2

Specify the track number to set (1 to 75).

Specify the track color as a RGB integer.


Load track file

function oziLoadTrackFile(TrackNum:integer;var FileName:pansichar):integer;stdcall;

Versions
API - 1.05
OziExplorer - 3.95.2

Loads a track file.

Specify the track number to load into (1 to 75).

Specify the full path and name of the file.


Save track file

function oziSaveTrackFile(TrackNum:integer;var FileName:pansichar):integer;stdcall;

Versions
API - 1.05
OziExplorer - 3.95.2

Save the specified track.


Toggle track saved flag

function oziSaveTrackFlag(TrackNum:integer;Flag:boolean):integer;stdcall;

Versions
API - 1.05
OziExplorer - 3.95.2

If Flag is true then the track loaded into OziExplorer is assumed to be saved and the user will not be prompted to save it when a new track file is loaded or OziExplorer is closed.


Map Feature Commands


Clear all map features

function oziClearMFs:integer;stdcall;

Will clear all Map Features.

If the map is saved after clearing the map features there will be no map features saved in the .map file.


Create map feature

function oziCreateMF(var Name:pchar;lat,lon:double;var Description:pchar;var PictureName:pchar;var SymbolName:pchar;
                                  CreateWp:integer; var WpName:pchar):integer;stdcall;

Creates a map feature at the specified position with the specified parameters.

The return value is the internal OziExplorer number of the Map Feature created. This number may need to be stored locally if the Map Feature is to be manipulated later in your program.

Name - the name of the map feature
lat,lon - the position in decimal degrees (WGS 84 datum)
Description - text string
PictureName - path and name to the image
SymbolName - name of the symbol (must be in the symbols folder)
CreateWp - 0 = no ; 1 = yes
WpName - text string (must be a valid name for the GPS)


Delete map feature by number

function oziDeleteMfByNumber(mfNum:integer):integer;stdcall;

Versions
API - 1.05
OziExplorer - 3.95.2

Delete the Map Feature.


Reposition map feature

function oziRepositionMF(Number:integer;lat,lon:double):integer;stdcall;

The map feature pointed to by the specified  number is repositioned to the specified position.

The map feature number is returned when a new map feature is created via the API.


Map Comment Commands


Clear all map comments

function oziClearMCs:integer;stdcall;

Will clear all Map Comments from the map

If the map is saved after clearing the map comments there will be no map comments saved in the .map file.


Create map comment

function oziCreateMC(var Name:pchar;lat,lon:double; ForeColor, BackColor, Width, Height,FontSize, FontStyle:integer):integer;stdcall;

Creates a map comment at the specified position with the specified parameters.

The return value is the internal OziExplorer number of the Map Comment created. This number may need to be stored locally if the Map Comment is to be manipulated later in your program.

For most paramteres a value of -1 can be specified, this means use the OziExplorer default,
The ** indicates that the above option applies for the field.

Name - the name of the map comment
lat,lon - the position in decimal degrees (WGS 84 datum)
ForeColor - RGB color ; **
BackColor - RGB color ; **
Width - any integer ; **
Height - any integer ; **
FontSize - in points ; **
FontStyle - 0 = normal ; 1 = bold ; **


Delete map comment by number

function oziDeleteMcByNumber(mcNum:integer):integer;stdcall;

Versions
API - 1.05
OziExplorer - 3.95.2

Delete the specified Map Comment.


Reposition map comment

function oziRepositionMC(Number:integer;lat,lon:double):integer;stdcall;

The map comment pointed to by the specified number is repositioned to the specified position.

The map comment number is returned when a new map feature is created via the API.


Moving Map Commands


Start moving map(serial)

function oziStartMMserial:integer;stdcall;

Requires OziExplorer version 3.90.4h2 or later

Starts Moving Map in OziExplorer, NMEA is expected on the serial port. This is the same as starting Moving Map using OziExplorer's own menu command.


Start moving map(api)

function oziStartMMapi:integer;stdcall;

Requires OziExplorer version 3.90.4h2 or later

Starts Moving Map in OziExplorer but NMEA is expected to be sent by the API dll using the oziSendMMstring command.


Send NMEA strings

function oziSendMMstring(var NmeaString:pchar):integer;stdcall;

Requires OziExplorer version 3.90.4h2 or later

Send NMEA strings to OziExplorer. The strings must be one or more of the supported types of NMEA strings. ($GPRMC, $GPGGA, $GPGLL, $ GPVTG).

To use this command Moving map in OziExplorer must be started using the oziStartMMapi command above.


Stop moving map

function oziStopMM:integer;stdcall;

Requires OziExplorer version 3.90.4h2 or later

Turns OFF Moving Map.


Enable procedure for moving map data

function oziSendMMpositionON(p:TMMpositionCallback):integer;stdcall;

When turned ON OziExplorer will return the moving map data by OziExplorer calling the procedure which has its address specified in the p variable. This must be a procedure defined as below.

The Callback Procedure

TMMpositionCallback = procedure(lat,lon,speed,course,magvar,altitude:double);stdcall;

procedure MMpositionCallback(Lat,Lon,speed,heading,magvar,altitude:double);stdcall;


Disable moving map data intercept

function oziSendMMpositionOFF:integer;stdcall;

Turns off the sending of moving map data


Get navigation data

function oziGps2NavWp(var sname:pansichar;var description:pansichar;var distance:double;var bearing:double):integer;stdcall;

From the current GPS position return the name, description, distance and bearing to the waypoint being navigated to.


Oedometer Commands

OziExplorer has 2 Oedometers available which can be manipulated by the API


Enable oedometer 1

function oziOedometer1ON(p:TOedometer1Callback):integer;stdcall;

Turn oedometer 1 on

The Oedometer will be turned on and the distance will be returned by OziExplorer calling the procedure which has its address specified in the p variable. This must be a procedure defined as below.

TOedometer1Callback = procedure (d:double);stdcall;

procedure Oedometer1Callback(d:double);stdcall;


Disable oedometer 1

function oziOedometer1OFF:integer;stdcall;

Turn oedometer 1 off


Reset oedometer 1

function oziOedometer1Reset:integer;stdcall;

Reset oedometer 1 to zero


Set oedometer 1

function oziOedometer1Set(d:double):integer;stdcall;

Set oedometer 1 to a specific value


Oedometer 1 increments

function oziOedometer1UP:integer;stdcall;

Oedometer 1 counts up


Oedometer 1 decrements

function oziOedometer1DOWN:integer;stdcall;

Oedometer 1 counts down


Oedometer 2

Oedometer 2 Commands are the same as above but operate on Oedometer 2

function oziOedometer2ON(p:TOedometer2Callback):integer;stdcall;
function oziOedometer2OFF:integer;stdcall;
function oziOedometer2Reset:integer;stdcall;
function oziOedometer2Set(d:double):integer;stdcall;
function oziOedometer2UP:integer;stdcall;
function oziOedometer2DOWN:integer;stdcall;


API calling conventions


Date Format

Delphi stores date and time values in the TDateTime type. The integral part of a TDateTime value is the number of days that have passed since 12/30/1899. The fractional part of a TDateTime value is the time of day.

Following are some examples of TDateTime values and their corresponding dates and times:

0 - 12/30/1899 12:00 am
2.75 - 1/1/1900 6:00 pm
-1.25 - 12/29/1899 6:00 am
35065 - 1/1/1996 12:00 am


pansichar data type

pansichar is a pointer to the first character of an ANSI string. The string must be a null-terminated (C-like) string. The characters in the string are single characters, 8 bits in size.


pchar data type

pchar is a pointer to the first character of a character string. The string must be a null-terminated (C-like) string. The characters in the string are not guaranteed to be 1 byte in size.


integer data type

integer is an integer value, 1 bit sign, and 31 bits for the value.


double data type

double is the general purpose floating point type in Delphi. It strikes the balance between capacity/precision versus storage/performance. It supports approximately 15 digits of precision in a range from 2.23 x 10*-308 to 1.79 x 10*308.


boolean data type

boolean provides an enumeration of the logical True and False values.