Prototype and description of the function getntvbinaryfile()

(Function of the unlock requiring group "NTv2 Transformations")

 

getntvbinaryfile()
Determination of up to three NTv2 file names matching a Reference System.

Prototype of the DLL function in C++ syntax (attend lower case!):
extern "C" __declspec(dllimport) unsigned long __stdcall getntvbinaryfile(
     unsigned short wRefSys,
     char **pszNtvFileName1,
     char **pszNtvFileName2,
     char **pszNtvFileName3);

Prototype of the DLL function in Visual Objects syntax:
_DLL function getntvbinaryfile;
     (sRefSys as word,;                    // 2 Byte
     pszNtvFileName1 ref psz,;             // 4 Byte, char**, 25 alloc.
     pszNtvFileName2 ref psz,;             // 4 Byte, char**, 25 alloc.
     pszNtvFileName3 ref psz);             // 4 Byte, char**, 25 alloc.
as logic pascal:geodll32.getntvbinaryfile  // 4 Byte


The function returns up to three NTv2 file names matching an NTv2-based
Reference System. The first file name is usually used. It may be followed by
a second, alternatively used file name. The last file name is used for a by
KilletSoft encrypted NTv2 file.

For geodetic calculations with NTv2 grid files, GeoDLL must be aware of the
paths of the files. This is done with three alternative GeoDLL functions:

With the function setntvbinaryfile(), a particular NTv2 file can be
initialized specifically in any directory. That is, for example, necessary
if with the GeoDLL Reference Systems 208 and 209 any, not implicitly by
GeoDLL supported NTv2 file must be initialized. However, the function also
works with all implicitly by GeoDLL supported NTv2 files.

The function setntvbinautofile() can be used to store the NTv2 file path
only in a waiting position. Testing and the allocation of memory space takes
place primary with the first NTv2 Reference System Transition.

With the function setntvbinautodir() an automatically selection and
initializtion of the required NTv2 file can be realized. For this purpose,
the required NTv2 files must be stored in a common directory with up to
three subdirectories. When changing to an NTv2-based Reference System, the
required NTv2 file is searched there. If the file is present in the common
directory, it is initialized automatically.


The parameters are passed and/or returned as follows:
wRefSysQ    NTv2 supported Reference System. The available Reference System
            are specified in the list "Coordinate and Reference Systems".

pszNtvFileName1  First possible NTv2 filename for the corresponding Grid
(ref)       Shift File.
            Note: "ref pszNtvFileName1" corresponds to "char**" in C. 25 bytes
            of memory for the zero terminated string must be allocated with
            dependence to the call of the function setstringallocate().
            Please consider the notes in the description of the  function
            setstringallocate().

pszNtvFileName2  Second possible NTv2 filename for the corresponding Grid
(ref)       Shift File.
            Note: "ref pszNtvFileName2" corresponds to "char**" in C. 25 bytes
            of memory for the zero terminated string must be allocated with
            dependence to the call of the function setstringallocate().
            Please consider the notes in the description of the function
            setstringallocate().

pszNtvFileName3  Third possible NTv2 filename for the corresponding Grid
(ref)       Shift File.
            Note: "ref pszNtvFileName3" corresponds to "char**" in C. 25 bytes
            of memory for the zero terminated string must be allocated with
            dependence to the call of the function setstringallocate().
            Please consider the notes in the description of the function
            setstringallocate().

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


Unlocking:
This function is a component of the unlock requiring function group
"NTv2 Transformations". 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.