Use MAKEINTRESOURCE instead of casts where appropriate.

oldstable
Alexandre Julliard 2005-09-12 20:29:16 +00:00
parent 3f05998c6a
commit e1646dd215
6 changed files with 9 additions and 10 deletions

View File

@ -783,8 +783,7 @@ static HRESULT do_register_dll_server(LPCOLESTR wszDll, LPCOLESTR wszId, BOOL do
static HRESULT do_register_server(BOOL do_register)
{
static const WCHAR wszDll[] = {'a','t','l','.','d','l','l',0};
UINT nID = 101;
return do_register_dll_server(wszDll, (LPCOLESTR) nID, do_register);
return do_register_dll_server(wszDll, MAKEINTRESOURCEW(101), do_register);
}
/***********************************************************************

View File

@ -2683,7 +2683,7 @@ static BOOL NLS_RegGetDword(HANDLE hKey, LPCWSTR szValueName, DWORD *lpVal)
static BOOL NLS_GetLanguageGroupName(LGRPID lgrpid, LPWSTR szName, ULONG nameSize)
{
LANGID langId;
LPCWSTR szResourceName = (LPCWSTR)(((lgrpid + 0x2000) >> 4) + 1);
LPCWSTR szResourceName = MAKEINTRESOURCEW(((lgrpid + 0x2000) >> 4) + 1);
HRSRC hResource;
BOOL bRet = FALSE;

View File

@ -150,7 +150,7 @@ static WORD MapHRsrc16ToType( NE_MODULE *pModule, HRSRC16 hRsrc16 )
*/
static inline LPCSTR get_res_name( LPCSTR name )
{
if (HIWORD(name) && name[0] == '#') name = (LPCSTR)atoi( name + 1 );
if (HIWORD(name) && name[0] == '#') name = MAKEINTRESOURCEA( atoi( name + 1 ) );
return name;
}

View File

@ -5014,7 +5014,7 @@ static BOOL VARIANT_GetLocalisedText(LANGID langId, DWORD dwId, WCHAR *lpszDest)
HRSRC hrsrc;
hrsrc = FindResourceExW( OLEAUT32_hModule, (LPWSTR)RT_STRING,
(LPCWSTR)((dwId >> 4) + 1), langId );
MAKEINTRESOURCEW((dwId >> 4) + 1), langId );
if (hrsrc)
{
HGLOBAL hmem = LoadResource( OLEAUT32_hModule, hrsrc );

View File

@ -212,7 +212,7 @@ static const WORD *DIALOG_GetControl32( const WORD *p, DLG_CONTROL_INFO *info,
if (GET_WORD(p) == 0xffff) /* Is it an integer id? */
{
info->windowName = (LPCWSTR)(UINT)GET_WORD(p + 1);
info->windowName = MAKEINTRESOURCEW(GET_WORD(p + 1));
p += 2;
}
else
@ -385,7 +385,7 @@ static LPCSTR DIALOG_ParseTemplate32( LPCSTR template, DLG_TEMPLATE * result )
p++;
break;
case 0xffff:
result->menuName = (LPCWSTR)(UINT)GET_WORD( p + 1 );
result->menuName = MAKEINTRESOURCEW(GET_WORD( p + 1 ));
p += 2;
TRACE(" MENU %04x\n", LOWORD(result->menuName) );
break;
@ -405,7 +405,7 @@ static LPCSTR DIALOG_ParseTemplate32( LPCSTR template, DLG_TEMPLATE * result )
p++;
break;
case 0xffff:
result->className = (LPCWSTR)(UINT)GET_WORD( p + 1 );
result->className = MAKEINTRESOURCEW(GET_WORD( p + 1 ));
p += 2;
TRACE(" CLASS %04x\n", LOWORD(result->className) );
break;

View File

@ -108,7 +108,7 @@ static LPCSTR DIALOG_GetControl16( LPCSTR p, DLG_CONTROL_INFO *info )
if (int_id)
{
/* Integer id, not documented (?). Only works for SS_ICON controls */
info->windowName = (LPCSTR)(UINT)GET_WORD(p+1);
info->windowName = MAKEINTRESOURCEA(GET_WORD(p+1));
p += 3;
}
else
@ -231,7 +231,7 @@ static LPCSTR DIALOG_ParseTemplate16( LPCSTR p, DLG_TEMPLATE * result )
p++;
break;
case 0xff:
result->menuName = (LPCSTR)(UINT)GET_WORD( p + 1 );
result->menuName = MAKEINTRESOURCEA(GET_WORD( p + 1 ));
p += 3;
TRACE(" MENU %04x\n", LOWORD(result->menuName) );
break;