Einzelnen Beitrag anzeigen

MathiasSimmack
(Gast)

n/a Beiträge
 
#2

Re: ShellFolder anlegen?

  Alt 30. Jun 2004, 20:36
Also, der Anfang steht im PSDK:
Zitat:
To get a pointer to this interface, call CoCreateInstance with the rclsid parameter set to CLSID_MenuBand and the riid parameter set to IID_IShellMenu. You must first initialize the interface by calling IShellMenu::Initialize, and then initialize the menu band by calling IShellMenu::SetShellFolder.
CoCreateInstance brauchst du, so gesehen, nicht. Du kannst stattdessen CreateComObject (ComObj-Unit) benutzt, da steckt der o.g. Befehl drin. Also etwa:
Delphi-Quellcode:
ism := CreateComObject(CLSID_MenuBand) as IShellMenu;
if(ism <> nil) then
try
  ism.Initialize;

  { ... }
finally
  ism := nil;
end;
Angabe ohne Gewähr, aber prinzipiell geht´s mit den meisten Interfaces so. Hinter dem MS-XML-Interface DomDocument40 steckt in der Create-Funktion nämlich auch nichts anderes.

Allerdings kann ich mit deiner Beschreibung nicht viel anfangen. Ich hoffe, du redest nicht von [cl]"Verknüpfung"[/cl]en.
  Mit Zitat antworten Zitat