![]() |
PropertySheet in Anwendung
Hallo,
ich habe ein PropertySheet als dll welche ich eigentlich zur Verwendung als Display Specifier im Active Directory verwende! Nun möchte ich dieses Sheet in eine Anwendung reinbekommen als Formular in ein TabSheet. Ist das irgendwie möglich und wie? Gruss |
Re: PropertySheet in Anwendung
Sheet als Parent eintragen
|
Re: PropertySheet in Anwendung
muss ich da in der PropertySheet-dll was verändern?
könntest du es vielleicht ein bisschen genauer erklären? das wäre echt super! |
Re: PropertySheet in Anwendung
Ist die Dll in Delphi geschrieben?
Füge im Interface der Dll doch die Möglichkeit der Parented-Erzeugung ein. |
Re: PropertySheet in Anwendung
ja die dll ist in delphi geschrieben!
aber ich will an der dll nix ändern und das ganze als COM Object in meiner Anwendung verwenden? Also das PropertySheet ist registriert und ich will nicht die dll verwenden sondern über COM Interface gehen! Ist das möglich? |
Re: PropertySheet in Anwendung
Wenn die Dll einen ActiveX-Server und ein ActiveX-Objekt implemnetiert, kannst du diese ja wieder in Delphi importieren und verwenden. Einfacher wäre aber der Weg mit der Erweiterung des Interfaces.
|
Re: PropertySheet in Anwendung
und was mach ich dann wenn ich das importiert habe?
|
Re: PropertySheet in Anwendung
Die Komponente auf das Sheet ziehen
|
Re: PropertySheet in Anwendung
ich wäre jetz so vorgegangen:
in meiner anwendung habe ich so ein interface:
Delphi-Quellcode:
Die Funktion "propdlgproc" möchte ich aus dem COM Objekt aufrufen! Sieht so aus:
type
IPSheetTest = interface(IUnknown) ['{E6292C5D-5FBB-4BF8-911F-CC61132982DD}'] function QueryInterface(const IID: TGUID; out Obj): Integer; stdcall; function _AddRef: Integer; stdcall; function _Release: Integer; stdcall; function propdlgproc(hDlg: HWND; uMsg: UINT; wp: WPARAM; lp: LPARAM): boolean; stdcall; end;
Delphi-Quellcode:
Nur hauts ihn leider bei "LSheet.propdlgproc" auf die Schnauze. Weiß jemand woran das liegen könnte? Geht das überhaupt mit der Funktion propdlgproc einfach hinzufügen?
procedure TForm3.FormCreate(Sender: TObject);
var LSheet: IPSheetTest; tmpPropSheet : PROPSHEETPAGE; LDAPUrl: String; begin LDAPUrl := 'ldap://blablabla'; tmpPropSheet.lParam := Integer(LDAPUrl); tmpPropSheet.hInstance := TabSheet1.Handle; LSheet := IPSheetTest(CreateComObject(IPSheetTest)); LSheet.propdlgproc(self.Handle,WM_INITDIALOG, 0, Integer(@tmpPropSheet)) end; |
Re: PropertySheet in Anwendung
There's a sample in the PSDK (PropSheetHost) that might help. I started a conversion of the sample to Delphi (
![]() Are you trying to show a standard Active Directory property page or your own added property page? |
Re: PropertySheet in Anwendung
No he wrotes his own Display Specifier in a dll and wants to use it in an "normal" Delphi-Application
|
Re: PropertySheet in Anwendung
thats right!
i want to show my own-created Active Directory Property-Page in a 'standalone' Application! |
Re: PropertySheet in Anwendung
The PSDK sample show the default ADUC property page in your own application (which should also include your page). Perhaps you can use it or adapt it for your own property page? The sample uses:
Delphi-Quellcode:
I'm assuming you pass the tabsheet handle as hwndParent.
constructor Create(hInstance: Cardinal; hwndParent: HWND);
Can you attach your complete code? |
Re: PropertySheet in Anwendung
Hi!
thx for your advices...this helps me quite a lot! yes i will post it when i have finished it but... where can i get the files like...JwaActiveX, JwaDSClient, JwaAdsTLB??? |
Re: PropertySheet in Anwendung
They're in the
![]() ![]() Some more info that might assist you: ![]() |
Re: PropertySheet in Anwendung
hi,
i have a problem creating and setting the COM Object.
Delphi-Quellcode:
On calling "sheethost.QueryInterface(guid, Liads)", i get the Error message "interface not supported" !
procedure TForm3.FormCreate(Sender: TObject);
var sheethost: TPropSheetHost; Liads: IADs; guid: TGUID; begin sheethost := TPropSheetHost.Create(hInstance(Self), Self.Handle); guid := StringToGUID('{2E461895-1B42-4214-8B09-704509A6CDB7}'); OleCheck(sheethost.QueryInterface(guid, Liads)); sheethost.SetObject(Liads); end; Any ideas? |
Re: PropertySheet in Anwendung
{2E461895-1B42-4214-8B09-704509A6CDB7} Is the GUID to your added sheet? Please check if it's properly registered (search the registry for it). Can you open the normal propsheet?
Why not try to first call the normal propsheet?:
Delphi-Quellcode:
sheethost := TPropSheetHost.Create(hInstance(Self), Self.Handle);
// Hold a reference count for the CPropSheetHost object. sheethost.AddRef; sheethost.SetObject('LDAP://CN=SomeUser,DC=Domain,DC=Local'); sheethost.Run; { Release the CPropSheetHost object. Other components may still hold a reference to the object, so this cannot just be deleted here. Let the object delete itself when all references are released. } sheethost.Release; |
Alle Zeitangaben in WEZ +1. Es ist jetzt 09:50 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-2025 by Thomas Breitkreuz