DGDanforth wrote:Josef Templ wrote:If you insert a WinApi.Sleep(100) as the very first line,
does it then work with the manifest?
- Josef
Josef,
I am getting inconsistent results.
Without changing anything from yesterday when I ran ObxTest3.exe today I got the message box WITH the manifest.
I then added the sleep function and got the message box with the manifest.
I then removed the sleep function and got the message box with the manifest.
-Doug
Josef's test file has a side effect: the COMCTL32.dll had loaded already before test.exe run.
this test file can work expectedly.
Code: Select all
MODULE ObxTest3;
IMPORT WinApi, WinCtl, SYSTEM;
VAR res: INTEGER;
BEGIN
res := WinApi.MessageBoxW(0, "hello", "Test", {});
IF res =0 THEN
(*WinCtl.InitCommonControls();*)
res:=WinApi.WinExec("cmd",5);
END;
END ObxTest3.
DevLinker.Link
ObxTest3.exe := ObxTest3$
you will cant see the dialog box if the test.exe file has a manifest.
so,the bug fixup for xp is simple:
Code: Select all
PROCEDURE FatalError* (id: INTEGER; str: ARRAY OF CHAR);
VAR res: INTEGER; title: ARRAY 16 OF CHAR;
BEGIN
title := "Error xy";
title[6] := CHR(id DIV 10 + ORD("0"));
title[7] := CHR(id MOD 10 + ORD("0"));
WinCtl.InitCommonControls(); (* <<<< add this line ,import WinCtl*)
res := WinApi.MessageBoxW(0, str, title, {});
WinOle.OleUninitialize();
IF ~inDll THEN RemoveExcp(excpPtr^) END;
WinApi.ExitProcess(1)
(* never returns *)
END FatalError;
luowy