Subject ShellExecute UDF succeeds but no window is shown
Author domokaidus
Hello everyone,

I coded the following UDF but I'm getting strange behavior. The code is actually executed and ShellExecute returns success(value > 32) but the application passed in parameter never show up.

When I used the same ShellExecute call from a standard dialog-based application, it works perfectly.

Your help would be greatly appreciated !
Thanks


function ExecShell(sz: PChar):integer;cdecl;export;
var
Handle: HWND;
begin
//Write2EventLog('UDF', sz);
result := ShellExecute(Handle,'open', sz, nil, nil, SW_SHOWNORMAL) ;
end;