Hi Dmitry,
On 16/12/19 12:41 pm, Dmitry Timoshkov wrote:
Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru
if (CoCreateInstance(&clsid, 0, CLSCTX_INPROC_SERVER, &IID_IADsOpenDSObject, (void **)&adsopen) == S_OK)
{
hr = IADsOpenDSObject_OpenDSObject(adsopen, (BSTR)path, (BSTR)user, (BSTR)password, reserved, &disp);
if (hr == S_OK)
You cannot cast to a BSTR, it will corrupt the data structure.
{
hr = IDispatch_QueryInterface(disp, riid, obj);
IDispatch_Release(disp);
Now that you have found the object, shouldn't you exit the loop?
Regards Alistair.