AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Netzwerke Delphi Anwendung für http herausfinden
Thema durchsuchen
Ansicht
Themen-Optionen

Anwendung für http herausfinden

Ein Thema von API · begonnen am 25. Jul 2009 · letzter Beitrag vom 25. Jul 2009
 
API

Registriert seit: 18. Apr 2004
637 Beiträge
 
#1

Anwendung für http herausfinden

  Alt 25. Jul 2009, 08:21
hi,

Mit IApplicationAssociationRegistration.QueryCurrentDe fault
möchte ich die verknüpfte Anwendung für http herausfinden.

Soweit habe ich diesen Code. Nur sAssociation gibt immer Nil zurück.
An was könnte es liegen?

Delphi-Quellcode:
uses
  ActiveX;

const
  CLSID_ApplicationAssociationRegistration: TGUID = '{591209c7-767b-42b2-9fba-44ee4615f2c7}';

type
  ASSOCIATIONTYPE = (AT_FILEEXTENSION, AT_URLPROTOCOL,
    AT_STARTMENUCLIENT, AT_MIMETYPE);

  ASSOCIATIONLEVEL = (AL_MACHINE, AL_EFFECTIVE, AL_USER);

  IApplicationAssociationRegistration = interface(IUnknown)
  ['{4e530b0a-e611-4c77-a3ac-9031d022281b}']
  function ClearUserAssociations: HRESULT; stdcall;
  function QueryAppIsDefault(pszQuery: PWideChar; atQueryType:
    ASSOCIATIONTYPE; alQueryLevel: ASSOCIATIONLEVEL; pszAppRegistryName:
    PWideChar; var pfDefault: BOOL): HRESULT; stdcall;
  function QueryAppIsDefaultAll(alQueryLevel: ASSOCIATIONLEVEL;
    pszAppRegistryName: PWideChar; var pfDefault: BOOL): HRESULT; stdcall;
  function QueryCurrentDefault(pszQuery: PWideChar; atQueryType:
    ASSOCIATIONTYPE; alQueryLevel: ASSOCIATIONLEVEL; var ppszAssociation:
    PWideChar): HRESULT; stdcall;
  function SetAppAsDefault(pszAppRegistryName: PWideChar; pszSet:
    PWideChar; atSetType: ASSOCIATIONTYPE): HRESULT; stdcall;
  function SetAppAsDefaultAll(pszAppRegistryName: PWideChar):
    HRESULT; stdcall;
 end;

procedure TForm1.FormCreate(Sender: TObject);
var
  pAAR: IApplicationAssociationRegistration;
  sAssociation: PWideChar;
  Res : HRESULT;
begin
   Res := CoCreateInstance(CLSID_ApplicationAssociationRegistration,
   nil, CLSCTX_INPROC, IApplicationAssociationRegistration, pAAR);
   if SUCCEEDED(Res) then
   begin
     pAAR.QueryCurrentDefault('http', AT_URLPROTOCOL, AL_EFFECTIVE, sAssociation);
     ShowMessage(sAssociation);
   end;
end;
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 01:35 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