shlwapi: Forward CLSIDFromProgIDWrap to ole32 (with test).

This commit is contained in:
Jacek Caban 2007-01-06 17:05:58 +01:00 committed by Alexandre Julliard
parent 5e4f792eab
commit d159b33228
3 changed files with 27 additions and 2 deletions

View File

@ -432,7 +432,7 @@
432 stub -noname SHSendMessageBroadcastA
433 stub -noname SHSendMessageBroadcastW
434 stdcall @(long long long long long long ptr) user32.SendMessageTimeoutW
435 stub -noname CLSIDFromProgIDWrap
435 stdcall -noname CLSIDFromProgIDWrap(wstr ptr) ole32.CLSIDFromProgID
436 stdcall -noname CLSIDFromStringWrap(wstr ptr)
437 stdcall -noname IsOS(long)
438 stub -noname SHLoadRegUIStringA

View File

@ -4,6 +4,7 @@ SRCDIR = @srcdir@
VPATH = @srcdir@
TESTDLL = shlwapi.dll
IMPORTS = shlwapi advapi32 ole32 oleaut32 kernel32
EXTRALIBS = -luuid
CTESTS = \
clist.c \

View File

@ -19,7 +19,6 @@
#include <stdio.h>
#define INITGUID
#include "wine/test.h"
#include "winbase.h"
#include "winerror.h"
@ -27,6 +26,10 @@
#include "winuser.h"
#include "shlguid.h"
#include "shobjidl.h"
#include "olectl.h"
#define INITGUID
#include "initguid.h"
/* Function ptrs for ordinal calls */
static HMODULE hShlwapi = 0;
@ -153,6 +156,26 @@ static void test_ClassIDs(void)
ok(szBuff[0] == '{', "Didn't write to buffer with ok length\n");
}
static void test_CLSIDFromProgIDWrap(void)
{
HRESULT (WINAPI *pCLSIDFromProgIDWrap)(LPCOLESTR,LPCLSID);
CLSID clsid = IID_NULL;
HRESULT hres;
static const WCHAR wszStdPicture[] = {'S','t','d','P','i','c','t','u','r','e',0};
pCLSIDFromProgIDWrap = (void*)GetProcAddress(hShlwapi,(char*)435);
hres = pCLSIDFromProgIDWrap(wszStdPicture, &clsid);
ok(hres == S_OK, "CLSIDFromProgIDWrap failed: %08x\n", hres);
ok(IsEqualGUID(&CLSID_StdPicture, &clsid), "wrong clsid\n");
hres = pCLSIDFromProgIDWrap(NULL, &clsid);
ok(hres == E_INVALIDARG, "CLSIDFromProgIDWrap failed: %08x, expected E_INVALIDARG\n", hres);
hres = pCLSIDFromProgIDWrap(wszStdPicture, NULL);
ok(hres == E_INVALIDARG, "CLSIDFromProgIDWrap failed: %08x, expected E_INVALIDARG\n", hres);
}
START_TEST(clsid)
{
@ -165,6 +188,7 @@ START_TEST(clsid)
}
test_ClassIDs();
test_CLSIDFromProgIDWrap();
if (hShlwapi)
FreeLibrary(hShlwapi);