home *** CD-ROM | disk | FTP | other *** search
/ Windows 6-Pak - Disc 5 / Windows 6-Pak (InfoMagic) (Disc 5) (1999).ISO / C&C++Tools / sbparser.exe / dll / inc / astsbpar.cpp next >
Encoding:
C/C++ Source or Header  |  1998-10-11  |  36.4 KB  |  1,160 lines

  1. /*  Projekt csbparse
  2.     softbase
  3.      Copyright ⌐ 1993-1998 by SoftBase
  4.  
  5.      SUBSYSTEM:     csbparse.dll 3.7
  6.      FILENAME:       astdsbpar.cpp
  7.  
  8.      ABSTRACT
  9.      ========
  10.     Functions for creation and use of sbParser and sbCalculator objects by
  11.     HANDLE (void*) with any C/C++ compiler.
  12. */
  13.  
  14. #include <astsbpar.h> //Link necessary header
  15.  
  16. //------ DLL functions ---------------------------------------------------------
  17.  
  18. char*     ( *DLLGetParserVersionString)(char* strbuffer);
  19. char*     ( *DLLGetParserVersionNumber)(char* strbuffer);
  20.  
  21. bool         ( *DLLInitSTDsbParserDLL2)(char* iv);
  22. bool         ( *DLLDeinitSTDsbParserDLL2)(void);
  23. int        ( *DLLGetInitCount)(void);
  24. bool        ( *IsRegSTDsbParserDLL)(void);
  25.  
  26. //------ sbParser functions ----------------------------------------------------
  27.  
  28. //iux == reserved for internal use
  29. void*            ( *DLLCreateNewParser1)(char *FunctionIn, int VarCountIn,
  30.       char *VarDescIn,
  31.       bool iu1 = true, bool iu2 = true, bool iu3 = true, bool iu4 = true);
  32. void*         ( *DLLCreateNewParser2)(char *FunctionIn, int BaseIn = 10,
  33.       bool iu1 = true, bool iu2 = true, bool iu3 = true, bool iu4 = true);
  34. void*         ( *DLLCreateNewParser3)(char *FunctionIn, int BaseIn,
  35.         int VarCountIn, char *VarDescIn,
  36.       bool iu1 = true, bool iu2 = true, bool iu3 = true, bool iu4 = true);
  37.  
  38. bool             ( *DLLDeleteParser)(void* hParser);
  39.  
  40. bool             ( *DLLSetVarCont)(void* hParser, const char *AVarDescIn,
  41.         long double VarContIn);
  42.  
  43. long double ( *DLLGetResult1)(void* hParser);
  44. long double ( *DLLGetResult2)(void* hParser, long double VarContIn);
  45. long double ( *DLLGetResultExt)(void* hParser, long double VarContIn[]);
  46.  
  47. bool ( *DLLIsParserFunction)(const char *FuncStrIn);
  48.  
  49. //use these functions if your compiler doesn't support long double (80bit)
  50. bool             ( *DLLdSetVarCont)(void* hParser, const char *AVarDescIn,
  51.         double VarContIn);
  52.  
  53. double         ( *DLLdGetResult1)(void* hParser);
  54. double         ( *DLLdGetResult2)(void* hParser, double VarContIn);
  55. double         ( *DLLdGetResultExt)(void* hParser, double VarContIn[]);
  56. //+++
  57.  
  58. const char*    ( *DLLGetOriginFunc)(void* hParser, char *strbuffer);
  59. long            ( *DLLGetOriginFuncLen)(void* hParser);
  60. int            ( *DLLGetOriginVarCount)(void* hParser);
  61. bool             ( *DLLGetIsOriginFunc)(void* hParser, char *FunctionIn);
  62.  
  63. bool             ( *DLLGetIsError)(void* hParser);
  64. int             ( *DLLGetGlobalError)(void* hParser);
  65. char*            ( *DLLGetUnknownFunction)(void* hParser, char *strbuffer);
  66.  
  67. bool             ( *DLLSetBaseTo)(void* hParser, int BaseIn);
  68. bool             ( *DLLSetAngularUnitTo)(void* hParser, int AngularUnitIn);
  69. bool             ( *DLLSetNewFunction)(void* hParser, char *FunctionIn);
  70.  
  71. int             ( *DLLGetBase)(void* hParser);
  72. int             ( *DLLGetAngularUnit)(void* hParser);
  73.  
  74. //------ useful functions -----------------------------------------------------
  75.  
  76. bool             ( *DLLConvertToBase)(char *strbuffer, const long double value,
  77.                                 int b_point, int BaseIn);
  78. long double    ( *DLLConvertBaseTold1)(const char *strValue, int BaseIn,
  79.                                 char **endptr = NULL);
  80. long double    ( *DLLConvertBaseTold2)(const char *strValue, int BaseIn,
  81.                         int* errPos);
  82.  
  83. unsigned int( *DLLSetFPError)(bool Enable = FALSE);
  84.  
  85. char*            ( *DLLldtochar)(char *strbuffer, const long double value,
  86.                                 int point = 0, bool Validate = true);
  87. long double    ( *DLLchartold1)(const char *strValue, char **endptr = NULL,
  88.                                 bool Validate = true);
  89. long double    ( *DLLchartold2)(const char *strValue, int* errPos,
  90.                                 bool Validate = true);
  91.  
  92. long double ( *DLLcorrroundl1)(long double value);
  93. long double ( *DLLcorrroundl2)(long double value, int point);
  94.  
  95. char*         ( *DLLturnintochar)(char *strbuffer, const char *SubFuncIn,
  96.                                 const char *searchIn,
  97.                                 const char *turnIn, bool singleVar);
  98. char*         ( *DLLGetLastValue)(char* strbuffer,const char* SearchString,
  99.                                   int CurrPos,int *StartPos,bool withOper = false);
  100.  
  101. //use these functions if your compiler doesn't support long double (80bit)
  102. bool             ( *DLLdConvertToBase)(char *strbuffer, const double value,
  103.                                 int b_point, int BaseIn);
  104. double        ( *DLLConvertBaseTod1)(const char *strValue, int BaseIn,
  105.                                 char **endptr = NULL);
  106. double        ( *DLLConvertBaseTod2)(const char *strValue, int BaseIn,
  107.                         int* errPos);
  108.  
  109. char*            ( *DLLdtochar)(char *strbuffer, const double value,
  110.                                 int point = 0, bool Validate = true);
  111. double        ( *DLLchartod1)(const char *strValue, char **endptr = NULL,
  112.                                 bool Validate = true);
  113. double        ( *DLLchartod2)(const char *strValue, int* errPos,
  114.                                 bool Validate = true);
  115.  
  116. double         ( *DLLcorrround)(double value, int point);
  117. //+++
  118.  
  119. //------ Debug and Information -------------------------------------------------
  120.  
  121. bool             ( *DLLGetDebugsbDLL)(void);
  122. bool             ( *DLLSetDebugsbDLL)(bool debugIn);
  123.  
  124. bool             ( *DLLGetVarStruct)(void* hParser, void* VarStructIn);
  125. bool             ( *DLLGetOpStructPos)(void* hParser, int pos, char *buffFunction,
  126.                                   int* val1, int* val2, int* valResult);
  127. bool             ( *DLLGetInvValuesPos)(void* hParser, int pos, long double *val);
  128.  
  129. //use these functions if your compiler doesn't support long double (80bit)
  130. bool             ( *DLLdGetVarStruct)(void* hParser, void* VarStructIn);
  131. bool             ( *DLLdGetInvValuesPos)(void* hParser, int pos, double *val);
  132. //+++
  133.  
  134. //------ sbCalculator functions ------------------------------------------------
  135.  
  136. void*         ( *DLLCreateNewCalculator)(char *InitStr, bool fastIn = true,
  137.                                 int VarCountIn = 0, char* VarDescIn = "");
  138.  
  139. bool             ( *DLLDeleteCalculator)(void* hCalculator);
  140.  
  141. int             ( *DLLGetVarCount)(void* hCalculator);
  142. char*         ( *DLLGetFunction)(void* hCalculator, char *strbuffer);
  143.  
  144. //iux == reserved for internal use
  145. bool             ( *DLLMake)(void* hCalculator, char *Input, bool iu1 = false);
  146.  
  147. char*         ( *DLLGetShowFunc)(void* hCalculator, char *strbuffer, int point = 0,
  148.                                  long double VarContIn[] = 0, bool ext = false,
  149.                         char* secondShow = 0);
  150. long double ( *DLLGetLastResult)(void* hCalculator);
  151.  
  152. //use these functions if your compiler doesn't support long double (80bit)
  153. char*         ( *DLLdGetShowFunc)(void* hCalculator, char *strbuffer, int point = 0,
  154.                                  double VarContIn[] = 0, bool ext = false,
  155.                         char* secondShow = 0);
  156. double         ( *DLLdGetLastResult)(void* hCalculator);
  157. //+++
  158.  
  159. char*         ( *DLLGetInfo)(void* hCalculator, char *strbuffer);
  160.  
  161. void             ( *DLLSetFast)(void* hCalculator, bool fastIn = true);
  162. bool             ( *DLLGetFast)(void* hCalculator);
  163.  
  164. void             ( *DLLSetFatalErr)(void* hCalculator, bool FatalErrIn=true);
  165. bool             ( *DLLGetFatalErr)(void* hCalculator);
  166.  
  167. bool             ( *DLLSetAngularUnitInOutTo)(void* hCalculator, int AngularUnitIn);
  168. int             ( *DLLGetAngularUnitInOut)(void* hCalculator);
  169. bool             ( *DLLSetBaseInTo)(void* hCalculator, int BaseIn);
  170. int             ( *DLLGetBaseIn)(void* hCalculator);
  171. bool             ( *DLLSetBaseOutTo)(void* hCalculator, int BaseIn);
  172. int             ( *DLLGetBaseOut)(void* hCalculator);
  173.  
  174. //------ DLL functions ---------------------------------------------------------
  175.  
  176. const char stdsbparDLL[] = "CSBPARSE.DLL";
  177. HINSTANCE hSTDsbParserDLL = 0;
  178. bool mainDLLerr = false;
  179.  
  180. bool InitSTDsbParserDLL(char* iv) {
  181.     mainDLLerr = false;
  182.  
  183.    hSTDsbParserDLL = LoadLibrary(stdsbparDLL);
  184.    if((unsigned)hSTDsbParserDLL<=HINSTANCE_ERROR) {
  185.         MessageBox(NULL, "CSBPARSE.DLL not found", "Library Error", MB_OK | MB_ICONERROR);
  186.       mainDLLerr = true;
  187.        return FALSE;
  188.    }
  189.  
  190.    DLLGetParserVersionString = (char*( *)(char*)) GetProcAddress(hSTDsbParserDLL, "@GetParserVersionString$qpc");
  191.    DLLGetParserVersionNumber = (char*( *)(char*)) GetProcAddress(hSTDsbParserDLL, "@GetParserVersionNumber$qpc");
  192.  
  193.    DLLInitSTDsbParserDLL2 = (bool( *)(char*)) GetProcAddress(hSTDsbParserDLL, "@InitSTDsbParserDLL$qpc");
  194.    DLLDeinitSTDsbParserDLL2 = (bool( *)(void)) GetProcAddress(hSTDsbParserDLL, "@DeinitSTDsbParserDLL$qv");
  195.    DLLGetInitCount = (int( *)(void)) GetProcAddress(hSTDsbParserDLL, "@GetInitCount$qv");
  196.    IsRegSTDsbParserDLL = (bool( *)(void)) GetProcAddress(hSTDsbParserDLL, "@IsRegSTDsbParserDLL$qv");
  197.  
  198.     DLLCreateNewParser1 = (void*( *)(char *, int,
  199.       char *,
  200.       bool, bool, bool, bool)) GetProcAddress(hSTDsbParserDLL, "@CreateNewParser$qpcit14boolt4t4t4");
  201.     DLLCreateNewParser2 = (void*( *)(char *, int,
  202.       bool, bool, bool, bool)) GetProcAddress(hSTDsbParserDLL, "@CreateNewParser$qpci4boolt3t3t3");
  203.     DLLCreateNewParser3 = (void*( *)(char *, int,
  204.         int, char *,
  205.       bool, bool, bool, bool iu4)) GetProcAddress(hSTDsbParserDLL, "@CreateNewParser$qpciit14boolt5t5t5");
  206.  
  207.     DLLDeleteParser = (bool( *)(void*)) GetProcAddress(hSTDsbParserDLL, "@DeleteParser$qpv");
  208.  
  209.     DLLSetVarCont = (bool( *)(void*, const char *,
  210.         long double)) GetProcAddress(hSTDsbParserDLL, "@SetVarCont$qpvpxcg");
  211.  
  212.     DLLGetResult1 = (long double( *)(void*)) GetProcAddress(hSTDsbParserDLL, "@GetResult$qpv");
  213.     DLLGetResult2 = (long double( *)(void*, long double)) GetProcAddress(hSTDsbParserDLL, "@GetResult$qpvg");
  214.     DLLGetResultExt = (long double( *)(void*, long double*)) GetProcAddress(hSTDsbParserDLL, "@GetResultExt$qpvpg");
  215.  
  216.     DLLIsParserFunction = (bool( *)(const char*)) GetProcAddress(hSTDsbParserDLL, "@IsParserFunction$qpxc");
  217.  
  218.     DLLdSetVarCont = (bool( *)(void*, const char *,
  219.         double)) GetProcAddress(hSTDsbParserDLL, "@dSetVarCont$qpvpxcd");
  220.  
  221.     DLLdGetResult1 = (double( *)(void*)) GetProcAddress(hSTDsbParserDLL, "@dGetResult$qpv");
  222.     DLLdGetResult2 = (double( *)(void*, double)) GetProcAddress(hSTDsbParserDLL, "@dGetResult$qpvd");
  223.     DLLdGetResultExt = (double( *)(void*, double*)) GetProcAddress(hSTDsbParserDLL, "@dGetResultExt$qpvpd");
  224.  
  225.     DLLGetOriginFunc = (const char*( *)(void*, char *)) GetProcAddress(hSTDsbParserDLL, "@GetOriginFunc$qpvpc");
  226.     DLLGetOriginFuncLen = (long( *)(void*)) GetProcAddress(hSTDsbParserDLL, "@GetOriginFuncLen$qpv");
  227.     DLLGetOriginVarCount = (int( *)(void*)) GetProcAddress(hSTDsbParserDLL, "@GetOriginVarCount$qpv");
  228.     DLLGetIsOriginFunc = (bool( *)(void*, char *)) GetProcAddress(hSTDsbParserDLL, "@GetIsOriginFunc$qpvpc");
  229.  
  230.     DLLGetIsError = (bool( *)(void*)) GetProcAddress(hSTDsbParserDLL, "@GetIsError$qpv");
  231.     DLLGetGlobalError = (int( *)(void*)) GetProcAddress(hSTDsbParserDLL, "@GetGlobalError$qpv");
  232.     DLLGetUnknownFunction = (char*( *)(void*, char *)) GetProcAddress(hSTDsbParserDLL, "@GetUnknownFunction$qpvpc");
  233.  
  234.     DLLSetBaseTo = (bool( *)(void*, int)) GetProcAddress(hSTDsbParserDLL, "@SetBaseTo$qpvi");
  235.     DLLSetAngularUnitTo = (bool( *)(void*, int)) GetProcAddress(hSTDsbParserDLL, "@SetAngularUnitTo$qpvi");
  236.     DLLSetNewFunction = (bool( *)(void*, char *)) GetProcAddress(hSTDsbParserDLL, "@SetNewFunction$qpvpc");
  237.  
  238.     DLLGetBase = (int( *)(void*)) GetProcAddress(hSTDsbParserDLL, "@GetBase$qpv");
  239.     DLLGetAngularUnit = (int( *)(void*)) GetProcAddress(hSTDsbParserDLL, "@GetAngularUnit$qpv");
  240.  
  241.     DLLConvertToBase = (bool( *)(char *, const long double,
  242.                                 int, int)) GetProcAddress(hSTDsbParserDLL, "@ConvertToBase$qpcxgii");
  243.     DLLConvertBaseTold1 = (long double( *)(const char *, int,
  244.                                 char **)) GetProcAddress(hSTDsbParserDLL, "@ConvertBaseTold$qpxcippc");
  245.     DLLConvertBaseTold2 = (long double( *)(const char *, int,
  246.                         int*)) GetProcAddress(hSTDsbParserDLL, "@ConvertBaseTold$qpxcipi");
  247.  
  248.     DLLSetFPError = (unsigned int( *)(bool)) GetProcAddress(hSTDsbParserDLL, "@SetFPError$q4bool");
  249.  
  250.     DLLldtochar = (char*( *)(char *, const long double,
  251.                                 int, bool)) GetProcAddress(hSTDsbParserDLL, "@ldtochar$qpcxgi4bool");
  252.     DLLchartold1 = (long double( *)(const char *, char **,
  253.                                 bool)) GetProcAddress(hSTDsbParserDLL, "@chartold$qpxcppc4bool");
  254.     DLLchartold2 = (long double( *)(const char *, int*,
  255.                                 bool)) GetProcAddress(hSTDsbParserDLL, "@chartold$qpxcpi4bool");
  256.  
  257.    DLLcorrroundl1 = (long double( *)(long double)) GetProcAddress(hSTDsbParserDLL, "@corrroundl$qg");
  258.    DLLcorrroundl2 = (long double( *)(long double, int)) GetProcAddress(hSTDsbParserDLL, "@corrroundl$qgi");
  259.  
  260.     DLLturnintochar = (char *( *)(char*, const char *, const char *, const char *,
  261.                                 bool)) GetProcAddress(hSTDsbParserDLL, "@turnintochar$qpcpxct2t24bool");
  262.     DLLGetLastValue = (char *( *)(char*, const char*, int, int*, bool)) GetProcAddress(hSTDsbParserDLL, "@GetLastValue$qpcpxcipi4bool");
  263.  
  264.     DLLdConvertToBase = (bool( *)(char *, const double,
  265.                                 int, int)) GetProcAddress(hSTDsbParserDLL, "@dConvertToBase$qpcxdii");
  266.     DLLConvertBaseTod1 = (double( *)(const char *, int,
  267.                                 char **)) GetProcAddress(hSTDsbParserDLL, "@ConvertBaseTod$qpxcippc");
  268.     DLLConvertBaseTod2 = (double( *)(const char *, int,
  269.                         int*)) GetProcAddress(hSTDsbParserDLL, "@ConvertBaseTod$qpxcipi");
  270.  
  271.     DLLdtochar = (char*( *)(char *, const double,
  272.                                 int, bool)) GetProcAddress(hSTDsbParserDLL, "@dtochar$qpcxdi4bool");
  273.     DLLchartod1 = (double( *)(const char *, char **,
  274.                                 bool)) GetProcAddress(hSTDsbParserDLL, "@chartold$qpxcppc4bool");
  275.     DLLchartod2 = (double( *)(const char *, int*,
  276.                                 bool)) GetProcAddress(hSTDsbParserDLL, "@chartold$qpxcpi4bool");
  277.  
  278.    DLLcorrround = (double( *)(double, int)) GetProcAddress(hSTDsbParserDLL, "@corrround$qdi");
  279.  
  280.     //------ Debug and Information ----------------------------------------------
  281.    
  282.    DLLGetDebugsbDLL = (bool( *)(void))GetProcAddress(hSTDsbParserDLL, "@GetDebugsbDLL$qv");
  283.    DLLSetDebugsbDLL = (bool( *)(bool))GetProcAddress(hSTDsbParserDLL, "@SetDebugsbDLL$q4bool");
  284.  
  285.    DLLGetVarStruct = (bool( *)(void*, void*))GetProcAddress(hSTDsbParserDLL, "@GetVarStruct$qpvt1");
  286.     DLLGetOpStructPos = (bool( *)(void*, int, char *,
  287.         int*, int*, int* )) GetProcAddress(hSTDsbParserDLL, "@GetOpStructPos$qpvipcpit4t4");
  288.     DLLGetInvValuesPos = (bool( *)(void*, int, long double *)) GetProcAddress(hSTDsbParserDLL, "@GetInvValuesPos$qpvipg");
  289.  
  290.     //use these functions if your compiler doesn't support long double (80bit)
  291.    DLLdGetVarStruct = (bool( *)(void*, void*))GetProcAddress(hSTDsbParserDLL, "@dGetVarStruct$qpvt1");
  292.     DLLdGetInvValuesPos = (bool( *)(void*, int, double *)) GetProcAddress(hSTDsbParserDLL, "@dGetInvValuesPos$qpvipd");
  293.  
  294.     //------ sbCalculator functions ---------------------------------------------
  295.  
  296.    DLLCreateNewCalculator = (void*( *)(char*, bool, int, char*))GetProcAddress(hSTDsbParserDLL, "@CreateNewCalculator$qpc4boolit1");
  297.  
  298.    DLLDeleteCalculator = (bool( *)(void*))GetProcAddress(hSTDsbParserDLL, "@DeleteCalculator$qpv");
  299.  
  300.    DLLGetVarCount = (int( *)(void*))GetProcAddress(hSTDsbParserDLL, "@GetVarCount$qpv");
  301.    DLLGetFunction = (char*( *)(void*, char*))GetProcAddress(hSTDsbParserDLL, "@GetFunction$qpvpc");
  302.  
  303.    DLLMake = (bool( *)(void*, char*, bool))GetProcAddress(hSTDsbParserDLL, "@Make$qpvpc4bool");
  304.  
  305.    DLLGetShowFunc = (char*( *)(void*, char*, int, long double*, bool, char*))GetProcAddress(hSTDsbParserDLL, "@GetShowFunc$qpvpcipg4boolt2");
  306.    DLLGetLastResult = (long double( *)(void*))GetProcAddress(hSTDsbParserDLL, "@GetLastResult$qpv");
  307.  
  308.     //use these functions if your compiler doesn't support long double (80bit)
  309.    DLLdGetShowFunc = (char*( *)(void*, char*, int, double*, bool, char*))GetProcAddress(hSTDsbParserDLL, "@dGetShowFunc$qpvpcipd4boolt2");
  310.    DLLdGetLastResult = (double( *)(void*))GetProcAddress(hSTDsbParserDLL, "@dGetLastResult$qpv");
  311.  
  312.    DLLGetInfo = (char*( *)(void*, char*))GetProcAddress(hSTDsbParserDLL, "@GetInfo$qpvpc");
  313.  
  314.    DLLSetFast = (void( *)(void*, bool))GetProcAddress(hSTDsbParserDLL, "@SetFast$qpv4bool");
  315.    DLLGetFast = (bool( *)(void*))GetProcAddress(hSTDsbParserDLL, "@GetFast$qpv");
  316.  
  317.    DLLSetFatalErr = (void( *)(void*, bool))GetProcAddress(hSTDsbParserDLL, "@SetFatalErr$qpv4bool");
  318.    DLLGetFatalErr = (bool( *)(void*))GetProcAddress(hSTDsbParserDLL, "@GetFatalErr$qpv");
  319.  
  320.    DLLSetAngularUnitInOutTo = (bool( *)(void*, int))GetProcAddress(hSTDsbParserDLL, "@SetAngularUnitInOutTo$qpvi");
  321.    DLLGetAngularUnitInOut = (int( *)(void*))GetProcAddress(hSTDsbParserDLL, "@GetAngularUnitInOut$qpv");
  322.    DLLSetBaseInTo = (bool( *)(void*, int))GetProcAddress(hSTDsbParserDLL, "@SetBaseInTo$qpvi");
  323.    DLLGetBaseIn = (int( *)(void*))GetProcAddress(hSTDsbParserDLL, "@GetBaseIn$qpv");
  324.    DLLSetBaseOutTo = (bool( *)(void*, int))GetProcAddress(hSTDsbParserDLL, "@SetBaseOutTo$qpvi");
  325.    DLLGetBaseOut = (int( *)(void*))GetProcAddress(hSTDsbParserDLL, "@GetBaseOut$qpv");
  326.  
  327.     if ((DLLGetParserVersionString == NULL)
  328.        ||(DLLGetParserVersionNumber == NULL)
  329.          ||(DLLInitSTDsbParserDLL2 == NULL)
  330.       ||(DLLDeinitSTDsbParserDLL2 == NULL)
  331.       ||(DLLGetInitCount == NULL)
  332.       ||(IsRegSTDsbParserDLL == NULL)
  333.       ||(DLLCreateNewParser1 == NULL)
  334.       ||(DLLCreateNewParser2 == NULL)
  335.       ||(DLLCreateNewParser3 == NULL)
  336.       ||(DLLDeleteParser == NULL)
  337.       ||(DLLSetVarCont == NULL)
  338.       ||(DLLGetResult1 == NULL)
  339.       ||(DLLGetResult2 == NULL)
  340.       ||(DLLGetResultExt == NULL)
  341.       ||(DLLdSetVarCont == NULL)
  342.       ||(DLLdGetResult1 == NULL)
  343.       ||(DLLdGetResult2 == NULL)
  344.       ||(DLLdGetResultExt == NULL)
  345.       ||(DLLGetOriginFunc == NULL)
  346.       ||(DLLGetOriginFuncLen == NULL)
  347.       ||(DLLGetOriginVarCount == NULL)
  348.       ||(DLLGetIsOriginFunc == NULL)
  349.       ||(DLLGetIsError == NULL)
  350.       ||(DLLGetGlobalError == NULL)
  351.       ||(DLLGetUnknownFunction == NULL)
  352.       ||(DLLSetBaseTo == NULL)
  353.       ||(DLLSetAngularUnitTo == NULL)
  354.       ||(DLLSetNewFunction == NULL)
  355.       ||(DLLGetBase == NULL)
  356.       ||(DLLGetAngularUnit == NULL)
  357.       ||(DLLConvertToBase == NULL)
  358.       ||(DLLConvertBaseTold1 == NULL)
  359.       ||(DLLConvertBaseTold2 == NULL)
  360.       ||(DLLSetFPError == NULL)
  361.       ||(DLLldtochar == NULL)
  362.       ||(DLLchartold1 == NULL)
  363.       ||(DLLchartold2 == NULL)
  364.           ||(DLLturnintochar == NULL)
  365.       ||(DLLdConvertToBase == NULL)
  366.       ||(DLLConvertBaseTod1 == NULL)
  367.       ||(DLLConvertBaseTod2 == NULL)
  368.       ||(DLLdtochar == NULL)
  369.       ||(DLLchartod1 == NULL)
  370.       ||(DLLchartod2 == NULL)
  371.       ||(DLLcorrround == NULL)
  372.  
  373.         //Debug and Information
  374.       ||(DLLGetDebugsbDLL == NULL)
  375.       ||(DLLSetDebugsbDLL == NULL)
  376.       ||(DLLGetVarStruct == NULL)
  377.       ||(DLLGetOpStructPos == NULL)
  378.       ||(DLLGetInvValuesPos == NULL)
  379.       //use these functions if your compiler doesn't support long double (80bit)
  380.       ||(DLLdGetVarStruct == NULL)
  381.       ||(DLLdGetInvValuesPos == NULL)
  382.         //+++
  383.  
  384.         //------ sbCalculator functions ------------------------------------------
  385.       ||(DLLCreateNewCalculator == NULL)
  386.       ||(DLLDeleteCalculator == NULL)
  387.       ||(DLLGetVarCount == NULL)
  388.       ||(DLLGetFunction == NULL)
  389.       ||(DLLMake == NULL)
  390.       ||(DLLGetShowFunc == NULL)
  391.       ||(DLLGetLastResult == NULL)
  392.         //use these functions if your compiler doesn't support long double (80bit)
  393.       ||(DLLdGetShowFunc == NULL)
  394.       ||(DLLdGetLastResult == NULL)
  395.       //+++
  396.       ||(DLLGetInfo == NULL)
  397.       ||(DLLSetFast == NULL)
  398.       ||(DLLGetFast == NULL)
  399.       ||(DLLSetFatalErr == NULL)
  400.       ||(DLLGetFatalErr == NULL)
  401.       ||(DLLSetAngularUnitInOutTo == NULL)
  402.       ||(DLLGetAngularUnitInOut == NULL)
  403.       ||(DLLSetBaseInTo == NULL)
  404.       ||(DLLGetBaseIn == NULL)
  405.       ||(DLLSetBaseOutTo == NULL)
  406.       ||(DLLGetBaseOut == NULL)
  407.       ) {
  408.  
  409.     char temp[500];
  410.     char temp2[150];
  411.  
  412.     strcpy(temp,
  413.         "The loaded CSBPARSE.DLL isn't the correct one. Maybe the version differs. The loaded CSBPARSE.DLL has the version number ");
  414.     if (DLLGetParserVersionNumber == NULL) {
  415.         strcat(temp, "(no version available)");
  416.     }
  417.     else {
  418.         strcat(temp, DLLGetParserVersionNumber(temp2));
  419.     }
  420.     strcat(temp, ".");
  421.  
  422.     MessageBox(NULL, temp, "Library Error", MB_OK | MB_ICONERROR);
  423.     FreeLibrary(hSTDsbParserDLL);
  424.      hSTDsbParserDLL = 0;
  425.     return FALSE;
  426.    }
  427.  
  428.    return DLLInitSTDsbParserDLL2(iv);
  429. }
  430.  
  431. void InitMessageOut() {
  432.     if (mainDLLerr == false) {
  433.         MessageBox(NULL, "Call InitSTDsbParserDLL() first...", "Library Error", MB_OK | MB_ICONERROR);
  434.    }
  435. }
  436.  
  437. int GetInitCount() {
  438.    if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  439.        return DLLGetInitCount();
  440.    }
  441.    else {
  442.        //InitMessageOut();
  443.       return 0;
  444.    }
  445. }
  446.  
  447. bool IsRegSTDsbParser() {
  448.    if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  449.          return IsRegSTDsbParserDLL();
  450.    }
  451.    else {
  452.        //InitMessageOut();
  453.       return false;
  454.    }
  455. }
  456.  
  457. bool DeinitSTDsbParserDLL() {
  458.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  459.        bool retVal = DLLDeinitSTDsbParserDLL2();
  460.          if (GetInitCount() == 0) {
  461.              FreeLibrary(hSTDsbParserDLL);
  462.             hSTDsbParserDLL = 0;
  463.       }
  464.       return retVal;
  465.     }
  466.     else {
  467.         InitMessageOut();
  468.         return false;
  469.     }
  470. }
  471.  
  472. //------ sbParser functions ----------------------------------------------------
  473.  
  474. char* GetParserVersionString(char *strbuffer) {
  475.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  476.         return DLLGetParserVersionString(strbuffer);
  477.     }
  478.     else {
  479.         InitMessageOut();
  480.         return strcpy(strbuffer, "");
  481.     }
  482. }
  483. char* GetParserVersionNumber(char *strbuffer) {
  484.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  485.         return DLLGetParserVersionNumber(strbuffer);
  486.     }
  487.     else {
  488.         InitMessageOut();
  489.         return strcpy(strbuffer, "");
  490.     }
  491. }
  492.  
  493. //iux == reserved for internal use
  494. HANDLE CreateNewParser(char *FunctionIn, int VarCountIn,
  495.       char *VarDescIn,
  496.       bool iu1, bool iu2, bool iu3, bool iu4) {
  497.  
  498.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  499.       return DLLCreateNewParser1(FunctionIn, VarCountIn,
  500.         VarDescIn,
  501.         iu1, iu2, iu3, iu4);
  502.     }
  503.     else {
  504.         InitMessageOut();
  505.         return NULL;
  506.     }
  507. }
  508. HANDLE CreateNewParser(char *FunctionIn, int BaseIn,
  509.       bool iu1, bool iu2, bool iu3, bool iu4) {
  510.  
  511.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  512.       return DLLCreateNewParser2(FunctionIn, BaseIn,
  513.         iu1, iu2, iu3, iu4);
  514.     }
  515.     else {
  516.         InitMessageOut();
  517.         return NULL;
  518.     }
  519. }
  520. HANDLE CreateNewParser(char *FunctionIn, int BaseIn,
  521.         int VarCountIn, char *VarDescIn,
  522.       bool iu1, bool iu2, bool iu3, bool iu4) {
  523.  
  524.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  525.         return DLLCreateNewParser3(FunctionIn, BaseIn,
  526.           VarCountIn, VarDescIn,
  527.           iu1, iu2, iu3, iu4);
  528.     }
  529.     else {
  530.         InitMessageOut();
  531.         return NULL;
  532.     }
  533. }
  534.  
  535. bool DeleteParser(HANDLE hParser) {
  536.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  537.         return DLLDeleteParser(hParser);
  538.     }
  539.     else {
  540.         return false;
  541.     }
  542. }
  543.  
  544. bool SetVarCont(HANDLE hParser, const char *AVarDescIn,
  545.         long double VarContIn) {
  546.  
  547.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  548.         return DLLSetVarCont(hParser, AVarDescIn,
  549.             VarContIn);
  550.    }
  551.    else {
  552.        return false;
  553.    }
  554. }
  555.  
  556. long double GetResult(HANDLE hParser) {
  557.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  558.         return DLLGetResult1(hParser);
  559.    }
  560.    else {
  561.        return 0;
  562.    }
  563. }
  564. long double GetResult(HANDLE hParser, long double VarContIn) {
  565.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  566.          return DLLGetResult2(hParser, VarContIn);
  567.    }
  568.    else {
  569.        return 0;
  570.    }
  571. }
  572. long double GetResultExt(HANDLE hParser, long double VarContIn[]) {
  573.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  574.         return DLLGetResultExt(hParser, VarContIn);
  575.    }
  576.    else {
  577.        return 0;
  578.    }
  579. }
  580.  
  581. bool IsParserFunction(const char *FuncStrIn) {
  582.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  583.         return DLLIsParserFunction(FuncStrIn);
  584.    }
  585.    else {
  586.        return 0;
  587.    }
  588. }
  589.  
  590. //use these functions if your compiler doesn't support long double (80bit)
  591. bool dSetVarCont(HANDLE hParser, const char *AVarDescIn,
  592.         double VarContIn) {
  593.  
  594.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  595.         return DLLdSetVarCont(hParser, AVarDescIn,
  596.             VarContIn);
  597.    }
  598.    else {
  599.        return false;
  600.    }
  601. }
  602.  
  603. double dGetResult(HANDLE hParser) {
  604.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  605.         return DLLdGetResult1(hParser);
  606.    }
  607.    else {
  608.        return 0;
  609.    }
  610. }
  611. double dGetResult(HANDLE hParser, double VarContIn) {
  612.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  613.          return DLLdGetResult2(hParser, VarContIn);
  614.    }
  615.    else {
  616.        return 0;
  617.    }
  618. }
  619. double dGetResultExt(HANDLE hParser, double VarContIn[]) {
  620.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  621.         return DLLdGetResultExt(hParser, VarContIn);
  622.    }
  623.    else {
  624.        return 0;
  625.    }
  626. }
  627. //+++
  628.  
  629. const char*    GetOriginFunc(HANDLE hParser, char *strbuffer) {
  630.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  631.         return DLLGetOriginFunc(hParser, strbuffer);
  632.    }
  633.    else {
  634.        return strcpy(strbuffer, "");
  635.    }
  636. }
  637. long    GetOriginFuncLen(HANDLE hParser) {
  638.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  639.         return DLLGetOriginFuncLen(hParser);
  640.    }
  641.    else {
  642.        return 0;
  643.    }
  644. }
  645. int GetOriginVarCount(HANDLE hParser) {
  646.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  647.         return DLLGetOriginVarCount(hParser);
  648.    }
  649.    else {
  650.        return 0;
  651.    }
  652. }
  653. bool GetIsOriginFunc(HANDLE hParser, char *FunctionIn) {
  654.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  655.         return DLLGetIsOriginFunc(hParser, FunctionIn);
  656.    }
  657.    else {
  658.        return false;
  659.    }
  660. }
  661.  
  662. bool GetIsError(HANDLE hParser) {
  663.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  664.         return DLLGetIsError(hParser);
  665.    }
  666.    else {
  667.        return false;
  668.    }
  669. }
  670. int GetGlobalError(HANDLE hParser) {
  671.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  672.         return DLLGetGlobalError(hParser);
  673.    }
  674.    else {
  675.        return 0;
  676.    }
  677. }
  678. char* GetUnknownFunction(HANDLE hParser, char *strbuffer) {
  679.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  680.         return DLLGetUnknownFunction(hParser, strbuffer);
  681.    }
  682.    else {
  683.        return strcpy(strbuffer, "");
  684.    }
  685. }
  686.  
  687. bool SetBaseTo(HANDLE hParser, int BaseIn) {
  688.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  689.         return DLLSetBaseTo(hParser, BaseIn);
  690.    }
  691.    else {
  692.        return false;
  693.    }
  694. }
  695. bool SetAngularUnitTo(HANDLE hParser, int AngularUnitIn) {
  696.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  697.         return DLLSetAngularUnitTo(hParser, AngularUnitIn);
  698.    }
  699.    else {
  700.        return false;
  701.    }
  702. }
  703. bool SetNewFunction(HANDLE hParser, char *FunctionIn) {
  704.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  705.         return DLLSetNewFunction(hParser, FunctionIn);
  706.    }
  707.    else {
  708.        return false;
  709.    }
  710. }
  711.  
  712. int GetBase(HANDLE hParser) {
  713.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  714.         return DLLGetBase(hParser);
  715.    }
  716.    else {
  717.        return 0;
  718.    }
  719. }
  720. int GetAngularUnit(HANDLE hParser) {
  721.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  722.         return DLLGetAngularUnit(hParser);
  723.    }
  724.    else {
  725.        return 0;
  726.    }
  727. }
  728.  
  729. //------ useful functions -----------------------------------------------------
  730.  
  731. bool ConvertToBase(char *strbuffer, const long double value,
  732.                                 int b_point, int BaseIn) {
  733.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  734.         return DLLConvertToBase(strbuffer, value,
  735.                                 b_point, BaseIn);
  736.    }
  737.    else {
  738.        return false;
  739.    }
  740. }
  741. long double ConvertBaseTold(const char *strValue, int BaseIn,
  742.                                 char **endptr) {
  743.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  744.         return DLLConvertBaseTold1(strValue, BaseIn,
  745.                                 endptr);
  746.    }
  747.    else {
  748.        return 0;
  749.    }
  750. }
  751. long double ConvertBaseTold(const char *strValue, int BaseIn,
  752.                         int* errPos) {
  753.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  754.         return DLLConvertBaseTold2(strValue, BaseIn,
  755.                         errPos);
  756.    }
  757.    else {
  758.        return 0;
  759.    }
  760. }
  761.  
  762. unsigned int SetFPError(bool Enable) {
  763.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  764.         return DLLSetFPError(Enable);
  765.    }
  766.    else {
  767.        return 0;
  768.    }
  769. }
  770.  
  771. char* ldtochar(char *strbuffer, const long double value,
  772.                                 int point, bool Validate) {
  773.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  774.         return DLLldtochar(strbuffer, value,
  775.                                 point, Validate);
  776.    }
  777.    else {
  778.        return strcpy(strbuffer, "");;
  779.    }
  780. }
  781. long double chartold(const char *strValue, char **endptr,
  782.                                 bool Validate) {
  783.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  784.         return DLLchartold1(strValue, endptr,
  785.                                 Validate);
  786.    }
  787.    else {
  788.        return 0;
  789.    }
  790. }
  791. long double chartold(const char *strValue, int* errPos,
  792.                                 bool Validate) {
  793.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  794.         return DLLchartold2(strValue, errPos,
  795.                                 Validate);
  796.    }
  797.    else {
  798.        return 0;
  799.    }
  800. }
  801.  
  802. long double corrroundl(long double value) {
  803.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  804.         return DLLcorrroundl1(value);
  805.    }
  806.    else {
  807.        return 0;
  808.    }
  809. }
  810. long double corrroundl(long double value, int point) {
  811.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  812.         return DLLcorrroundl2(value, point);
  813.    }
  814.    else {
  815.        return 0;
  816.    }
  817. }
  818.  
  819. char* turnintochar(char *strbuffer,const char *SubFuncIn,const char *searchIn,
  820.                                 const char *turnIn,bool singleVar) {
  821.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  822.         return DLLturnintochar(strbuffer, SubFuncIn, searchIn,
  823.             turnIn,singleVar);
  824.    }
  825.    else {
  826.        return 0;
  827.    }
  828. }
  829. char* GetLastValue(char* strbuffer, const char* SearchString,
  830.                                   int CurrPos, int *StartPos, bool withOper) {
  831.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  832.         return DLLGetLastValue(strbuffer, SearchString,
  833.             CurrPos, StartPos, withOper);
  834.    }
  835.    else {
  836.        return 0;
  837.    }
  838. }
  839.  
  840. //use these functions if your compiler doesn't support long double (80bit)
  841. bool dConvertToBase(char *strbuffer, const double value,
  842.                                 int b_point, int BaseIn) {
  843.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  844.         return DLLdConvertToBase(strbuffer, value,
  845.                                 b_point, BaseIn);
  846.    }
  847.    else {
  848.        return false;
  849.    }
  850. }
  851. double ConvertBaseTod(const char *strValue, int BaseIn,
  852.                                 char **endptr) {
  853.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  854.         return DLLConvertBaseTod1(strValue, BaseIn,
  855.                                 endptr);
  856.    }
  857.    else {
  858.        return 0;
  859.    }
  860. }
  861. double ConvertBaseTod(const char *strValue, int BaseIn,
  862.                         int* errPos) {
  863.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  864.         return DLLConvertBaseTod2(strValue, BaseIn,
  865.                         errPos);
  866.    }
  867.    else {
  868.        return 0;
  869.    }
  870. }
  871.  
  872. char* dtochar(char *strbuffer, const double value,
  873.                                 int point, bool Validate) {
  874.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  875.         return DLLdtochar(strbuffer, value,
  876.                                 point, Validate);
  877.    }
  878.    else {
  879.        return strcpy(strbuffer, "");
  880.    }
  881. }
  882. double chartod(const char *strValue, char **endptr,
  883.                                 bool Validate) {
  884.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  885.         return DLLchartod1(strValue, endptr,
  886.                                 Validate);
  887.    }
  888.    else {
  889.        return 0;
  890.    }
  891. }
  892. double chartod(const char *strValue, int* errPos,
  893.                                 bool Validate) {
  894.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  895.         return DLLchartod2(strValue, errPos,
  896.                                 Validate);
  897.    }
  898.    else {
  899.        return 0;
  900.    }
  901. }
  902.  
  903. double corrround(double value, int point) {
  904.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  905.         return DLLcorrround(value, point);
  906.    }
  907.    else {
  908.        return 0;
  909.    }
  910. }
  911. //+++
  912.  
  913. //------ Debug and Information -------------------------------------------------
  914.  
  915. bool GetDebugsbDLL() {
  916.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  917.         return DLLGetDebugsbDLL();
  918.    }
  919.    else {
  920.        return 0;
  921.    }
  922. }
  923. bool SetDebugsbDLL(bool debugIn) {
  924.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  925.         return DLLSetDebugsbDLL(debugIn);
  926.    }
  927.    else {
  928.        return 0;
  929.    }
  930. }
  931.  
  932. bool GetVarStruct(HANDLE hParser, HANDLE VarStructIn) {
  933.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  934.         return DLLGetVarStruct(hParser, VarStructIn);
  935.    }
  936.    else {
  937.        return 0;
  938.    }
  939. }
  940. bool GetOpStructPos(HANDLE hParser, int pos, char *buffFunction,
  941.                                   int* val1, int* val2, int* valResult) {
  942.     if(((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR)
  943.        && (DLLGetOpStructPos!=NULL)) {
  944.         return DLLGetOpStructPos(hParser, pos, buffFunction,
  945.           val1, val2, valResult);
  946.    }
  947.    else {
  948.        return 0;
  949.    }
  950. }
  951. bool GetInvValuesPos(HANDLE hParser, int pos, long double *val) {
  952.     if(((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR)
  953.        && (DLLGetInvValuesPos!=NULL)) {
  954.         return DLLGetInvValuesPos(hParser, pos, val);
  955.    }
  956.    else {
  957.        return 0;
  958.    }
  959. }
  960.  
  961. //use these functions if your compiler doesn't support long double (80bit)
  962. bool dGetVarStruct(HANDLE hParser, HANDLE VarStructIn) {
  963.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  964.         return DLLdGetVarStruct(hParser, VarStructIn);
  965.    }
  966.    else {
  967.        return 0;
  968.    }
  969. }
  970. bool dGetInvValuesPos(HANDLE hParser, int pos, double *val) {
  971.     if(((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR)
  972.        && (DLLdGetInvValuesPos!=NULL)) {
  973.         return DLLdGetInvValuesPos(hParser, pos, val);
  974.    }
  975.    else {
  976.        return 0;
  977.    }
  978. }
  979. //+++
  980.  
  981. //------ sbCalculator functions ------------------------------------------------
  982.  
  983. HANDLE CreateNewCalculator(char *InitStr, bool fastIn,
  984.                                 int VarCountIn, char* VarDescIn) {
  985.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  986.         return DLLCreateNewCalculator(InitStr, fastIn,
  987.             VarCountIn, VarDescIn);
  988.    }
  989.    else {
  990.        return 0;
  991.    }
  992. }
  993.  
  994. bool DeleteCalculator(HANDLE hCalculator) {
  995.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  996.         return DLLDeleteCalculator(hCalculator);
  997.    }
  998.    else {
  999.        return 0;
  1000.    }
  1001. }
  1002.  
  1003. int GetVarCount(HANDLE hCalculator) {
  1004.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  1005.         return DLLGetVarCount(hCalculator);
  1006.    }
  1007.    else {
  1008.        return 0;
  1009.    }
  1010. }
  1011. char *GetFunction(HANDLE hCalculator, char *strbuffer) {
  1012.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  1013.         return DLLGetFunction(hCalculator, strbuffer);
  1014.    }
  1015.    else {
  1016.        return 0;
  1017.    }
  1018. }
  1019.  
  1020. bool Make(HANDLE hCalculator, char *Input, bool iu1) {
  1021.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  1022.         return DLLMake(hCalculator, Input, iu1);
  1023.    }
  1024.    else {
  1025.        return 0;
  1026.    }
  1027. }
  1028.  
  1029. char *GetShowFunc(HANDLE hCalculator, char *strbuffer,int point,
  1030.                                 long double VarContIn[], bool ext, char* secondShow) {
  1031.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  1032.         return DLLGetShowFunc(hCalculator, strbuffer, point,
  1033.             VarContIn, ext, secondShow);
  1034.    }
  1035.    else {
  1036.        return 0;
  1037.    }
  1038. }
  1039. long double GetLastResult(HANDLE hCalculator) {
  1040.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  1041.         return DLLGetLastResult(hCalculator);
  1042.    }
  1043.    else {
  1044.        return 0;
  1045.    }
  1046. }
  1047.  
  1048. //use these functions if your compiler doesn't support long double (80bit)
  1049. char *dGetShowFunc(HANDLE hCalculator, char *strbuffer,int point,
  1050.                                 double VarContIn[], bool ext, char* secondShow) {
  1051.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  1052.         return DLLdGetShowFunc(hCalculator, strbuffer, point,
  1053.             VarContIn, ext, secondShow);
  1054.    }
  1055.    else {
  1056.        return 0;
  1057.    }
  1058. }
  1059. double dGetLastResult(HANDLE hCalculator) {
  1060.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  1061.         return DLLdGetLastResult(hCalculator);
  1062.    }
  1063.    else {
  1064.        return 0;
  1065.    }
  1066. }
  1067. //+++
  1068.  
  1069. char *GetInfo(HANDLE hCalculator, char *strbuffer) {
  1070.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  1071.         return DLLGetInfo(hCalculator, strbuffer);
  1072.    }
  1073.    else {
  1074.        return 0;
  1075.    }
  1076. }
  1077.  
  1078. void SetFast(HANDLE hCalculator, bool fastIn) {
  1079.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  1080.         DLLSetFast(hCalculator, fastIn);
  1081.    }
  1082.    else {
  1083.        return ;
  1084.    }
  1085. }
  1086. bool GetFast(HANDLE hCalculator) {
  1087.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  1088.         return DLLGetFast(hCalculator);
  1089.    }
  1090.    else {
  1091.        return 0;
  1092.    }
  1093. }
  1094.  
  1095. void SetFatalErr(HANDLE hCalculator, bool fastIn) {
  1096.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  1097.         DLLSetFatalErr(hCalculator, fastIn);
  1098.    }
  1099.    else {
  1100.        return ;
  1101.    }
  1102. }
  1103. bool GetFatalErr(HANDLE hCalculator) {
  1104.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  1105.         return DLLGetFatalErr(hCalculator);
  1106.    }
  1107.    else {
  1108.        return 0;
  1109.    }
  1110. }
  1111.  
  1112. bool SetAngularUnitInOutTo(HANDLE hCalculator, int AngularUnitIn) {
  1113.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  1114.         return DLLSetAngularUnitInOutTo(hCalculator, AngularUnitIn);
  1115.    }
  1116.    else {
  1117.        return 0;
  1118.    }
  1119. }
  1120. int GetAngularUnitInOut(HANDLE hCalculator) {
  1121.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  1122.         return DLLGetAngularUnitInOut(hCalculator);
  1123.    }
  1124.    else {
  1125.        return 0;
  1126.    }
  1127. }
  1128. bool SetBaseInTo(HANDLE hCalculator, int BaseIn) {
  1129.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  1130.         return DLLSetBaseInTo(hCalculator, BaseIn);
  1131.    }
  1132.    else {
  1133.        return 0;
  1134.    }
  1135. }
  1136. int GetBaseIn(HANDLE hCalculator) {
  1137.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  1138.         return DLLGetBaseIn(hCalculator);
  1139.    }
  1140.    else {
  1141.        return 0;
  1142.    }
  1143. }
  1144. bool SetBaseOutTo(HANDLE hCalculator, int BaseIn) {
  1145.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  1146.         return DLLSetBaseOutTo(hCalculator, BaseIn);
  1147.    }
  1148.    else {
  1149.        return 0;
  1150.    }
  1151. }
  1152. int GetBaseOut(HANDLE hCalculator) {
  1153.     if((unsigned)hSTDsbParserDLL>HINSTANCE_ERROR) {
  1154.         return DLLGetBaseOut(hCalculator);
  1155.    }
  1156.    else {
  1157.        return 0;
  1158.    }
  1159. }
  1160.