Commit 27627d97 authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

Implemented CoGetTreatAsClass.

parent d26933ed
...@@ -1863,6 +1863,40 @@ done: ...@@ -1863,6 +1863,40 @@ done:
return res; return res;
} }
/******************************************************************************
* CoGetTreatAsClass [OLE32.25]
*
* Reads the TreatAs value from a class.
*/
HRESULT WINAPI CoGetTreatAsClass(REFCLSID clsidOld, LPCLSID clsidNew)
{
HKEY hkey = 0;
char buf[200], szClsidNew[200];
HRESULT res = S_OK;
LONG len = sizeof(szClsidNew);
FIXME("(%s,%p)\n", debugstr_guid(clsidOld), clsidNew);
sprintf(buf,"CLSID\\");WINE_StringFromCLSID(clsidOld,&buf[6]);
memcpy(clsidNew,clsidOld,sizeof(CLSID)); /* copy over old value */
if (RegOpenKeyA(HKEY_CLASSES_ROOT,buf,&hkey))
{
res = REGDB_E_CLASSNOTREG;
goto done;
}
if (RegQueryValueA(hkey, "TreatAs", szClsidNew, &len))
{
res = S_FALSE;
goto done;
}
res = __CLSIDFromStringA(szClsidNew,clsidNew);
if (FAILED(res))
FIXME("Failed CLSIDFromStringA(%s), hres %lx?\n",szClsidNew,res);
done:
if (hkey) RegCloseKey(hkey);
return res;
}
/*********************************************************************** /***********************************************************************
* IsEqualGUID [OLE32.76] * IsEqualGUID [OLE32.76]
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
22 stdcall CoGetPSClsid(ptr ptr) CoGetPSClsid 22 stdcall CoGetPSClsid(ptr ptr) CoGetPSClsid
23 stdcall CoGetStandardMarshal(ptr ptr long ptr long ptr) CoGetStandardMarshal 23 stdcall CoGetStandardMarshal(ptr ptr long ptr long ptr) CoGetStandardMarshal
24 stdcall CoGetState(ptr) CoGetState 24 stdcall CoGetState(ptr) CoGetState
25 stub CoGetTreatAsClass # stdcall (ptr ptr) return 0,ERR_NOTIMPLEMENTED 25 stdcall CoGetTreatAsClass(ptr ptr) CoGetTreatAsClass
26 stdcall CoInitialize(ptr) CoInitialize 26 stdcall CoInitialize(ptr) CoInitialize
27 stdcall CoInitializeWOW(long long) CoInitializeWOW 27 stdcall CoInitializeWOW(long long) CoInitializeWOW
28 stub CoIsHandlerConnected # stdcall (ptr) return 0,ERR_NOTIMPLEMENTED 28 stub CoIsHandlerConnected # stdcall (ptr) return 0,ERR_NOTIMPLEMENTED
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment