Bonjour,
j'essaye de faire fonctionner DialogBoxParam depuis Inno en chargeant une DLL, mais j'y arrive po :-(
quelqu'un aurait une idee....????
voici le source de ma DLL
#include
<windows.h>
#define
IDD_APP 101BOOL CALLBACK AppDlgProc(HWND hdlg, UINT mssg, WPARAM wParam, LPARAM lParam)
{
return
0;}
void
__stdcall
MyDllFunc2(HINSTANCE hInstance){
DialogBoxParam(hInstance, (LPCTSTR)IDD_APP, 0, AppDlgProc, 0);
}
Et voila le script Inno:
[Files]
; Install our DLL to {app} so we can access it at uninstall time
Source: "MyDll.dll"; DestDir: "{app}"
;Source: "MyDLL.dll"; DestDir: "{app}"
[Code]
const
MB_ICONINFORMATION = $40;
// Importing our custom DLL function
procedure MyDllFunc2(hWnd: Integer);
external 'MyDllFunc2@{app}\MyDll.dll stdcall uninstallonly';
//procedure Test();
//external 'Test@{app}\MyDLL.dll stdcall uninstallonly';
procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
begin
// Call our function just before the actual uninstall process begins
if CurUninstallStep = usUninstall then
begin
MyDllFunc2(0);
//Test();
// Now that we're finished with it, unload MyDll.dll from memory.
// We have to do this so that the uninstaller will be able to remove the DLL and the {app} directory.
//
UnloadDLL(ExpandConstant('{app}\MyDll.dll'));
//UnloadDLL(ExpandConstant('{app}\MyDLL.dll'));
end;
end;