AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Win32/Win64 API (native code) Delphi tat. und form. Var-Param. - fuzzt aufeinmal nicht mehr? D2K9
Thema durchsuchen
Ansicht
Themen-Optionen

tat. und form. Var-Param. - fuzzt aufeinmal nicht mehr? D2K9

Ein Thema von Alter Mann · begonnen am 15. Apr 2009 · letzter Beitrag vom 16. Apr 2009
 
Alter Mann

Registriert seit: 15. Nov 2003
Ort: Berlin
949 Beiträge
 
Delphi 10.2 Tokyo Professional
 
#21

Re: tat. und form. Var-Param. - fuzzt aufeinmal nicht mehr?

  Alt 16. Apr 2009, 16:20
So, so


@oki danke für die Hartnäckigkeit.

Ich hatte den Code mal dahin gehend geändert, aber danach kam die bekante Zugriffsverletzung in WLDAP32.dll.

Also noch mal ein Blick in das SDK:

Zitat:
HRESULT ExecuteSearch(
LPWSTR pszSearchFilter,
LPWSTR* pAttributeNames,
DWORD dwNumberAttributes,
PADS_SEARCH_HANDLE phSearchHandle
);

Parameters
pszSearchFilter
[in] A search filter string in LDAP format, such as "(objectClass=user)".
pAttributeNames
[in] An array of attribute names for which data is requested. If NULL, all attributes are requested and dwNumberAttributes must be -1.
dwNumberAttributes
[in] The size of the pAttributeNames array. If -1, all attributes are requested and pAttributeNames must be NULL.
phSearchHandle
[out] The address of a method-allocated handle to the search context. The caller passes this handle to other methods of IDirectorySearch to examine the search result. If NULL, the search cannot be executed.
Dort steht nun mal nicht [in/out] LPWSTR* pAttributeNames sondern nur LPWSTR* pAttributeNames.

Also liegt (mal wieder) am falschen Typlib-Import.

Delphi-Quellcode:
    function ExecuteSearch(pszSearchFilter: PWideChar; var pAttributeNames: PWideChar;
                           dwNumberAttributes: LongWord; out phSearchResult: Pointer): HResult; stdcall;
ist einfach verkehrt. Es muss richtig so aussehen:
Delphi-Quellcode:
    function ExecuteSearch(pszSearchFilter: PWideChar; pAttributeNames: PWideChar;
                           dwNumberAttributes: LongWord; out phSearchResult: THandle): HResult; stdcall;
Warum das nun so ist, keine Ahnung, war aber schon mit D7 so.

Danke.
  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 13:04 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