Das folgende Codefragment funktioniert in einem normalen Delphi-Programm, in einer Dos-Anwendung kommt in hres aber -2147221008 zurück, bekommt man das irgendwie auch aus einer Dos-Anwendung zum laufen?!
<p>
<pre>
var
psl : IShellLink;
hres : hresult;
begin
hres := CoCreateInstance(CLSID_ShellLink, Nil,
CLSCTX_INPROC_SERVER, IID_IShellLinkA, psl);
</pre>
<p>
<pre>
var
psl : IShellLink;
hres : hresult;
begin
hres := CoCreateInstance(CLSID_ShellLink, Nil,
CLSCTX_INPROC_SERVER, IID_IShellLinkA, psl);
</pre>
Comment