Saturday, February 23, 2019

[C++ Builder] Cannot add 64-bit windows platform

1. Open project file (*.cbproj) from a text editor.
2. Find <Platforms>, it may looks like:

<Platform value="Win32">True</Platform>

3. Add   <Platform value="Win64">True</Platform> 

<Platform value="Win32">True</Platform>
<Platform value="Win64">True</Platform>

4. Save project file.
5 Reopen the project.


[C++ Builder] FLOAT_INVALID_OVERFLOW!! SetExceptionMask !!

Error FLOAT_INVALID_OVERFLOW occurred when calling a function from a DLL build by VC from C++ Builder? This is a problem of C++ Build and solve if by calling SetExceptionMask before calling your Dll.


#include <System.Math.hpp>

typedef int (*PFNAddFunction)(int, int);

void testDllCall()
  //Mask Exception
  TFPUExceptionMask fExceptionMask ;
  fExceptionMask << exInvalidOp;
  fExceptionMask <<  exDenormalized;
  fExceptionMask <<  exZeroDivide;
  fExceptionMask << exOverflow;
  fExceptionMask << exUnderflow;
  fExceptionMask << exPrecision;
  //Call DLL
  HMODULE _dll=LoadLibraryA("dllName.dll");
  if(_dll != NULL) {
    PFNAddFunction myAdd = (PFNAddFunction)GetProcAddress(_dll,"funcAdd");

phpMyAdmin 無法存取 MariaDB 10 的解決方法