Thanks, Glenn, for the reply.
My call that goes "crunch" is the call to IADsOpenDSObject:
Code:
var
Protocol : string;
DispPtr : pointer;
OpenDS : IADsOpenDSObject;
begin
Protocol := 'LDAP';
ADsGetObject(Protocol, IADsOpenDSObject, DispPtr);
if assigned(DispPtr) then
OpenDS := IADsOpenDSObject(DispPtr);
end;
(This is a cut-and-paste of the routine I'm using, so the Protocol may be LDAP or LDAP:, I don't remember at the moment. It works using activeds.dll v6.0 and v5.1, so it's which ever version that should work.)
Both of IADsOpenDSObject and ADsGetObject are declared in JwaActiveDS.pas, which is the JEDI Active Directory Services API interface Unit for Object Pascal. My copy is dated Nov 23, 2009. It is this Unit which makes the call to the activeds.dll library. The routines are defined as follows:
Code:
// *********************************************************************//
// Interface: IADsOpenDSObject
// Flags: (4416) Dual OleAutomation Dispatchable
// GUID: {DDF2891E-0F9C-11D0-8AD4-00C04FD8D503}
// *********************************************************************//
IADsOpenDSObject = interface(IDispatch)
['{DDF2891E-0F9C-11D0-8AD4-00C04FD8D503}']
function OpenDSObject(const lpszDNName: WideString; const lpszUserName: WideString;
const lpszPassword: WideString; lnReserved: Integer): IDispatch; safecall;
end;
{$IFDEF DYNAMIC_LINK}
var
_ADsGetObject: Pointer;
function ADsGetObject;
begin
GetProcedureAddress(_ADsGetObject, adslib, 'ADsGetObject');
asm
mov esp, ebp
pop ebp
jmp [_ADsGetObject]
end;
end;
{$ELSE}
function ADsGetObject; external adslib name 'ADsGetObject';
{$ENDIF DYNAMIC_LINK}
The conditional defines are set to use DYNAMIC_LINK at the moment.
When the app crashes, it returns an error from KERNEL.DLL. I would copy the entire error here, but unfortunately, I haven't received the dump from the user yet, as I remote into their server to perform the tests, but I cannot copy files directly from their server.
I'll reply with more detail when I get it. Thanks _very_much_ for any assistance you can offer us.
:-D Daniel