Prototype and description of the function getntvgridcount()

(Function of the unlock requiring group "NTv2 grid data")


Determination of the count of subgrids contained in a NTv2 file.

Prototype of the DLL function in C++ syntax (attend lower case!):
__declspec(dllimport) unsigned long __stdcall getntvgridcount(
     char *pszFileNtv,
     unsigned long lAscii,
     unsigned short *ngridCount);

Prototype of the DLL function in Visual Objects syntax:
_DLL function getntvgridcount;
     (pszFileNtv as psz,;                  // 4 Byte, char*
     lAscii as logic,;                     // 4 Byte
     ngridCount ref word);                 // 4 Byte
as logic pascal:geodll32.getntvgridcount

The function returns for a ASCII or binary formatted NTv2 file the number
of the contained subgrids.

The parameters are passed and/or returned as follows:
pszFileNtv  File name of the ASCII or binary formatted NTv2 file from
            which the number of the contained subgrids is to be
            determined. The file name may contain a drive letter, a
            directory path and a file name extension.

lAscii      TRUE: The NTv2 file is ASCII formatted.
            FALSE: The NTv2 file is binary formatted.

ngridCount  The number of the subgrids contained in the NTv2 file. The
(ref)       number of the subgrids is returned by reference.

returnVal   In case of an error the function returns FALSE, otherwise TRUE.

This function is a component of the unlock requiring function group
"NTv2 grid data". It is unlocked for unrestricted use together with the
other functions of the group by passing the unlock parameters, acquired
from the software distribution company, trough the function setunlockcode().
Without unlocking only a few function calls for test purposes (shareware
principle) are possible. It should be noted that in addition the function
group "Coordinate Transformations" must be unlocked.