diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c index 1de9e495d9b..a702e09f89f 100644 --- a/dlls/ole32/compobj.c +++ b/dlls/ole32/compobj.c @@ -1941,3 +1941,25 @@ BOOL WINAPI COMPOBJ_DllEntryPoint(DWORD Reason, HINSTANCE16 hInst, WORD ds, WORD } return TRUE; } + +/****************************************************************************** + * OleGetAutoConvert [OLE32.104] + */ +HRESULT WINAPI OleGetAutoConvert(REFCLSID clsidOld, LPCLSID pClsidNew) +{ + HKEY hkey; + char buf[200]; + WCHAR wbuf[200]; + DWORD len; + + sprintf(buf,"CLSID\\");WINE_StringFromCLSID(clsidOld,&buf[6]); + if (RegOpenKeyA(HKEY_CLASSES_ROOT,buf,&hkey)) + return REGDB_E_CLASSNOTREG; + len = 200; + if (RegQueryValueA(hkey,"AutoConvertTo",buf,&len)) + return REGDB_E_KEYMISSING; + RegCloseKey(hkey); + lstrcpyAtoW(wbuf,buf); + CLSIDFromString(wbuf,pClsidNew); + return S_OK; +} diff --git a/dlls/ole32/ole32.spec b/dlls/ole32/ole32.spec index eec019c2e8b..e9cda5b4b58 100644 --- a/dlls/ole32/ole32.spec +++ b/dlls/ole32/ole32.spec @@ -107,7 +107,7 @@ import kernel32 101 stub OleDraw 102 stdcall OleDuplicateData(long long long) OleDuplicateData 103 stdcall OleFlushClipboard() OleFlushClipboard -104 stub OleGetAutoConvert +104 stdcall OleGetAutoConvert(ptr ptr) OleGetAutoConvert 105 stdcall OleGetClipboard(ptr) OleGetClipboard 106 stdcall OleGetIconOfClass(ptr ptr long) OleGetIconOfClass 107 stub OleGetIconOfFile