Incorrect GetICMProfile declaration in Windows unit
Original Reporter info from Mantis: oleg_3630@mail.ru
-
Reporter name: Oleg Sharonov
Original Reporter info from Mantis: oleg_3630@mail.ru
- Reporter name: Oleg Sharonov
Description:
Unit Windows includes unifun.inc, that contains this declaration
function GetICMProfileW(_para1:HDC; _para2:DWORD; _para3:LPWSTR):WINBOOL; external 'gdi32' name 'GetICMProfileW'; stdcall;
MSDN says function has these arguments:
BOOL WINAPI GetICMProfile(
HDC hDC,
LPDWORD lpcbName,
LPTSTR lpszFilename
);
Second parameter is pointer.
Because of this calling this function causes crash.
JWAWinGDI contains correct declaration, and it works:
function GetICMProfileW(hDc: HDC; lpcbName: LPDWORD; lpszFilename: LPWSTR): BOOL; stdcall;
Also I'm not sure if stdcall directive necessary or not, it's also missing in Windows unit.
Mantis conversion info:
- Mantis ID: 25402
- OS: Windows
- OS Build: Any
- Platform: Intel
- Version: 2.6.2
- Fixed in version: 2.6.4
- Fixed in revision: 26283 (#1ce1c605)