On 5/24/2010 16:25, David Hedberg wrote: Hi, David.
+} + +static ULONG WINAPI IExplorerBrowser_fnRelease(IExplorerBrowser *iface) +{ + ExplorerBrowserImpl *This = (ExplorerBrowserImpl*)iface; + TRACE("This: %p\n", This); + + This->ref--; + TRACE("Ref: %d\n", This->ref);
Use interlocked increment/decrement here.
+ +static HRESULT WINAPI IExplorerBrowser_fnSetRect( + IExplorerBrowser *iface, + HDWP *phdwp, + RECT rcBrowser) +{ + ExplorerBrowserImpl *This = (ExplorerBrowserImpl*)iface; + TRACE("This: %p\n", This); + + return E_NOTIMPL;
If it isn't tested to really return E_NOTIMPL you should output a FIXME() with a stub comment. };
diff --git a/dlls/shell32/shell32_main.h b/dlls/shell32/shell32_main.h index 8f51850..78b37a8 100644 --- a/dlls/shell32/shell32_main.h +++ b/dlls/shell32/shell32_main.h @@ -99,6 +99,7 @@ HRESULT WINAPI FolderShortcut_Constructor(IUnknown * pUnkOuter, REFIID riid, LPV HRESULT WINAPI MyDocuments_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID *ppv); HRESULT WINAPI RecycleBin_Constructor(IUnknown * pUnkOuter, REFIID riif, LPVOID *ppv); HRESULT WINAPI QueryAssociations_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppOutput); +HRESULT WINAPI ExplorerBrowser_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv); extern HRESULT CPanel_GetIconLocationW(LPCITEMIDLIST, LPWSTR, UINT, int*); HRESULT WINAPI CPanel_ExtractIconA(LPITEMIDLIST pidl, LPCSTR pszFile, UINT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize); HRESULT WINAPI CPanel_ExtractIconW(LPITEMIDLIST pidl, LPCWSTR pszFile, UINT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize); diff --git a/dlls/shell32/shellole.c b/dlls/shell32/shellole.c index 10244fd..54ae017 100644 --- a/dlls/shell32/shellole.c +++ b/dlls/shell32/shellole.c @@ -77,6 +77,7 @@ static const struct { {&CLSID_ShellLink, IShellLink_Constructor}, {&CLSID_UnixDosFolder, UnixDosFolder_Constructor}, {&CLSID_UnixFolder, UnixFolder_Constructor}, + {&CLSID_ExplorerBrowser,ExplorerBrowser_Constructor}, {NULL, NULL} };
Use consistent indentation style please.
+ } + + ZeroMemory(&rc, sizeof(RECT));
You don't test for a rectangle later, so there's no point to initialize it.
+ + hres = IExplorerBrowser_Initialize(lpEB, hwnd,&rc, NULL); + ok(SUCCEEDED(hres), "got (0x%08x)\n", hres); + + hres = IExplorerBrowser_Destroy(lpEB); + ok(SUCCEEDED(hres), "got (0x%08x)\n", hres); + + /* Initialize again */ + IExplorerBrowser_Initialize(lpEB, hwnd,&rc, NULL); + ok(SUCCEEDED(hres), "got (0x%08x)\n", hres); + + /* Initialize twice */ + IExplorerBrowser_Initialize(lpEB, hwnd,&rc, NULL); + ok(SUCCEEDED(hres), "got (0x%08x)\n", hres);
Please avoid these HRESULT macros in tests, use explicit return values like S_OK. SUCCEEDED() hides things.