![]() |
GetActiveObject + IShellDispatch2 = Operation unavailable.
Ich versuche mich gerade an ein bisschen Shellprogrammierung. Dazu möchte ich die ShellExecute vom Interface IShellDispatch2 aufrufen.
Jedoch bekomme ich bei der Instanzerstellung nur : Operation unavailable. Unitdownload: ![]()
Delphi-Quellcode:
Was stimmt nicht?
program Project7;
{$APPTYPE CONSOLE} uses RVShlDisp, ActiveX, ComObj, SysUtils; var P : IUnknown; Shell : IShellDispatch2; HR : HRESULT; begin CoInitialize(nil); // OleCheck( HR := GetActiveObject(IID_IShellDispatch2, nil, P); //== //P := GetActiveOleObject('Shell.Application'); Shell := P as IShellDispatch2; end. THX |
Re: GetActiveObject + IShellDispatch2 = Operation unavailabl
Mit
Delphi-Quellcode:
funktioniert es.
P := CreateOleObject('Shell.Application');
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 01:45 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz