Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
f1fd89db
Commit
f1fd89db
authored
Jul 29, 2000
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Jul 29, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FindResourceExA/W should search for the specified language resource only.
FindResourceA/W should search for any language resource.
parent
77e3cd8c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
23 deletions
+20
-23
pe_image.h
include/pe_image.h
+1
-1
pe_resource.c
loader/pe_resource.c
+3
-9
resource.c
loader/resource.c
+12
-11
main.c
misc/main.c
+1
-1
ole2nls.c
ole/ole2nls.c
+3
-1
No files found.
include/pe_image.h
View file @
f1fd89db
...
...
@@ -33,7 +33,7 @@ extern BOOL PE_EnumResourceNamesA(HMODULE,LPCSTR,ENUMRESNAMEPROCA,LONG);
extern
BOOL
PE_EnumResourceNamesW
(
HMODULE
,
LPCWSTR
,
ENUMRESNAMEPROCW
,
LONG
);
extern
BOOL
PE_EnumResourceLanguagesA
(
HMODULE
,
LPCSTR
,
LPCSTR
,
ENUMRESLANGPROCA
,
LONG
);
extern
BOOL
PE_EnumResourceLanguagesW
(
HMODULE
,
LPCWSTR
,
LPCWSTR
,
ENUMRESLANGPROCW
,
LONG
);
extern
HRSRC
PE_FindResourceExW
(
struct
_wine_modref
*
,
LPCWSTR
,
LPCWSTR
,
WORD
);
extern
HRSRC
PE_FindResourceExW
(
struct
_wine_modref
*
,
LPCWSTR
,
LPCWSTR
,
WORD
,
BOOL
);
extern
DWORD
PE_SizeofResource
(
HMODULE
,
HRSRC
);
extern
struct
_wine_modref
*
PE_LoadLibraryExA
(
LPCSTR
,
DWORD
);
extern
void
PE_UnloadLibrary
(
struct
_wine_modref
*
);
...
...
loader/pe_resource.c
View file @
f1fd89db
...
...
@@ -116,10 +116,10 @@ PIMAGE_RESOURCE_DIRECTORY GetResDirEntryA( PIMAGE_RESOURCE_DIRECTORY resdirptr,
}
/**********************************************************************
* PE_FindResourceEx
32
W
* PE_FindResourceExW
*/
HANDLE
PE_FindResourceExW
(
WINE_MODREF
*
wm
,
LPCWSTR
name
,
LPCWSTR
type
,
WORD
lang
WINE_MODREF
*
wm
,
LPCWSTR
name
,
LPCWSTR
type
,
WORD
lang
,
BOOL
allowdefault
)
{
PIMAGE_RESOURCE_DIRECTORY
resdirptr
;
DWORD
root
;
...
...
@@ -137,14 +137,8 @@ HANDLE PE_FindResourceExW(
return
0
;
result
=
(
HANDLE
)
GetResDirEntryW
(
resdirptr
,
(
LPCWSTR
)(
UINT
)
lang
,
root
,
FALSE
);
/* Try with only the primary language set */
if
(
!
result
)
{
lang
=
MAKELANGID
(
PRIMARYLANGID
(
lang
),
SUBLANG_DEFAULT
);
result
=
(
HANDLE
)
GetResDirEntryW
(
resdirptr
,
(
LPCWSTR
)(
UINT
)
lang
,
root
,
FALSE
);
}
/* Try LANG_NEUTRAL, too */
if
(
!
result
)
if
(
!
result
&&
allowdefault
)
return
(
HANDLE
)
GetResDirEntryW
(
resdirptr
,
(
LPCWSTR
)
0
,
root
,
TRUE
);
return
result
;
}
...
...
loader/resource.c
View file @
f1fd89db
...
...
@@ -133,7 +133,7 @@ static WINE_EXCEPTION_FILTER(page_fault)
static
HRSRC
RES_FindResource2
(
HMODULE
hModule
,
LPCSTR
type
,
LPCSTR
name
,
WORD
lang
,
BOOL
bUnicode
,
BOOL
bRet16
)
BOOL
bUnicode
,
BOOL
bRet16
,
BOOL
allowdefault
)
{
HRSRC
hRsrc
=
0
;
HMODULE16
hMod16
=
MapHModuleLS
(
hModule
);
...
...
@@ -141,14 +141,15 @@ static HRSRC RES_FindResource2( HMODULE hModule, LPCSTR type,
WINE_MODREF
*
wm
=
pModule
&&
pModule
->
module32
?
MODULE32_LookupHMODULE
(
pModule
->
module32
)
:
NULL
;
TRACE
(
"(%08x %s, %08x%s, %08x%s, %04x, %s, %s)
\n
"
,
TRACE
(
"(%08x %s, %08x%s, %08x%s, %04x, %s, %s
, %s
)
\n
"
,
hModule
,
pModule
?
(
char
*
)
NE_MODULE_NAME
(
pModule
)
:
"NULL dereference"
,
(
UINT
)
type
,
HIWORD
(
type
)
?
(
bUnicode
?
debugstr_w
((
LPWSTR
)
type
)
:
debugstr_a
(
type
))
:
""
,
(
UINT
)
name
,
HIWORD
(
name
)
?
(
bUnicode
?
debugstr_w
((
LPWSTR
)
name
)
:
debugstr_a
(
name
))
:
""
,
lang
,
bUnicode
?
"W"
:
"A"
,
bRet16
?
"NE"
:
"PE"
);
bRet16
?
"NE"
:
"PE"
,
allowdefault
?
"allow default"
:
"NOT allowdefault"
);
if
(
pModule
)
{
...
...
@@ -166,7 +167,7 @@ static HRSRC RES_FindResource2( HMODULE hModule, LPCSTR type,
else
nameStr
=
(
LPWSTR
)
name
;
hRsrc
=
PE_FindResourceExW
(
wm
,
nameStr
,
typeStr
,
lang
);
hRsrc
=
PE_FindResourceExW
(
wm
,
nameStr
,
typeStr
,
lang
,
allowdefault
);
if
(
HIWORD
(
type
)
&&
!
bUnicode
)
HeapFree
(
GetProcessHeap
(),
0
,
typeStr
);
...
...
@@ -214,12 +215,12 @@ static HRSRC RES_FindResource2( HMODULE hModule, LPCSTR type,
static
HRSRC
RES_FindResource
(
HMODULE
hModule
,
LPCSTR
type
,
LPCSTR
name
,
WORD
lang
,
BOOL
bUnicode
,
BOOL
bRet16
)
BOOL
bUnicode
,
BOOL
bRet16
,
BOOL
allowdefault
)
{
HRSRC
hRsrc
;
__TRY
{
hRsrc
=
RES_FindResource2
(
hModule
,
type
,
name
,
lang
,
bUnicode
,
bRet16
);
hRsrc
=
RES_FindResource2
(
hModule
,
type
,
name
,
lang
,
bUnicode
,
bRet16
,
allowdefault
);
}
__EXCEPT
(
page_fault
)
{
...
...
@@ -447,7 +448,7 @@ HRSRC16 WINAPI FindResource16( HMODULE16 hModule, SEGPTR name, SEGPTR type )
LPCSTR
typeStr
=
HIWORD
(
type
)
?
PTR_SEG_TO_LIN
(
type
)
:
(
LPCSTR
)
type
;
return
RES_FindResource
(
hModule
,
typeStr
,
nameStr
,
GetSystemDefaultLangID
(),
FALSE
,
TRUE
);
GetSystemDefaultLangID
(),
FALSE
,
TRUE
,
TRUE
);
}
/**********************************************************************
...
...
@@ -456,7 +457,7 @@ HRSRC16 WINAPI FindResource16( HMODULE16 hModule, SEGPTR name, SEGPTR type )
HANDLE
WINAPI
FindResourceA
(
HMODULE
hModule
,
LPCSTR
name
,
LPCSTR
type
)
{
return
RES_FindResource
(
hModule
,
type
,
name
,
GetSystemDefaultLangID
(),
FALSE
,
FALSE
);
GetSystemDefaultLangID
(),
FALSE
,
FALSE
,
TRUE
);
}
/**********************************************************************
...
...
@@ -466,7 +467,7 @@ HANDLE WINAPI FindResourceExA( HMODULE hModule,
LPCSTR
type
,
LPCSTR
name
,
WORD
lang
)
{
return
RES_FindResource
(
hModule
,
type
,
name
,
lang
,
FALSE
,
FALSE
);
lang
,
FALSE
,
FALSE
,
FALSE
);
}
/**********************************************************************
...
...
@@ -476,7 +477,7 @@ HRSRC WINAPI FindResourceExW( HMODULE hModule,
LPCWSTR
type
,
LPCWSTR
name
,
WORD
lang
)
{
return
RES_FindResource
(
hModule
,
(
LPCSTR
)
type
,
(
LPCSTR
)
name
,
lang
,
TRUE
,
FALSE
);
lang
,
TRUE
,
FALSE
,
FALSE
);
}
/**********************************************************************
...
...
@@ -485,7 +486,7 @@ HRSRC WINAPI FindResourceExW( HMODULE hModule,
HRSRC
WINAPI
FindResourceW
(
HINSTANCE
hModule
,
LPCWSTR
name
,
LPCWSTR
type
)
{
return
RES_FindResource
(
hModule
,
(
LPCSTR
)
type
,
(
LPCSTR
)
name
,
GetSystemDefaultLangID
(),
TRUE
,
FALSE
);
GetSystemDefaultLangID
(),
TRUE
,
FALSE
,
TRUE
);
}
/**********************************************************************
...
...
misc/main.c
View file @
f1fd89db
...
...
@@ -240,7 +240,7 @@ int MAIN_GetLanguageID(LPCSTR Lang,LPCSTR Country,LPCSTR Charset,LPCSTR Dialect)
#define LANG_ENTRY_BEGIN(x,y) if(!strcmp(lang, x )) { \
if (!country[0]) { \
ret=
LANG_##y
; \
ret=
MAKELANGID(LANG_##y, SUBLANG_DEFAULT)
; \
goto end_MAIN_GetLanguageID; \
}
#define LANG_SUB_ENTRY(x,y,z) if (!strcmp(country, x )) { \
...
...
ole/ole2nls.c
View file @
f1fd89db
...
...
@@ -360,7 +360,9 @@ INT WINAPI GetLocaleInfoA(LCID lcid,LCTYPE LCType,LPSTR buf,INT len)
if
(
!
retString
)
FIXME
(
"Unkown LC type %lX
\n
"
,
LCType
);
else
ERR
(
"'%s' not supported for your language (%04X)
\n
"
,
FIXME
(
"'%s' is not defined for your language (%04X).
\n
"
"Please define it in dlls/kernel/nls/YourLanguage.nls
\n
"
"and submit patch for inclusion into the next Wine release.
\n
"
,
retString
,
LOWORD
(
lcid
));
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment