Commit 91791032 authored by Alexandre Julliard's avatar Alexandre Julliard

Cleaned up a few inter-dll dependencies.

parent b167d4b2
...@@ -763,7 +763,7 @@ HRESULT WINAPI CLSIDFromString( ...@@ -763,7 +763,7 @@ HRESULT WINAPI CLSIDFromString(
* RETURNS * RETURNS
* the string representation and OLESTATUS * the string representation and OLESTATUS
*/ */
HRESULT WINE_StringFromCLSID( static HRESULT WINE_StringFromCLSID(
const CLSID *id, /* [in] GUID to be converted */ const CLSID *id, /* [in] GUID to be converted */
LPSTR idstr /* [out] pointer to buffer to contain converted guid */ LPSTR idstr /* [out] pointer to buffer to contain converted guid */
) { ) {
......
...@@ -35,7 +35,6 @@ ...@@ -35,7 +35,6 @@
#include "wingdi.h" #include "wingdi.h"
#include "winuser.h" #include "winuser.h"
#include "winerror.h" #include "winerror.h"
#include "crtdll.h"
#include "wine/obj_oleview.h" #include "wine/obj_oleview.h"
#include "wine/obj_cache.h" #include "wine/obj_cache.h"
#include "wine/unicode.h" #include "wine/unicode.h"
...@@ -683,9 +682,9 @@ static BOOL DataCache_IsPresentationStream(const STATSTG *elem) ...@@ -683,9 +682,9 @@ static BOOL DataCache_IsPresentationStream(const STATSTG *elem)
&& (elem->cbSize.s.LowPart >= sizeof(PresentationDataHeader)) && (elem->cbSize.s.LowPart >= sizeof(PresentationDataHeader))
&& (strlenW(name) == 11) && (strlenW(name) == 11)
&& (strncmpW(name, OlePres, 8) == 0) && (strncmpW(name, OlePres, 8) == 0)
&& CRTDLL_iswdigit(name[8]) && (name[8] >= '0') && (name[8] <= '9')
&& CRTDLL_iswdigit(name[9]) && (name[9] >= '0') && (name[9] <= '9')
&& CRTDLL_iswdigit(name[10]); && (name[10] >= '0') && (name[10] <= '9');
} }
/************************************************************************ /************************************************************************
......
...@@ -393,7 +393,6 @@ HRESULT WINAPI OleRegGetUserType( ...@@ -393,7 +393,6 @@ HRESULT WINAPI OleRegGetUserType(
DWORD dwFormOfType, DWORD dwFormOfType,
LPOLESTR* pszUserType) LPOLESTR* pszUserType)
{ {
char xclsid[50];
char keyName[60]; char keyName[60];
DWORD dwKeyType; DWORD dwKeyType;
DWORD cbData; DWORD cbData;
...@@ -409,11 +408,10 @@ HRESULT WINAPI OleRegGetUserType( ...@@ -409,11 +408,10 @@ HRESULT WINAPI OleRegGetUserType(
/* /*
* Build the key name we're looking for * Build the key name we're looking for
*/ */
WINE_StringFromCLSID((LPCLSID)clsid, xclsid); sprintf( keyName, "CLSID\\{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\\",
clsid->Data1, clsid->Data2, clsid->Data3,
strcpy(keyName, "CLSID\\"); clsid->Data4[0], clsid->Data4[1], clsid->Data4[2], clsid->Data4[3],
strcat(keyName, xclsid); clsid->Data4[4], clsid->Data4[5], clsid->Data4[6], clsid->Data4[7] );
strcat(keyName, "\\");
TRACE("(%s, %ld, %p)\n", keyName, dwFormOfType, pszUserType); TRACE("(%s, %ld, %p)\n", keyName, dwFormOfType, pszUserType);
...@@ -602,7 +600,6 @@ HRESULT WINAPI OleRegGetMiscStatus( ...@@ -602,7 +600,6 @@ HRESULT WINAPI OleRegGetMiscStatus(
DWORD dwAspect, DWORD dwAspect,
DWORD* pdwStatus) DWORD* pdwStatus)
{ {
char xclsid[50];
char keyName[60]; char keyName[60];
HKEY clsidKey; HKEY clsidKey;
HKEY miscStatusKey; HKEY miscStatusKey;
...@@ -617,11 +614,10 @@ HRESULT WINAPI OleRegGetMiscStatus( ...@@ -617,11 +614,10 @@ HRESULT WINAPI OleRegGetMiscStatus(
/* /*
* Build the key name we're looking for * Build the key name we're looking for
*/ */
WINE_StringFromCLSID((LPCLSID)clsid, xclsid); sprintf( keyName, "CLSID\\{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\\",
clsid->Data1, clsid->Data2, clsid->Data3,
strcpy(keyName, "CLSID\\"); clsid->Data4[0], clsid->Data4[1], clsid->Data4[2], clsid->Data4[3],
strcat(keyName, xclsid); clsid->Data4[4], clsid->Data4[5], clsid->Data4[6], clsid->Data4[7] );
strcat(keyName, "\\");
TRACE("(%s, %ld, %p)\n", keyName, dwAspect, pdwStatus); TRACE("(%s, %ld, %p)\n", keyName, dwAspect, pdwStatus);
......
...@@ -73,10 +73,11 @@ QueryPathOfRegTypeLib16( ...@@ -73,10 +73,11 @@ QueryPathOfRegTypeLib16(
DWORD plen; DWORD plen;
if (HIWORD(guid)) { if (HIWORD(guid)) {
WINE_StringFromCLSID(guid,xguid); sprintf( typelibkey, "SOFTWARE\\Classes\\Typelib\\{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\\%d.%d\\%lx\\win16",
sprintf(typelibkey,"SOFTWARE\\Classes\\Typelib\\%s\\%d.%d\\%lx\\win16", guid->Data1, guid->Data2, guid->Data3,
xguid,wMaj,wMin,lcid guid->Data4[0], guid->Data4[1], guid->Data4[2], guid->Data4[3],
); guid->Data4[4], guid->Data4[5], guid->Data4[6], guid->Data4[7],
wMaj,wMin,lcid);
} else { } else {
sprintf(xguid,"<guid 0x%08lx>",(DWORD)guid); sprintf(xguid,"<guid 0x%08lx>",(DWORD)guid);
FIXME("(%s,%d,%d,0x%04lx,%p),can't handle non-string guids.\n",xguid,wMaj,wMin,(DWORD)lcid,path); FIXME("(%s,%d,%d,0x%04lx,%p),can't handle non-string guids.\n",xguid,wMaj,wMin,(DWORD)lcid,path);
...@@ -113,10 +114,11 @@ QueryPathOfRegTypeLib( ...@@ -113,10 +114,11 @@ QueryPathOfRegTypeLib(
if (HIWORD(guid)) { if (HIWORD(guid)) {
WINE_StringFromCLSID(guid,xguid); sprintf( typelibkey, "SOFTWARE\\Classes\\Typelib\\{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}\\%d.%d\\%lx\\win32",
sprintf(typelibkey,"SOFTWARE\\Classes\\Typelib\\%s\\%d.%d\\%lx\\win32", guid->Data1, guid->Data2, guid->Data3,
xguid,wMaj,wMin,lcid guid->Data4[0], guid->Data4[1], guid->Data4[2], guid->Data4[3],
); guid->Data4[4], guid->Data4[5], guid->Data4[6], guid->Data4[7],
wMaj,wMin,lcid);
} else { } else {
sprintf(xguid,"<guid 0x%08lx>",(DWORD)guid); sprintf(xguid,"<guid 0x%08lx>",(DWORD)guid);
FIXME("(%s,%d,%d,0x%04lx,%p),stub!\n",xguid,wMaj,wMin,(DWORD)lcid,path); FIXME("(%s,%d,%d,0x%04lx,%p),stub!\n",xguid,wMaj,wMin,(DWORD)lcid,path);
...@@ -222,12 +224,8 @@ HRESULT WINAPI LoadRegTypeLib( ...@@ -222,12 +224,8 @@ HRESULT WINAPI LoadRegTypeLib(
res= LoadTypeLib(bstr, ppTLib); res= LoadTypeLib(bstr, ppTLib);
SysFreeString(bstr); SysFreeString(bstr);
} }
if(TRACE_ON(typelib)){ TRACE("(IID: %s) load %s (%p)\n",debugstr_guid(rguid),
char xriid[50];
WINE_StringFromCLSID((LPCLSID)rguid,xriid);
TRACE("(IID: %s) load %s (%p)\n",xriid,
SUCCEEDED(res)? "SUCCESS":"FAILED", *ppTLib); SUCCEEDED(res)? "SUCCESS":"FAILED", *ppTLib);
}
return res; return res;
} }
...@@ -270,9 +268,7 @@ HRESULT WINAPI UnRegisterTypeLib( ...@@ -270,9 +268,7 @@ HRESULT WINAPI UnRegisterTypeLib(
LCID lcid, /* [in] locale id */ LCID lcid, /* [in] locale id */
SYSKIND syskind) SYSKIND syskind)
{ {
char xriid[50]; TRACE("(IID: %s): stub\n",debugstr_guid(libid));
WINE_StringFromCLSID((LPCLSID)libid,xriid);
TRACE("(IID: %s): stub\n",xriid);
return S_OK; /* FIXME: pretend everything is OK */ return S_OK; /* FIXME: pretend everything is OK */
} }
...@@ -1260,11 +1256,7 @@ int TLB_ReadTypeLib(PCHAR file, ITypeLib **ppTypeLib) ...@@ -1260,11 +1256,7 @@ int TLB_ReadTypeLib(PCHAR file, ITypeLib **ppTypeLib)
static HRESULT WINAPI ITypeLib_fnQueryInterface( LPTYPELIB This, REFIID riid, static HRESULT WINAPI ITypeLib_fnQueryInterface( LPTYPELIB This, REFIID riid,
VOID **ppvObject) VOID **ppvObject)
{ {
if(TRACE_ON(typelib)){ TRACE("(%p)->(IID: %s)\n",This,debugstr_guid(riid));
char xriid[50];
WINE_StringFromCLSID((LPCLSID)riid,xriid);
TRACE("(%p)->(IID: %s)\n",This,xriid);
}
*ppvObject=NULL; *ppvObject=NULL;
if(IsEqualIID(riid, &IID_IUnknown) || if(IsEqualIID(riid, &IID_IUnknown) ||
IsEqualIID(riid,&IID_ITypeLib)|| IsEqualIID(riid,&IID_ITypeLib)||
...@@ -1364,11 +1356,7 @@ static HRESULT WINAPI ITypeLib_fnGetTypeInfoOfGuid( LPTYPELIB iface, ...@@ -1364,11 +1356,7 @@ static HRESULT WINAPI ITypeLib_fnGetTypeInfoOfGuid( LPTYPELIB iface,
int i; int i;
ICOM_THIS( TLBLibInfo, iface); ICOM_THIS( TLBLibInfo, iface);
TLBTypeInfo **ppTLBTInfo=(TLBTypeInfo **)ppTInfo; TLBTypeInfo **ppTLBTInfo=(TLBTypeInfo **)ppTInfo;
if(TRACE_ON(typelib)){ TRACE("(%p) guid %sx)\n",This,debugstr_guid(guid));
char xriid[50];
WINE_StringFromCLSID((LPCLSID)guid,xriid);
TRACE("(%p) guid %sx)\n",This,xriid);
}
for(i=0,*ppTLBTInfo=This->pTypeInfo;*ppTLBTInfo && for(i=0,*ppTLBTInfo=This->pTypeInfo;*ppTLBTInfo &&
!IsEqualIID(guid,&(*ppTLBTInfo)->TypeAttr.guid);i++) !IsEqualIID(guid,&(*ppTLBTInfo)->TypeAttr.guid);i++)
*ppTLBTInfo=(*ppTLBTInfo)->next; *ppTLBTInfo=(*ppTLBTInfo)->next;
...@@ -1551,11 +1539,7 @@ static HRESULT WINAPI ITypeLib2_fnGetCustData( ITypeLib * iface, REFGUID guid, ...@@ -1551,11 +1539,7 @@ static HRESULT WINAPI ITypeLib2_fnGetCustData( ITypeLib * iface, REFGUID guid,
TLBCustData *pCData; TLBCustData *pCData;
for(pCData=This->pCustData; pCData; pCData = pCData->next) for(pCData=This->pCustData; pCData; pCData = pCData->next)
if( IsEqualIID(guid, &pCData->guid)) break; if( IsEqualIID(guid, &pCData->guid)) break;
if(TRACE_ON(typelib)){ TRACE("(%p) guid %s %s found!x)\n", This, debugstr_guid(guid), pCData? "" : "NOT");
char xriid[50];
WINE_StringFromCLSID((LPCLSID)guid,xriid);
TRACE("(%p) guid %s %s found!x)\n", This, xriid, pCData? "" : "NOT");
}
if(pCData){ if(pCData){
VariantInit( pVarVal); VariantInit( pVarVal);
VariantCopy( pVarVal, &pCData->data); VariantCopy( pVarVal, &pCData->data);
...@@ -1655,11 +1639,7 @@ static HRESULT WINAPI ITypeInfo_fnQueryInterface( LPTYPEINFO iface, REFIID riid, ...@@ -1655,11 +1639,7 @@ static HRESULT WINAPI ITypeInfo_fnQueryInterface( LPTYPEINFO iface, REFIID riid,
VOID **ppvObject) VOID **ppvObject)
{ {
ICOM_THIS( TLBTypeInfo, iface); ICOM_THIS( TLBTypeInfo, iface);
if(TRACE_ON(typelib)){ TRACE("(%p)->(IID: %s)\n",This,debugstr_guid(riid));
char xriid[50];
WINE_StringFromCLSID((LPCLSID)riid,xriid);
TRACE("(%p)->(IID: %s)\n",This,xriid);
}
*ppvObject=NULL; *ppvObject=NULL;
if(IsEqualIID(riid, &IID_IUnknown) || if(IsEqualIID(riid, &IID_IUnknown) ||
IsEqualIID(riid,&IID_ITypeInfo)|| IsEqualIID(riid,&IID_ITypeInfo)||
...@@ -2243,11 +2223,7 @@ static HRESULT WINAPI ITypeInfo2_fnGetCustData( ITypeInfo * iface, ...@@ -2243,11 +2223,7 @@ static HRESULT WINAPI ITypeInfo2_fnGetCustData( ITypeInfo * iface,
TLBCustData *pCData; TLBCustData *pCData;
for(pCData=This->pCustData; pCData; pCData = pCData->next) for(pCData=This->pCustData; pCData; pCData = pCData->next)
if( IsEqualIID(guid, &pCData->guid)) break; if( IsEqualIID(guid, &pCData->guid)) break;
if(TRACE_ON(typelib)){ TRACE("(%p) guid %s %s found!x)\n", This, debugstr_guid(guid), pCData? "" : "NOT");
char xriid[50];
WINE_StringFromCLSID((LPCLSID)guid,xriid);
TRACE("(%p) guid %s %s found!x)\n", This, xriid, pCData? "" : "NOT");
}
if(pCData){ if(pCData){
VariantInit( pVarVal); VariantInit( pVarVal);
VariantCopy( pVarVal, &pCData->data); VariantCopy( pVarVal, &pCData->data);
...@@ -2273,11 +2249,7 @@ static HRESULT WINAPI ITypeInfo2_fnGetFuncCustData( ITypeInfo * iface, ...@@ -2273,11 +2249,7 @@ static HRESULT WINAPI ITypeInfo2_fnGetFuncCustData( ITypeInfo * iface,
if(pFDesc) if(pFDesc)
for(pCData=pFDesc->pCustData; pCData; pCData = pCData->next) for(pCData=pFDesc->pCustData; pCData; pCData = pCData->next)
if( IsEqualIID(guid, &pCData->guid)) break; if( IsEqualIID(guid, &pCData->guid)) break;
if(TRACE_ON(typelib)){ TRACE("(%p) guid %s %s found!x)\n", This, debugstr_guid(guid), pCData? "" : "NOT");
char xriid[50];
WINE_StringFromCLSID((LPCLSID)guid,xriid);
TRACE("(%p) guid %s %s found!x)\n", This, xriid, pCData? "" : "NOT");
}
if(pCData){ if(pCData){
VariantInit( pVarVal); VariantInit( pVarVal);
VariantCopy( pVarVal, &pCData->data); VariantCopy( pVarVal, &pCData->data);
...@@ -2304,11 +2276,7 @@ static HRESULT WINAPI ITypeInfo2_fnGetParamCustData( ITypeInfo * iface, ...@@ -2304,11 +2276,7 @@ static HRESULT WINAPI ITypeInfo2_fnGetParamCustData( ITypeInfo * iface,
for(pCData=pFDesc->pParamDesc[indexParam].pCustData; pCData; for(pCData=pFDesc->pParamDesc[indexParam].pCustData; pCData;
pCData = pCData->next) pCData = pCData->next)
if( IsEqualIID(guid, &pCData->guid)) break; if( IsEqualIID(guid, &pCData->guid)) break;
if(TRACE_ON(typelib)){ TRACE("(%p) guid %s %s found!x)\n", This, debugstr_guid(guid), pCData? "" : "NOT");
char xriid[50];
WINE_StringFromCLSID((LPCLSID)guid,xriid);
TRACE("(%p) guid %s %s found!x)\n", This, xriid, pCData? "" : "NOT");
}
if(pCData){ if(pCData){
VariantInit( pVarVal); VariantInit( pVarVal);
VariantCopy( pVarVal, &pCData->data); VariantCopy( pVarVal, &pCData->data);
...@@ -2334,11 +2302,7 @@ static HRESULT WINAPI ITypeInfo2_fnGetVarCustData( ITypeInfo * iface, ...@@ -2334,11 +2302,7 @@ static HRESULT WINAPI ITypeInfo2_fnGetVarCustData( ITypeInfo * iface,
if(pVDesc) if(pVDesc)
for(pCData=pVDesc->pCustData; pCData; pCData = pCData->next) for(pCData=pVDesc->pCustData; pCData; pCData = pCData->next)
if( IsEqualIID(guid, &pCData->guid)) break; if( IsEqualIID(guid, &pCData->guid)) break;
if(TRACE_ON(typelib)){ TRACE("(%p) guid %s %s found!x)\n", This, debugstr_guid(guid), pCData? "" : "NOT");
char xriid[50];
WINE_StringFromCLSID((LPCLSID)guid,xriid);
TRACE("(%p) guid %s %s found!x)\n", This, xriid, pCData? "" : "NOT");
}
if(pCData){ if(pCData){
VariantInit( pVarVal); VariantInit( pVarVal);
VariantCopy( pVarVal, &pCData->data); VariantCopy( pVarVal, &pCData->data);
...@@ -2364,11 +2328,7 @@ static HRESULT WINAPI ITypeInfo2_fnGetImplTypeCustData( ITypeInfo * iface, ...@@ -2364,11 +2328,7 @@ static HRESULT WINAPI ITypeInfo2_fnGetImplTypeCustData( ITypeInfo * iface,
if(pRDesc) if(pRDesc)
for(pCData=pRDesc->pCustData; pCData; pCData = pCData->next) for(pCData=pRDesc->pCustData; pCData; pCData = pCData->next)
if( IsEqualIID(guid, &pCData->guid)) break; if( IsEqualIID(guid, &pCData->guid)) break;
if(TRACE_ON(typelib)){ TRACE("(%p) guid %s %s found!x)\n", This, debugstr_guid(guid), pCData? "" : "NOT");
char xriid[50];
WINE_StringFromCLSID((LPCLSID)guid,xriid);
TRACE("(%p) guid %s %s found!x)\n", This, xriid, pCData? "" : "NOT");
}
if(pCData){ if(pCData){
VariantInit( pVarVal); VariantInit( pVarVal);
VariantCopy( pVarVal, &pCData->data); VariantCopy( pVarVal, &pCData->data);
......
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
#include "windef.h" #include "windef.h"
#include "wingdi.h" #include "wingdi.h"
#include "wtypes.h" #include "wtypes.h"
#include "ldt.h"
#include "ole.h" #include "ole.h"
#include "gdi.h"
#include "debugtools.h" #include "debugtools.h"
DEFAULT_DEBUG_CHANNEL(ole); DEFAULT_DEBUG_CHANNEL(ole);
...@@ -156,30 +156,21 @@ OLESTATUS WINAPI OleQueryCreateFromClip(LPCSTR name,OLEOPT_RENDER render,OLECLIP ...@@ -156,30 +156,21 @@ OLESTATUS WINAPI OleQueryCreateFromClip(LPCSTR name,OLEOPT_RENDER render,OLECLIP
} }
/****************************************************************************** /******************************************************************************
* OleIsDcMeta16 [OLECLI.60] * OleIsDcMeta [OLECLI32.60]
*/ */
BOOL16 WINAPI OleIsDcMeta16(HDC16 hdc) BOOL WINAPI OleIsDcMeta(HDC hdc)
{ {
TRACE("(%04x)\n",hdc); TRACE("(%04x)\n",hdc);
if (GDI_GetObjPtr( hdc, METAFILE_DC_MAGIC ) != 0) { return GetObjectType( hdc ) == OBJ_METADC;
GDI_HEAP_UNLOCK( hdc );
return TRUE;
}
return FALSE;
} }
/****************************************************************************** /******************************************************************************
* OleIsDcMeta [OLECLI32.60] * OleIsDcMeta16 [OLECLI.60]
*/ */
BOOL WINAPI OleIsDcMeta(HDC hdc) BOOL16 WINAPI OleIsDcMeta16(HDC16 hdc)
{ {
TRACE("(%04x)\n",hdc); return OleIsDcMeta( hdc );
if (GDI_GetObjPtr( hdc, METAFILE_DC_MAGIC ) != 0) {
GDI_HEAP_UNLOCK( hdc );
return TRUE;
}
return FALSE;
} }
......
...@@ -117,8 +117,10 @@ BOOL HCR_GetClassName (REFIID riid, LPSTR szDest, DWORD len) ...@@ -117,8 +117,10 @@ BOOL HCR_GetClassName (REFIID riid, LPSTR szDest, DWORD len)
BOOL ret = FALSE; BOOL ret = FALSE;
DWORD buflen = len; DWORD buflen = len;
strcpy(xriid,"CLSID\\"); sprintf( xriid, "CLSID\\{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
WINE_StringFromCLSID(riid,&xriid[strlen(xriid)]); riid->Data1, riid->Data2, riid->Data3,
riid->Data4[0], riid->Data4[1], riid->Data4[2], riid->Data4[3],
riid->Data4[4], riid->Data4[5], riid->Data4[6], riid->Data4[7] );
TRACE("%s\n",xriid ); TRACE("%s\n",xriid );
...@@ -165,8 +167,10 @@ BOOL HCR_GetFolderAttributes (REFIID riid, LPDWORD szDest) ...@@ -165,8 +167,10 @@ BOOL HCR_GetFolderAttributes (REFIID riid, LPDWORD szDest)
DWORD attributes; DWORD attributes;
DWORD len = 4; DWORD len = 4;
strcpy(xriid,"CLSID\\"); sprintf( xriid, "CLSID\\{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
WINE_StringFromCLSID(riid,&xriid[strlen(xriid)]); riid->Data1, riid->Data2, riid->Data3,
riid->Data4[0], riid->Data4[1], riid->Data4[2], riid->Data4[3],
riid->Data4[4], riid->Data4[5], riid->Data4[6], riid->Data4[7] );
TRACE("%s\n",xriid ); TRACE("%s\n",xriid );
if (!szDest) return FALSE; if (!szDest) return FALSE;
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
*/ */
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h>
#include <string.h> #include <string.h>
#include "wine/obj_base.h" #include "wine/obj_base.h"
...@@ -153,8 +154,10 @@ static HRESULT WINAPI IExtractIconA_fnGetIconLocation( ...@@ -153,8 +154,10 @@ static HRESULT WINAPI IExtractIconA_fnGetIconLocation(
else if ( (riid = _ILGetGUIDPointer(pSimplePidl)) ) else if ( (riid = _ILGetGUIDPointer(pSimplePidl)) )
{ {
char xriid[50]; char xriid[50];
strcpy(xriid,"CLSID\\"); sprintf( xriid, "CLSID\\{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
WINE_StringFromCLSID((LPCLSID)riid,&xriid[strlen(xriid)]); riid->Data1, riid->Data2, riid->Data3,
riid->Data4[0], riid->Data4[1], riid->Data4[2], riid->Data4[3],
riid->Data4[4], riid->Data4[5], riid->Data4[6], riid->Data4[7] );
if (HCR_GetDefaultIcon(xriid, sTemp, MAX_PATH, &dwNr)) if (HCR_GetDefaultIcon(xriid, sTemp, MAX_PATH, &dwNr))
{ {
......
...@@ -1210,7 +1210,11 @@ LPITEMIDLIST _ILCreateValue(WIN32_FIND_DATAA * stffile) ...@@ -1210,7 +1210,11 @@ LPITEMIDLIST _ILCreateValue(WIN32_FIND_DATAA * stffile)
LPITEMIDLIST _ILCreateSpecial(LPCSTR szGUID) LPITEMIDLIST _ILCreateSpecial(LPCSTR szGUID)
{ {
IID iid; IID iid;
CLSIDFromString16(szGUID,&iid); WCHAR buffer[40];
if (!MultiByteToWideChar( CP_ACP, 0, szGUID, -1, buffer, sizeof(buffer)/sizeof(WCHAR) ))
return NULL;
CLSIDFromString( buffer, &iid );
return _ILCreate(PT_MYCOMP, &iid, sizeof(IID)); return _ILCreate(PT_MYCOMP, &iid, sizeof(IID));
} }
......
...@@ -122,8 +122,11 @@ HRESULT WINAPI SHELL32_DllGetClassObject(REFCLSID rclsid, REFIID iid,LPVOID *ppv ...@@ -122,8 +122,11 @@ HRESULT WINAPI SHELL32_DllGetClassObject(REFCLSID rclsid, REFIID iid,LPVOID *ppv
*/ */
DWORD WINAPI SHCLSIDFromStringA (LPSTR clsid, CLSID *id) DWORD WINAPI SHCLSIDFromStringA (LPSTR clsid, CLSID *id)
{ {
WCHAR buffer[40];
TRACE("(%p(%s) %p)\n", clsid, clsid, id); TRACE("(%p(%s) %p)\n", clsid, clsid, id);
return CLSIDFromString16(clsid, id); if (!MultiByteToWideChar( CP_ACP, 0, clsid, -1, buffer, sizeof(buffer)/sizeof(WCHAR) ))
return CO_E_CLASSSTRING;
return CLSIDFromString( buffer, id );
} }
DWORD WINAPI SHCLSIDFromStringW (LPWSTR clsid, CLSID *id) DWORD WINAPI SHCLSIDFromStringW (LPWSTR clsid, CLSID *id)
{ {
......
...@@ -1013,10 +1013,13 @@ DWORD WINAPI SHLWAPI_23 ( ...@@ -1013,10 +1013,13 @@ DWORD WINAPI SHLWAPI_23 (
LPSTR str, /* [out] buffer */ LPSTR str, /* [out] buffer */
INT cmax) /* [in] size of buffer */ INT cmax) /* [in] size of buffer */
{ {
char xguid[80]; char xguid[40];
TRACE("(%s %p 0x%08x)stub\n", debugstr_guid(guid), str, cmax);
if (WINE_StringFromCLSID(guid,xguid)) return 0; sprintf( xguid, "{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
guid->Data1, guid->Data2, guid->Data3,
guid->Data4[0], guid->Data4[1], guid->Data4[2], guid->Data4[3],
guid->Data4[4], guid->Data4[5], guid->Data4[6], guid->Data4[7] );
TRACE("(%s %p 0x%08x)stub\n", xguid, str, cmax);
if (strlen(xguid)>=cmax) return 0; if (strlen(xguid)>=cmax) return 0;
strcpy(str,xguid); strcpy(str,xguid);
return strlen(xguid) + 1; return strlen(xguid) + 1;
...@@ -1108,7 +1111,7 @@ LPWSTR WINAPI SHLWAPI_215 ( ...@@ -1108,7 +1111,7 @@ LPWSTR WINAPI SHLWAPI_215 (
int len) int len)
{ {
WARN("(%s %p %u)\n",lpStrSrc,lpwStrDest,len); WARN("(%s %p %u)\n",lpStrSrc,lpwStrDest,len);
return CRTDLL_wcsncpy(lpwStrDest, lpStrSrc, len); return NTDLL_wcsncpy(lpwStrDest, lpStrSrc, len);
} }
/************************************************************************* /*************************************************************************
...@@ -1120,9 +1123,11 @@ LPWSTR WINAPI SHLWAPI_215 ( ...@@ -1120,9 +1123,11 @@ LPWSTR WINAPI SHLWAPI_215 (
HANDLE WINAPI SHLWAPI_222 (LPCLSID guid) HANDLE WINAPI SHLWAPI_222 (LPCLSID guid)
{ {
char lpstrName[80]; char lpstrName[80];
strcpy( lpstrName,"shell.");
WINE_StringFromCLSID(guid, lpstrName + strlen(lpstrName));
sprintf( lpstrName, "shell.{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
guid->Data1, guid->Data2, guid->Data3,
guid->Data4[0], guid->Data4[1], guid->Data4[2], guid->Data4[3],
guid->Data4[4], guid->Data4[5], guid->Data4[6], guid->Data4[7] );
FIXME("(%s) stub\n", lpstrName); FIXME("(%s) stub\n", lpstrName);
return CreateSemaphoreA(NULL,0, 0x7fffffff, lpstrName); return CreateSemaphoreA(NULL,0, 0x7fffffff, lpstrName);
} }
......
...@@ -798,11 +798,4 @@ void WINAPI CoUninitialize(void); ...@@ -798,11 +798,4 @@ void WINAPI CoUninitialize(void);
HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID * ppv); HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID * ppv);
HRESULT WINAPI DllCanUnloadNow(void); HRESULT WINAPI DllCanUnloadNow(void);
/*****************************************************************************
* Internal WINE API
*/
#ifdef __WINE__
HRESULT WINE_StringFromCLSID(const CLSID *id, LPSTR);
#endif
#endif /* __WINE_WINE_OBJ_BASE_H */ #endif /* __WINE_WINE_OBJ_BASE_H */
...@@ -26,9 +26,9 @@ ...@@ -26,9 +26,9 @@
#include "winbase.h" #include "winbase.h"
#include "wingdi.h" #include "wingdi.h"
#include "winuser.h" #include "winuser.h"
#include "ntddk.h"
#include "wine/winbase16.h" #include "wine/winbase16.h"
#include "wine/winuser16.h" #include "wine/winuser16.h"
#include "wine/unicode.h"
#include "winnls.h" #include "winnls.h"
#include "task.h" #include "task.h"
#include "heap.h" #include "heap.h"
...@@ -283,7 +283,6 @@ DWORD WINAPI CharLowerBuffA(LPSTR x,DWORD buflen) ...@@ -283,7 +283,6 @@ DWORD WINAPI CharLowerBuffA(LPSTR x,DWORD buflen)
/*********************************************************************** /***********************************************************************
* CharLowerBuffW (USER32.27) * CharLowerBuffW (USER32.27)
* FIXME: handle current locale
*/ */
DWORD WINAPI CharLowerBuffW(LPWSTR x,DWORD buflen) DWORD WINAPI CharLowerBuffW(LPWSTR x,DWORD buflen)
{ {
...@@ -292,7 +291,7 @@ DWORD WINAPI CharLowerBuffW(LPWSTR x,DWORD buflen) ...@@ -292,7 +291,7 @@ DWORD WINAPI CharLowerBuffW(LPWSTR x,DWORD buflen)
if (!x) return 0; /* YES */ if (!x) return 0; /* YES */
while (*x && (buflen--)) while (*x && (buflen--))
{ {
*x=NTDLL_towlower(*x); *x=tolowerW(*x);
x++; x++;
done++; done++;
} }
...@@ -310,12 +309,12 @@ LPWSTR WINAPI CharLowerW(LPWSTR x) ...@@ -310,12 +309,12 @@ LPWSTR WINAPI CharLowerW(LPWSTR x)
LPWSTR s = x; LPWSTR s = x;
while (*s) while (*s)
{ {
*s=NTDLL_towlower(*s); *s = tolowerW(*s);
s++; s++;
} }
return x; return x;
} }
else return (LPWSTR)((UINT)NTDLL_towlower(LOWORD(x))); else return (LPWSTR)((UINT)tolowerW(LOWORD(x)));
} }
/*********************************************************************** /***********************************************************************
...@@ -366,7 +365,7 @@ DWORD WINAPI CharUpperBuffW(LPWSTR x,DWORD buflen) ...@@ -366,7 +365,7 @@ DWORD WINAPI CharUpperBuffW(LPWSTR x,DWORD buflen)
if (!x) return 0; /* YES */ if (!x) return 0; /* YES */
while (*x && (buflen--)) while (*x && (buflen--))
{ {
*x=NTDLL_towupper(*x); *x=toupperW(*x);
x++; x++;
done++; done++;
} }
...@@ -384,12 +383,12 @@ LPWSTR WINAPI CharUpperW(LPWSTR x) ...@@ -384,12 +383,12 @@ LPWSTR WINAPI CharUpperW(LPWSTR x)
LPWSTR s = x; LPWSTR s = x;
while (*s) while (*s)
{ {
*s=NTDLL_towupper(*s); *s = toupperW(*s);
s++; s++;
} }
return x; return x;
} }
else return (LPWSTR)((UINT)NTDLL_towupper(LOWORD(x))); else return (LPWSTR)((UINT)toupperW(LOWORD(x)));
} }
/*********************************************************************** /***********************************************************************
......
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