mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 08:25:48 +00:00
Sync to Wine-20040408:
Warren Turkal <wt@midsouth.rr.com> - Fixed the implementation of CoTreatAsClass. Francois Gouget <fgouget@free.fr> - Assorted spelling fixes. svn path=/trunk/; revision=9155
This commit is contained in:
parent
1954069fed
commit
d32be1b605
3 changed files with 34 additions and 9 deletions
|
@ -1588,7 +1588,7 @@ HINSTANCE WINAPI CoLoadLibrary(LPOLESTR lpszLibName, BOOL bAutoFree)
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* CoFreeLibrary [OLE32.@]
|
* CoFreeLibrary [OLE32.@]
|
||||||
*
|
*
|
||||||
* NOTES: don't belive the docu
|
* NOTES: don't believe the documentation
|
||||||
*/
|
*/
|
||||||
void WINAPI CoFreeLibrary(HINSTANCE hLibrary)
|
void WINAPI CoFreeLibrary(HINSTANCE hLibrary)
|
||||||
{
|
{
|
||||||
|
@ -1599,7 +1599,7 @@ void WINAPI CoFreeLibrary(HINSTANCE hLibrary)
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* CoFreeAllLibraries [OLE32.@]
|
* CoFreeAllLibraries [OLE32.@]
|
||||||
*
|
*
|
||||||
* NOTES: don't belive the docu
|
* NOTES: don't believe the documentation
|
||||||
*/
|
*/
|
||||||
void WINAPI CoFreeAllLibraries(void)
|
void WINAPI CoFreeAllLibraries(void)
|
||||||
{
|
{
|
||||||
|
@ -2010,14 +2010,19 @@ HRESULT WINAPI OleDoAutoConvert(IStorage *pStg, LPCLSID pClsidNew)
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* CoTreatAsClass [OLE32.@]
|
* CoTreatAsClass [OLE32.@]
|
||||||
|
*
|
||||||
|
* Sets TreatAs value of a class
|
||||||
*/
|
*/
|
||||||
HRESULT WINAPI CoTreatAsClass(REFCLSID clsidOld, REFCLSID clsidNew)
|
HRESULT WINAPI CoTreatAsClass(REFCLSID clsidOld, REFCLSID clsidNew)
|
||||||
{
|
{
|
||||||
HKEY hkey = 0;
|
HKEY hkey = 0;
|
||||||
char buf[200], szClsidNew[200];
|
char buf[47];
|
||||||
|
char szClsidNew[39];
|
||||||
HRESULT res = S_OK;
|
HRESULT res = S_OK;
|
||||||
|
char auto_treat_as[39];
|
||||||
|
LONG auto_treat_as_size = sizeof(auto_treat_as);
|
||||||
|
CLSID id;
|
||||||
|
|
||||||
FIXME("(%s,%s)\n", debugstr_guid(clsidOld), debugstr_guid(clsidNew));
|
|
||||||
sprintf(buf,"CLSID\\");WINE_StringFromCLSID(clsidOld,&buf[6]);
|
sprintf(buf,"CLSID\\");WINE_StringFromCLSID(clsidOld,&buf[6]);
|
||||||
WINE_StringFromCLSID(clsidNew, szClsidNew);
|
WINE_StringFromCLSID(clsidNew, szClsidNew);
|
||||||
if (RegOpenKeyA(HKEY_CLASSES_ROOT,buf,&hkey))
|
if (RegOpenKeyA(HKEY_CLASSES_ROOT,buf,&hkey))
|
||||||
|
@ -2025,7 +2030,24 @@ HRESULT WINAPI CoTreatAsClass(REFCLSID clsidOld, REFCLSID clsidNew)
|
||||||
res = REGDB_E_CLASSNOTREG;
|
res = REGDB_E_CLASSNOTREG;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
if (RegSetValueA(hkey, "AutoTreatAs", REG_SZ, szClsidNew, strlen(szClsidNew)+1))
|
if (!memcmp( clsidOld, clsidNew, sizeof(*clsidOld) ))
|
||||||
|
{
|
||||||
|
if (!RegQueryValueA(hkey, "AutoTreatAs", auto_treat_as, &auto_treat_as_size) &&
|
||||||
|
!__CLSIDFromStringA(auto_treat_as, &id))
|
||||||
|
{
|
||||||
|
if (RegSetValueA(hkey, "TreatAs", REG_SZ, auto_treat_as, strlen(auto_treat_as)+1))
|
||||||
|
{
|
||||||
|
res = REGDB_E_WRITEREGDB;
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
RegDeleteKeyA(hkey, "TreatAs");
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (RegSetValueA(hkey, "TreatAs", REG_SZ, szClsidNew, strlen(szClsidNew)+1))
|
||||||
{
|
{
|
||||||
res = REGDB_E_WRITEREGDB;
|
res = REGDB_E_WRITEREGDB;
|
||||||
goto done;
|
goto done;
|
||||||
|
|
|
@ -565,7 +565,7 @@ LPVOID WINAPI CoTaskMemRealloc(LPVOID pvOld, ULONG size)
|
||||||
* CoRegisterMallocSpy [OLE32.@]
|
* CoRegisterMallocSpy [OLE32.@]
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* if a mallocspy is already registered, we cant do it again since
|
* if a mallocspy is already registered, we can't do it again since
|
||||||
* only the spy knows, how to free a memory block
|
* only the spy knows, how to free a memory block
|
||||||
*/
|
*/
|
||||||
HRESULT WINAPI CoRegisterMallocSpy(LPMALLOCSPY pMallocSpy)
|
HRESULT WINAPI CoRegisterMallocSpy(LPMALLOCSPY pMallocSpy)
|
||||||
|
|
|
@ -332,6 +332,9 @@ HRESULT WINAPI RegisterDragDrop(
|
||||||
|
|
||||||
TRACE("(%p,%p)\n", hwnd, pDropTarget);
|
TRACE("(%p,%p)\n", hwnd, pDropTarget);
|
||||||
|
|
||||||
|
if (!pDropTarget)
|
||||||
|
return E_INVALIDARG;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* First, check if the window is already registered.
|
* First, check if the window is already registered.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue