Prototype and description of the function convntvbin2gridexport()

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

 

convntvbin2gridexport()
Export an NTv2 grid from a binary source file to a new binary target file.

Prototype of the DLL function in C++ syntax (attend lower case!):
extern "C" __declspec(dllimport) unsigned long __stdcall convntvbin2gridexport(
     const char *pszFileSource,
     const char *pszFileTarget,
     unsigned short nGridSource);

Prototype of the DLL function in Visual Objects syntax:
_DLL function convntvbin2gridexport(;
     pszFileSource as psz,;                     // 4 Byte, char*
     pszFileTarget as psz,;                     // 4 Byte, char*
     nGridSource word);                         // 2 Byte
as logic pascal:geodll32.convntvbin2gridexport  // 4 Byte


The function exports the NTv2 grid with the number nGridSource from a binary
NTv2 source file into a new binary NTv2 target file. The file header of the
source file is copied to the target file. There the number of grids
NUM_FILE is set to "1" and the name of the parent grid is set to "NONE".
Behind the file header, the exported grid with the grid header and the grid
data is copied.

The number nGridSource of the grid to be exported can be determined with the
function getBinGridHeader().

The file names of the NTv2 source file and the NTv2 target file to generate
new may contain a drive letter and a directory path.
Example:
Soruce file  "c:\programm_ntv2\BeTA2007.gsb"
Target file  "c:\programm_ntv2\Germany.gsb"
Attention, in C syntax double backslashes must be used!


The parameters are passed and/or returned as follows:
pszFileSource  File name of the NTV2 binary file which is used as source for
              the export of an NTv2 grid. The file name may contain a drive
              letter, a directory path and a file name extension. The file
              name should have the file name extension ".gsb".

pszFileTarget  File name of the NTv2 binary file which is to be generated
              to include the exported ntv2 grid. The file name may contain a
              drive letter, a directory path and a file name extension. The
              file name should have the file name extension ".gsb".

nGridSource   Number of the NTv2 grid to be exported from the source file.

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
tools". 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 no
calls for test purposes (shareware principle) are possible with this function.