Showing posts with label DLL. Show all posts
Showing posts with label DLL. Show all posts
Sunday, February 24, 2019
Saturday, February 23, 2019
[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.
Example:
https://delphi.fandom.com/wiki/SetExceptionMask_Routine
http://docwiki.embarcadero.com/Libraries/Tokyo/en/System.Math.SetExceptionMask
Example:
#include <System.Math.hpp>
typedef int (*PFNAddFunction)(int, int);
void testDllCall()
{
//Mask Exception
TFPUExceptionMask fExceptionMask ;
fExceptionMask=GetExceptionMask();
fExceptionMask << exInvalidOp;
fExceptionMask << exDenormalized;
fExceptionMask << exZeroDivide;
fExceptionMask << exOverflow;
fExceptionMask << exUnderflow;
fExceptionMask << exPrecision;
SetExceptionMask(fExceptionMask);
//Call DLL
HMODULE _dll=LoadLibraryA("dllName.dll");
if(_dll != NULL) {
PFNAddFunction myAdd = (PFNAddFunction)GetProcAddress(_dll,"funcAdd");
myAdd(1,2)
FreeLibrary(_dll);
}
}
[Reference]
https://delphi.fandom.com/wiki/SetExceptionMask_Routine
http://docwiki.embarcadero.com/Libraries/Tokyo/en/System.Math.SetExceptionMask
Tuesday, November 19, 2013
DLL for UTM <--> Geodetic Coordinate Transformation
[Reference] http://www.uwgb.edu/dutchs/UsefulData/UTMFormulas.htm
Download: http://www.mlidar.com/MTMToGeoDLL.rar
The DLL implement the coordinate transformation between UTM (Universal Transverse Mercator) and Geodetic coordinate system (latitude & longitude). Functions for transformation between TWD97 ( and TWD67) and Geodetic coordinate system are also included.
The file package also include a VB example.
Download: http://www.mlidar.com/MTMToGeoDLL.rar
Wednesday, December 19, 2012
MFC 的錯誤訊息( Invalid address specified to RtlValidateHeap)
原因:不同模組共用 dll 時,產生了記憶體衝突。
解決方法:改變 linker 的設定,將"靜態"改為"共用"。
(感謝 SBH 經驗分享)
解決方法:改變 linker 的設定,將"靜態"改為"共用"。
(感謝 SBH 經驗分享)
Subscribe to:
Posts (Atom)
[Qt] 執行檔需要哪些 Dll?
1. 使用 Qt 的 windeployqt.exe 工具 (在 C:\Qt\Qt5.14.1\5.14.1\msvc2017\bin\)。 a. 把執行檔 myProgram.exe 放在某個資料夾。 b. 在檔案總管這個資料夾按 Shift 和滑鼠右鍵,開啟 Po...
-
info.plist 裏的 [Application supports iTunes file sharing]設定為 [YES] (for Files App) [Supports opening documents in place] 設定為 [YES] ( for s...
-
[Reference] http://www.programmer-club.com.tw/ShowSameTitleN/cb/10992.html 在主程式 WinMain() 加入下面程式碼 WINAPI WinMain(HINSTANCE, HINSTANCE, LPST...
-
1. 使用 Qt 的 windeployqt.exe 工具 (在 C:\Qt\Qt5.14.1\5.14.1\msvc2017\bin\)。 a. 把執行檔 myProgram.exe 放在某個資料夾。 b. 在檔案總管這個資料夾按 Shift 和滑鼠右鍵,開啟 Po...