SAFEARRAY* psa = SafeArrayCreateVector(VT_VARIANT, 0, 1);
VARIANT *param;
bstr_t bsData = (LPCTSTR)lpszHTMLCode;
hr = SafeArrayAccessData(psa, (LPVOID*)¶m);
param->vt = VT_BSTR;
param->bstrVal = (BSTR)bsData;
hr = pDoc->write(psa);// 就是在这儿出错
hr = pDoc->close();
SafeArrayDestroy(psa);
spBrowser->ReadyState ;
error C2039: 'ReadyState' : is not a member of '_NoAddRefReleaseOnCComPtr<struct IWebBrowser2>'
BSTR *p
);Parametersp
Address of a string variable that receives the download status of the object. It can be one of these strings: complete The object is completely loaded.
interactive The object can be interacted with even though it is not fully loaded.
loading The object is currently being loaded.
unitialized The object is not created. This value usually means that the object is being downloaded. Return ValueReturns S_OK if successful, or an error value otherwise.
这里有我写的一个例子程序,用到了document.write和safearray