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
3467dab3
Commit
3467dab3
authored
Sep 19, 1999
by
Ulrich Weigand
Committed by
Alexandre Julliard
Sep 19, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move VerLanguageName[AW] back to base (exported from KERNEL32 ...).
parent
bf35d809
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
76 additions
and
84 deletions
+76
-84
info.c
dlls/version/info.c
+0
-75
version.spec
dlls/version/version.spec
+4
-2
winbase.h
include/winbase.h
+0
-3
winver.h
include/winver.h
+3
-0
ole2nls.c
ole/ole2nls.c
+69
-4
No files found.
dlls/version/info.c
View file @
3467dab3
...
...
@@ -504,78 +504,3 @@ DWORD WINAPI VerQueryValueW( LPVOID pBlock, LPCWSTR lpSubBlock,
return
TRUE
;
}
extern
LPCSTR
WINE_GetLanguageName
(
UINT
langid
);
/***********************************************************************
* VerLanguageName32A [VERSION.9]
*/
DWORD
WINAPI
VerLanguageNameA
(
UINT
wLang
,
LPSTR
szLang
,
UINT
nSize
)
{
char
buffer
[
80
];
LPCSTR
name
;
DWORD
result
;
TRACE
(
"(%d,%p,%d)
\n
"
,
wLang
,
szLang
,
nSize
);
/*
* First, check \System\CurrentControlSet\control\Nls\Locale\<langid>
* from the registry.
*/
sprintf
(
buffer
,
"
\\
System
\\
CurrentControlSet
\\
control
\\
Nls
\\
Locale
\\
%08x"
,
wLang
);
result
=
RegQueryValueA
(
HKEY_LOCAL_MACHINE
,
buffer
,
szLang
,
(
LPDWORD
)
&
nSize
);
if
(
result
==
ERROR_SUCCESS
||
result
==
ERROR_MORE_DATA
)
return
nSize
;
/*
* If that fails, use the internal table
* (actually, Windows stores the names in a string table resource ...)
*/
name
=
WINE_GetLanguageName
(
wLang
);
lstrcpynA
(
szLang
,
name
,
nSize
);
return
lstrlenA
(
name
);
}
/***********************************************************************
* VerLanguageName32W [VERSION.10]
*/
DWORD
WINAPI
VerLanguageNameW
(
UINT
wLang
,
LPWSTR
szLang
,
UINT
nSize
)
{
char
buffer
[
80
];
LPWSTR
keyname
;
LPCSTR
name
;
DWORD
result
;
TRACE
(
"(%d,%p,%d)
\n
"
,
wLang
,
szLang
,
nSize
);
/*
* First, check \System\CurrentControlSet\control\Nls\Locale\<langid>
* from the registry.
*/
sprintf
(
buffer
,
"
\\
System
\\
CurrentControlSet
\\
control
\\
Nls
\\
Locale
\\
%08x"
,
wLang
);
keyname
=
HEAP_strdupAtoW
(
GetProcessHeap
(),
0
,
buffer
);
result
=
RegQueryValueW
(
HKEY_LOCAL_MACHINE
,
keyname
,
szLang
,
(
LPDWORD
)
&
nSize
);
HeapFree
(
GetProcessHeap
(),
0
,
keyname
);
if
(
result
==
ERROR_SUCCESS
||
result
==
ERROR_MORE_DATA
)
return
nSize
;
/*
* If that fails, use the internal table
* (actually, Windows stores the names in a string table resource ...)
*/
name
=
WINE_GetLanguageName
(
wLang
);
lstrcpynAtoW
(
szLang
,
name
,
nSize
);
return
lstrlenA
(
name
);
}
dlls/version/version.spec
View file @
3467dab3
name version
type win32
import kernel32.dll
0 stdcall GetFileVersionInfoA(str long long ptr) GetFileVersionInfoA
1 stdcall GetFileVersionInfoSizeA(str ptr) GetFileVersionInfoSizeA
2 stdcall GetFileVersionInfoSizeW(wstr ptr) GetFileVersionInfoSizeW
...
...
@@ -10,8 +12,8 @@ type win32
6 stdcall VerFindFileW(long wstr wstr wstr ptr ptr ptr ptr) VerFindFileW
7 stdcall VerInstallFileA(long str str str str str ptr ptr) VerInstallFileA
8 stdcall VerInstallFileW(long wstr wstr wstr wstr wstr ptr ptr) VerInstallFileW
9
stdcall VerLanguageNameA(long ptr long)
VerLanguageNameA
10
stdcall VerLanguageNameW(long ptr long)
VerLanguageNameW
9
forward VerLanguageNameA KERNEL32.
VerLanguageNameA
10
forward VerLanguageNameW KERNEL32.
VerLanguageNameW
11 stdcall VerQueryValueA(ptr str ptr ptr) VerQueryValueA
12 stdcall VerQueryValueW(ptr wstr ptr ptr) VerQueryValueW
#13 stub VerThkSL_ThunkData32
include/winbase.h
View file @
3467dab3
...
...
@@ -1716,9 +1716,6 @@ BOOL WINAPI SetVolumeLabelW(LPCWSTR,LPCWSTR);
#define SetVolumeLabel WINELIB_NAME_AW(SetVolumeLabel)
DWORD
WINAPI
SizeofResource
(
HMODULE
,
HRSRC
);
#define UnlockSegment(handle) GlobalUnfix((HANDLE)(handle))
DWORD
WINAPI
VerLanguageNameA
(
UINT
,
LPSTR
,
UINT
);
DWORD
WINAPI
VerLanguageNameW
(
UINT
,
LPWSTR
,
UINT
);
#define VerLanguageName WINELIB_NAME_AW(VerLanguageName)
BOOL
WINAPI
WritePrivateProfileSectionA
(
LPCSTR
,
LPCSTR
,
LPCSTR
);
BOOL
WINAPI
WritePrivateProfileSectionW
(
LPCWSTR
,
LPCWSTR
,
LPCWSTR
);
#define WritePrivateProfileSection WINELIB_NAME_AW(WritePrivateProfileSection)
...
...
include/winver.h
View file @
3467dab3
...
...
@@ -152,6 +152,9 @@ DWORD WINAPI VerInstallFileA(UINT,LPCSTR,LPCSTR,LPCSTR,LPCSTR,LPCSTR,LPSTR
DWORD
WINAPI
VerInstallFileW
(
UINT
,
LPCWSTR
,
LPCWSTR
,
LPCWSTR
,
LPCWSTR
,
LPCWSTR
,
LPWSTR
,
UINT
*
);
#define VerInstallFile WINELIB_NAME_AW(VerInstallFile)
DWORD
WINAPI
VerLanguageName16
(
UINT16
,
LPSTR
,
UINT16
);
DWORD
WINAPI
VerLanguageNameA
(
UINT
,
LPSTR
,
UINT
);
DWORD
WINAPI
VerLanguageNameW
(
UINT
,
LPWSTR
,
UINT
);
#define VerLanguageName WINELIB_NAME_AW(VerLanguageName)
DWORD
WINAPI
VerQueryValue16
(
SEGPTR
,
LPCSTR
,
SEGPTR
*
,
UINT16
*
);
DWORD
WINAPI
VerQueryValueA
(
LPVOID
,
LPCSTR
,
LPVOID
*
,
UINT
*
);
DWORD
WINAPI
VerQueryValueW
(
LPVOID
,
LPCWSTR
,
LPVOID
*
,
UINT
*
);
...
...
ole/ole2nls.c
View file @
3467dab3
...
...
@@ -11,6 +11,7 @@
#include "winuser.h"
#include "heap.h"
#include "options.h"
#include "winver.h"
#include "winnls.h"
#include "winreg.h"
#include "winerror.h"
...
...
@@ -1535,11 +1536,8 @@ BOOL WINAPI GetStringTypeExW(LCID locale,DWORD dwInfoType,LPCWSTR src,
/*****************************************************************
* WINE_GetLanguageName [internal]
*
* FIXME: Windows keeps language names in a string table
* resource in VER.DLL ...
*/
LPCSTR
WINE_GetLanguageName
(
UINT
langid
)
static
LPCSTR
WINE_GetLanguageName
(
UINT
langid
)
{
int
i
;
for
(
i
=
0
;
languages
[
i
].
langid
!=
0
;
i
++
)
...
...
@@ -1548,6 +1546,73 @@ LPCSTR WINE_GetLanguageName( UINT langid )
return
languages
[
i
].
langname
;
}
/***********************************************************************
* VerLanguageNameA [KERNEL32.709][VERSION.9]
*/
DWORD
WINAPI
VerLanguageNameA
(
UINT
wLang
,
LPSTR
szLang
,
UINT
nSize
)
{
char
buffer
[
80
];
LPCSTR
name
;
DWORD
result
;
/*
* First, check \System\CurrentControlSet\control\Nls\Locale\<langid>
* from the registry.
*/
sprintf
(
buffer
,
"
\\
System
\\
CurrentControlSet
\\
control
\\
Nls
\\
Locale
\\
%08x"
,
wLang
);
result
=
RegQueryValueA
(
HKEY_LOCAL_MACHINE
,
buffer
,
szLang
,
(
LPDWORD
)
&
nSize
);
if
(
result
==
ERROR_SUCCESS
||
result
==
ERROR_MORE_DATA
)
return
nSize
;
/*
* If that fails, use the internal table
*/
name
=
WINE_GetLanguageName
(
wLang
);
lstrcpynA
(
szLang
,
name
,
nSize
);
return
lstrlenA
(
name
);
}
/***********************************************************************
* VerLanguageNameW [KERNEL32.710][VERSION.10]
*/
DWORD
WINAPI
VerLanguageNameW
(
UINT
wLang
,
LPWSTR
szLang
,
UINT
nSize
)
{
char
buffer
[
80
];
LPWSTR
keyname
;
LPCSTR
name
;
DWORD
result
;
/*
* First, check \System\CurrentControlSet\control\Nls\Locale\<langid>
* from the registry.
*/
sprintf
(
buffer
,
"
\\
System
\\
CurrentControlSet
\\
control
\\
Nls
\\
Locale
\\
%08x"
,
wLang
);
keyname
=
HEAP_strdupAtoW
(
GetProcessHeap
(),
0
,
buffer
);
result
=
RegQueryValueW
(
HKEY_LOCAL_MACHINE
,
keyname
,
szLang
,
(
LPDWORD
)
&
nSize
);
HeapFree
(
GetProcessHeap
(),
0
,
keyname
);
if
(
result
==
ERROR_SUCCESS
||
result
==
ERROR_MORE_DATA
)
return
nSize
;
/*
* If that fails, use the internal table
*/
name
=
WINE_GetLanguageName
(
wLang
);
lstrcpynAtoW
(
szLang
,
name
,
nSize
);
return
lstrlenA
(
name
);
}
static
const
unsigned
char
LCM_Unicode_LUT
[]
=
{
6
,
3
,
/* - 1 */
...
...
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