[PATCH 2/5] activeds: Implement ADsOpenObject.

Alistair Leslie-Hughes leslie_alistair at hotmail.com
Mon Dec 16 02:02:45 CST 2019


Hi Dmitry,

On 16/12/19 12:41 pm, Dmitry Timoshkov wrote:
> Signed-off-by: Dmitry Timoshkov <dmitry at 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.


More information about the wine-devel mailing list