Prototype and description of the function getunitname()

(Function of the unlock requiring group "Parameter determination")

 

getunitname()
Determination of the designation of a Measurement Unit.

Prototype of the DLL function in C++ syntax (attend lower case!):
extern "C" __declspec(dllexport) unsigned long __stdcall getunitname(
     unsigned short nUnit,
     char **pszUnitName);

Prototype of the DLL function in Visual Objects syntax:
_DLL function getunitname(;
     nUnit as word,;                       // 2 Byte
     pszUnitName ref psz);                 // 4 Byte, char**, 80 alloc.
as logic pascal:geodll32.getunitname      // 4 Byte

The allocation of memory for "ref psz" / "char**" is necessary only if
setstringallocate(FALSE) is called before.


The function returns the designation of the Measurement Unit fitting to
nUnit as text in the parameter pszUnitName to the calling program. The text is
returned in the language set by the function setLanguage() before.


The parameters are passed and/or returned as follows:
nUnit       Measurement Unit, for which the designation is to be determined.
            The available Measurement Units are specified in the list
            "Coordinate Reference Systems alphabetical (bottom)".

pszUnitName The designation or the Measurement Unit is returned by reference.
(ref)       Note: "ref pszUnitName" corresponds to "char**" in C. 80 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.


The returned text looks dependently of the Measurement Unit e.g. like this:
   International Meter (1.0 Meter)
      or
   US Survey Foot (0.30480061 Meter)


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