Einzelnen Beitrag anzeigen

Benutzerbild von Remko
Remko

Registriert seit: 10. Okt 2006
Ort: 's-Hertogenbosch, Die Niederlande
222 Beiträge
 
RAD-Studio 2010 Arc
 
#45

Re: Zugriffsverletzung ADSI, so was komisches hab ich noch n

  Alt 24. Feb 2010, 09:56
AdsOpenObject always returns a HRESULT which you can check against known values (case hr of). When you declare a function as safecall in Delphi a wrapper (sometimes called an exception firewall) is added that will raise exceptions for you. If you want you can declare the function as safecall (just replace stdcall with safecall) and use a try..except handler.

PS: the other functions in AdsHlp such as AdsGetObject have the same declaration using WideString so you should change those as well...
See my blog blog
See our Jedi blog
  Mit Zitat antworten Zitat