Jacek Caban (@jacek) commented about dlls/mshtml/tests/events.c:
- IMoniker *mon;
- HRESULT hres;
- DWORD len;
- BSTR bstr;
- wcscpy(url, SZ_HTML_CLIENTSITE_OBJECTPARAM);
- CreateBindCtx(0, &bind);
- IBindCtx_RegisterObjectParam(bind, url, (IUnknown*)&ClientSite);
- notif_doc = doc;
- doc_complete = FALSE;
- memcpy(url, res, sizeof(res));
- len = 6 + GetModuleFileNameW(NULL, url + ARRAY_SIZE(res), ARRAY_SIZE(url) - ARRAY_SIZE(res) - 1);
- url[len++] = '/';
- MultiByteToWideChar(CP_ACP, 0, file, -1, url + len, ARRAY_SIZE(url) - len);
You could just pass file as Unicode string instead.