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
d586dc99
Commit
d586dc99
authored
Aug 14, 2000
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replaced VERSION_* calls by exported API equivalents.
parent
198746d8
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
214 additions
and
263 deletions
+214
-263
security.c
dlls/advapi32/security.c
+0
-1
imm.c
dlls/imm32/imm.c
+30
-26
msacm32_main.c
dlls/msacm/msacm32_main.c
+11
-9
oleaut.c
dlls/oleaut32/oleaut.c
+7
-8
typelib.c
dlls/oleaut32/typelib.c
+5
-6
changenotify.c
dlls/shell32/changenotify.c
+1
-2
iconcache.c
dlls/shell32/iconcache.c
+2
-3
pidl.c
dlls/shell32/pidl.c
+6
-7
shell32_main.c
dlls/shell32/shell32_main.c
+1
-2
shell32_main.h
dlls/shell32/shell32_main.h
+7
-0
shellole.c
dlls/shell32/shellole.c
+3
-4
shellord.c
dlls/shell32/shellord.c
+4
-5
shellpath.c
dlls/shell32/shellpath.c
+100
-40
shellreg.c
dlls/shell32/shellreg.c
+0
-1
shellstring.c
dlls/shell32/shellstring.c
+7
-9
shlfileop.c
dlls/shell32/shlfileop.c
+1
-2
shlmenu.c
dlls/shell32/shlmenu.c
+1
-2
winversion.h
include/winversion.h
+0
-21
version.c
misc/version.c
+12
-73
device.c
win32/device.c
+2
-27
winhelp.c
windows/winhelp.c
+14
-15
No files found.
dlls/advapi32/security.c
View file @
d586dc99
...
...
@@ -10,7 +10,6 @@
#include "ntddk.h"
#include "ntsecapi.h"
#include "debugtools.h"
#include "winversion.h"
DEFAULT_DEBUG_CHANNEL
(
advapi
);
...
...
dlls/imm32/imm.c
View file @
d586dc99
...
...
@@ -10,7 +10,6 @@
#include "winuser.h"
#include "winerror.h"
#include "debugtools.h"
#include "winversion.h"
#include "imm.h"
DEFAULT_DEBUG_CHANNEL
(
imm
);
...
...
@@ -222,19 +221,20 @@ BOOL WINAPI ImmGetCompositionFontW(HIMC hIMC, LPLOGFONTW lplf)
LONG
WINAPI
ImmGetCompositionStringA
(
HIMC
hIMC
,
DWORD
dwIndex
,
LPVOID
lpBuf
,
DWORD
dwBufLen
)
{
OSVERSIONINFOA
version
;
FIXME
(
"(0x%08x, %ld, %p, %ld): stub
\n
"
,
hIMC
,
dwIndex
,
lpBuf
,
dwBufLen
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
switch
(
VERSION_GetVersion
())
{
default:
FIXME
(
"%s not supported"
,
VERSION_GetVersionName
())
;
case
WIN95
:
return
0xffffffff
;
case
NT40
:
return
0
;
}
GetVersionExA
(
&
version
);
switch
(
version
.
dwPlatformId
)
{
case
VER_PLATFORM_WIN32_WINDOWS
:
return
-
1
;
case
VER_PLATFORM_WIN32_NT
:
return
0
;
default:
FIXME
(
"%ld not supported"
,
version
.
dwPlatformId
);
return
-
1
;
}
}
/***********************************************************************
...
...
@@ -244,19 +244,20 @@ LONG WINAPI ImmGetCompositionStringW(
HIMC
hIMC
,
DWORD
dwIndex
,
LPVOID
lpBuf
,
DWORD
dwBufLen
)
{
OSVERSIONINFOA
version
;
FIXME
(
"(0x%08x, %ld, %p, %ld): stub
\n
"
,
hIMC
,
dwIndex
,
lpBuf
,
dwBufLen
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
switch
(
VERSION_GetVersion
())
{
default:
FIXME
(
"%s not supported"
,
VERSION_GetVersionName
())
;
case
WIN95
:
return
0xffffffff
;
case
NT40
:
return
0
;
}
GetVersionExA
(
&
version
);
switch
(
version
.
dwPlatformId
)
{
case
VER_PLATFORM_WIN32_WINDOWS
:
return
-
1
;
case
VER_PLATFORM_WIN32_NT
:
return
0
;
default:
FIXME
(
"%ld not supported"
,
version
.
dwPlatformId
);
return
-
1
;
}
}
/***********************************************************************
...
...
@@ -465,17 +466,20 @@ BOOL WINAPI ImmGetStatusWindowPos(HIMC hIMC, LPPOINT lpptPos)
*/
UINT
WINAPI
ImmGetVirtualKey
(
HWND
hWnd
)
{
OSVERSIONINFOA
version
;
FIXME
(
"(0x%08x): stub
\n
"
,
hWnd
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
switch
(
VERSION_GetVersion
())
{
default:
FIXME
(
"%s not supported"
,
VERSION_GetVersionName
());
case
WIN95
:
GetVersionExA
(
&
version
);
switch
(
version
.
dwPlatformId
)
{
case
VER_PLATFORM_WIN32_WINDOWS
:
return
VK_PROCESSKEY
;
case
NT40
:
case
VER_PLATFORM_WIN32_NT
:
return
0
;
}
default:
FIXME
(
"%ld not supported"
,
version
.
dwPlatformId
);
return
VK_PROCESSKEY
;
}
}
/***********************************************************************
...
...
dlls/msacm/msacm32_main.c
View file @
d586dc99
...
...
@@ -14,9 +14,8 @@
#include "msacm.h"
#include "msacmdrv.h"
#include "wineacm.h"
#include "winversion.h"
DEFAULT_DEBUG_CHANNEL
(
msacm
)
DEFAULT_DEBUG_CHANNEL
(
msacm
)
;
/**********************************************************************/
...
...
@@ -66,14 +65,17 @@ BOOL WINAPI MSACM32_LibMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReser
*/
DWORD
WINAPI
acmGetVersion
(
void
)
{
switch
(
VERSION_GetVersion
())
{
default:
FIXME
(
"%s not supported
\n
"
,
VERSION_GetVersionName
());
case
WIN95
:
return
0x04000000
;
/* 4.0.0 */
case
NT40
:
OSVERSIONINFOA
version
;
GetVersionExA
(
&
version
);
switch
(
version
.
dwPlatformId
)
{
case
VER_PLATFORM_WIN32_NT
:
return
0x04000565
;
/* 4.0.1381 */
}
default:
FIXME
(
"%ld not supported"
,
version
.
dwPlatformId
);
case
VER_PLATFORM_WIN32_WINDOWS
:
return
0x04000000
;
/* 4.0.0 */
}
}
/***********************************************************************
...
...
dlls/oleaut32/oleaut.c
View file @
d586dc99
...
...
@@ -7,7 +7,6 @@
#include "wingdi.h"
#include "winuser.h"
#include "winerror.h"
#include "winversion.h"
#include "heap.h"
#include "ldt.h"
...
...
@@ -105,19 +104,19 @@ HRESULT WINAPI GetActiveObject(REFCLSID rcid,LPVOID preserved,LPUNKNOWN *ppunk)
UINT
WINAPI
OaBuildVersion
()
{
FIXME
(
"Please report to a.mohr@mailto.de if you get version error messages !
\n
"
);
switch
(
VERSION_GetVersion
())
switch
(
GetVersion
()
&
0x8000ffff
)
/* mask off build number */
{
case
WIN31
:
case
0x80000a03
:
/* WIN31 */
return
MAKELONG
(
4049
,
20
);
/* from Win32s 1.1e */
case
WIN95
:
case
0x80000004
:
/* WIN95 */
return
MAKELONG
(
4265
,
30
);
case
WIN98
:
case
0x80000a04
:
/* WIN98 */
return
MAKELONG
(
4275
,
40
);
/* value of W98 SE; orig. W98 AFAIK has 4265, 30 just as W95 */
case
NT351
:
case
0x00003303
:
/* NT351 */
return
MAKELONG
(
4265
,
30
);
/* value borrowed from Win95 */
case
NT40
:
case
0x00000004
:
/* NT40 */
return
MAKELONG
(
4122
,
20
);
/* ouch ! Quite old, I guess */
default:
default:
ERR
(
"Version value not known yet. Please investigate it !
\n
"
);
return
0x0
;
}
...
...
dlls/oleaut32/typelib.c
View file @
d586dc99
...
...
@@ -34,7 +34,6 @@
#include "heap.h"
#include "wine/obj_base.h"
#include "debugtools.h"
#include "winversion.h"
#include "typelib.h"
DEFAULT_DEBUG_CHANNEL
(
ole
);
...
...
@@ -294,15 +293,15 @@ HRESULT WINAPI UnRegisterTypeLib(
DWORD
WINAPI
OaBuildVersion16
(
void
)
{
FIXME
(
"Please report to a.mohr@mailto.de if you get version error messages !
\n
"
);
switch
(
VERSION_GetVersion
())
switch
(
GetVersion
()
&
0x8000ffff
)
/* mask off build number */
{
case
WIN31
:
case
0x80000a03
:
/* WIN31 */
return
MAKELONG
(
3027
,
3
);
/* WfW 3.11 */
case
WIN95
:
case
0x80000004
:
/* WIN95 */
return
MAKELONG
(
700
,
23
);
/* Win95A */
case
WIN98
:
case
0x80000a04
:
/* WIN98 */
return
MAKELONG
(
3024
,
10
);
/* W98 SE */
default
:
default
:
FIXME_
(
ole
)(
"Version value not known yet. Please investigate it !"
);
return
0
;
}
...
...
dlls/shell32/changenotify.c
View file @
d586dc99
...
...
@@ -10,7 +10,6 @@
#include "debugtools.h"
#include "pidl.h"
#include "shell32_main.h"
#include "winversion.h"
#include "wine/undocshell.h"
DEFAULT_DEBUG_CHANNEL
(
shell
);
...
...
@@ -274,7 +273,7 @@ void WINAPI SHChangeNotifyA (LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVO
*/
void
WINAPI
SHChangeNotifyAW
(
LONG
wEventId
,
UINT
uFlags
,
LPCVOID
dwItem1
,
LPCVOID
dwItem2
)
{
if
(
VERSION
_OsIsUnicode
())
if
(
SHELL
_OsIsUnicode
())
SHChangeNotifyW
(
wEventId
,
uFlags
,
dwItem1
,
dwItem2
);
else
SHChangeNotifyA
(
wEventId
,
uFlags
,
dwItem1
,
dwItem2
);
...
...
dlls/shell32/iconcache.c
View file @
d586dc99
...
...
@@ -16,7 +16,6 @@
#include "module.h"
#include "heap.h"
#include "debugtools.h"
#include "winversion.h"
#include "shellapi.h"
#include "shlguid.h"
...
...
@@ -808,7 +807,7 @@ INT WINAPI Shell_GetCachedImageIndexW(LPCWSTR szPath, INT nIndex, BOOL bSimulate
}
INT
WINAPI
Shell_GetCachedImageIndexAW
(
LPCVOID
szPath
,
INT
nIndex
,
BOOL
bSimulateDoc
)
{
if
(
VERSION
_OsIsUnicode
())
{
if
(
SHELL
_OsIsUnicode
())
return
Shell_GetCachedImageIndexW
(
szPath
,
nIndex
,
bSimulateDoc
);
return
Shell_GetCachedImageIndexA
(
szPath
,
nIndex
,
bSimulateDoc
);
}
...
...
@@ -817,7 +816,7 @@ INT WINAPI Shell_GetCachedImageIndexAW(LPCVOID szPath, INT nIndex, BOOL bSimulat
* ExtractIconEx [shell32.189]
*/
HICON
WINAPI
ExtractIconExAW
(
LPCVOID
lpszFile
,
INT
nIconIndex
,
HICON
*
phiconLarge
,
HICON
*
phiconSmall
,
UINT
nIcons
)
{
if
(
VERSION
_OsIsUnicode
())
{
if
(
SHELL
_OsIsUnicode
())
return
ExtractIconExW
(
lpszFile
,
nIconIndex
,
phiconLarge
,
phiconSmall
,
nIcons
);
return
ExtractIconExA
(
lpszFile
,
nIconIndex
,
phiconLarge
,
phiconSmall
,
nIcons
);
}
...
...
dlls/shell32/pidl.c
View file @
d586dc99
...
...
@@ -17,15 +17,14 @@
#include "shlguid.h"
#include "winerror.h"
#include "winnls.h"
#include "winversion.h"
#include "shell32_main.h"
#include "shellapi.h"
#include "pidl.h"
#include "wine/undocshell.h"
DEFAULT_DEBUG_CHANNEL
(
pidl
)
DECLARE_DEBUG_CHANNEL
(
shell
)
DEFAULT_DEBUG_CHANNEL
(
pidl
)
;
DECLARE_DEBUG_CHANNEL
(
shell
)
;
void
pdump
(
LPCITEMIDLIST
pidl
)
{
...
...
@@ -316,7 +315,7 @@ HRESULT WINAPI SHILCreateFromPathW (LPCWSTR path, LPITEMIDLIST * ppidl, DWORD *
}
HRESULT
WINAPI
SHILCreateFromPathAW
(
LPCVOID
path
,
LPITEMIDLIST
*
ppidl
,
DWORD
*
attributes
)
{
if
(
VERSION
_OsIsUnicode
())
if
(
SHELL
_OsIsUnicode
())
return
SHILCreateFromPathW
(
path
,
ppidl
,
attributes
);
return
SHILCreateFromPathA
(
path
,
ppidl
,
attributes
);
}
...
...
@@ -727,7 +726,7 @@ LPITEMIDLIST WINAPI ILCreateFromPathW (LPCWSTR path)
}
LPITEMIDLIST
WINAPI
ILCreateFromPathAW
(
LPCVOID
path
)
{
if
(
VERSION
_OsIsUnicode
())
if
(
SHELL
_OsIsUnicode
())
return
ILCreateFromPathW
(
path
);
return
ILCreateFromPathA
(
path
);
}
...
...
@@ -772,7 +771,7 @@ LPITEMIDLIST WINAPI SHSimpleIDListFromPathW (LPCWSTR lpszPath)
LPITEMIDLIST
WINAPI
SHSimpleIDListFromPathAW
(
LPCVOID
lpszPath
)
{
if
(
VERSION
_OsIsUnicode
())
if
(
SHELL
_OsIsUnicode
())
return
SHSimpleIDListFromPathW
(
lpszPath
);
return
SHSimpleIDListFromPathA
(
lpszPath
);
}
...
...
@@ -1064,7 +1063,7 @@ BOOL WINAPI SHGetPathFromIDListAW(LPCITEMIDLIST pidl,LPVOID pszPath)
{
TRACE_
(
shell
)(
"(pidl=%p,%p)
\n
"
,
pidl
,
pszPath
);
if
(
VERSION
_OsIsUnicode
())
if
(
SHELL
_OsIsUnicode
())
return
SHGetPathFromIDListW
(
pidl
,
pszPath
);
return
SHGetPathFromIDListA
(
pidl
,
pszPath
);
}
...
...
dlls/shell32/shell32_main.c
View file @
d586dc99
...
...
@@ -18,7 +18,6 @@
#include "debugtools.h"
#include "winreg.h"
#include "authors.h"
#include "winversion.h"
#include "shellapi.h"
#include "pidl.h"
...
...
@@ -296,7 +295,7 @@ DWORD WINAPI SHGetFileInfoAW(
UINT
sizeofpsfi
,
UINT
flags
)
{
if
(
VERSION
_OsIsUnicode
())
if
(
SHELL
_OsIsUnicode
())
return
SHGetFileInfoW
(
path
,
dwFileAttributes
,
psfi
,
sizeofpsfi
,
flags
);
return
SHGetFileInfoA
(
path
,
dwFileAttributes
,
psfi
,
sizeofpsfi
,
flags
);
}
...
...
dlls/shell32/shell32_main.h
View file @
d586dc99
...
...
@@ -164,4 +164,11 @@ void FreeChangeNotifications(void);
/* file operation */
BOOL
SHELL_DeleteDirectoryA
(
LPCSTR
pszDir
,
BOOL
bShowUI
);
inline
static
BOOL
SHELL_OsIsUnicode
(
void
)
{
/* if high-bit of version is 0, we are emulating NT */
return
!
(
GetVersion
()
&
0x80000000
);
}
#endif
dlls/shell32/shellole.c
View file @
d586dc99
...
...
@@ -18,14 +18,13 @@
#include "wine/obj_extracticon.h"
#include "shlguid.h"
#include "winversion.h"
#include "winreg.h"
#include "winerror.h"
#include "debugtools.h"
#include "shell32_main.h"
DEFAULT_DEBUG_CHANNEL
(
shell
)
DEFAULT_DEBUG_CHANNEL
(
shell
)
;
DWORD
WINAPI
SHCLSIDFromStringA
(
LPSTR
clsid
,
CLSID
*
id
);
extern
IShellFolder
*
IShellFolder_Constructor
(
...
...
@@ -135,7 +134,7 @@ DWORD WINAPI SHCLSIDFromStringW (LPWSTR clsid, CLSID *id)
}
DWORD
WINAPI
SHCLSIDFromStringAW
(
LPVOID
clsid
,
CLSID
*
id
)
{
if
(
VERSION
_OsIsUnicode
())
if
(
SHELL
_OsIsUnicode
())
return
SHCLSIDFromStringW
(
clsid
,
id
);
return
SHCLSIDFromStringA
(
clsid
,
id
);
}
...
...
@@ -587,7 +586,7 @@ UINT WINAPI DragQueryFileA(
}
}
i
=
lstrlenA
(
lpDrop
);
i
=
strlen
(
lpDrop
);
i
++
;
if
(
!
lpszFile
)
goto
end
;
/* needed buffer size */
i
=
(
lLength
>
i
)
?
i
:
lLength
;
...
...
dlls/shell32/shellord.c
View file @
d586dc99
...
...
@@ -11,7 +11,6 @@
#include "winreg.h"
#include "debugtools.h"
#include "winnls.h"
#include "winversion.h"
#include "heap.h"
#include "shellapi.h"
...
...
@@ -75,7 +74,7 @@ DWORD WINAPI ParseFieldW(LPCWSTR src, DWORD nField, LPWSTR dst, DWORD len)
*/
DWORD
WINAPI
ParseFieldAW
(
LPCVOID
src
,
DWORD
nField
,
LPVOID
dst
,
DWORD
len
)
{
if
(
VERSION
_OsIsUnicode
())
if
(
SHELL
_OsIsUnicode
())
return
ParseFieldW
(
src
,
nField
,
dst
,
len
);
return
ParseFieldA
(
src
,
nField
,
dst
,
len
);
}
...
...
@@ -99,7 +98,7 @@ BOOL WINAPI GetFileNameFromBrowse(
/* puts up a Open Dialog and requests input into targetbuf */
/* OFN_HIDEREADONLY|OFN_NOCHANGEDIR|OFN_FILEMUSTEXIST|OFN_unknown */
lstrcpyA
(
lpstrFile
,
"x:
\\
dummy.exe"
);
strcpy
(
lpstrFile
,
"x:
\\
dummy.exe"
);
return
1
;
}
...
...
@@ -485,7 +484,7 @@ HRESULT WINAPI SHRunControlPanel (DWORD x, DWORD z)
*
*/
BOOL
WINAPI
ShellExecuteExAW
(
LPVOID
sei
)
{
if
(
VERSION
_OsIsUnicode
())
{
if
(
SHELL
_OsIsUnicode
())
return
ShellExecuteExW
(
sei
);
return
ShellExecuteExA
(
sei
);
}
...
...
@@ -941,7 +940,7 @@ HRESULT WINAPI DoEnvironmentSubstW(LPWSTR x, LPWSTR y)
*/
HRESULT
WINAPI
DoEnvironmentSubstAW
(
LPVOID
x
,
LPVOID
y
)
{
if
(
VERSION
_OsIsUnicode
())
if
(
SHELL
_OsIsUnicode
())
return
DoEnvironmentSubstW
(
x
,
y
);
return
DoEnvironmentSubstA
(
x
,
y
);
}
...
...
dlls/shell32/shellpath.c
View file @
d586dc99
...
...
@@ -8,7 +8,6 @@
#include <ctype.h>
#include "debugtools.h"
#include "winnls.h"
#include "winversion.h"
#include "winreg.h"
#include "shlobj.h"
...
...
@@ -33,7 +32,7 @@ BOOL WINAPI PathAppendAW(
LPVOID
lpszPath1
,
LPCVOID
lpszPath2
)
{
if
(
VERSION
_OsIsUnicode
())
if
(
SHELL
_OsIsUnicode
())
return
PathAppendW
(
lpszPath1
,
lpszPath2
);
return
PathAppendA
(
lpszPath1
,
lpszPath2
);
}
...
...
@@ -46,7 +45,7 @@ LPVOID WINAPI PathCombineAW(
LPCVOID
lpszDir
,
LPCVOID
lpszFile
)
{
if
(
VERSION
_OsIsUnicode
())
if
(
SHELL
_OsIsUnicode
())
return
PathCombineW
(
szDest
,
lpszDir
,
lpszFile
);
return
PathCombineA
(
szDest
,
lpszDir
,
lpszFile
);
}
...
...
@@ -56,7 +55,7 @@ LPVOID WINAPI PathCombineAW(
*/
LPVOID
WINAPI
PathAddBackslashAW
(
LPVOID
lpszPath
)
{
if
(
VERSION
_OsIsUnicode
())
if
(
SHELL
_OsIsUnicode
())
return
PathAddBackslashW
(
lpszPath
);
return
PathAddBackslashA
(
lpszPath
);
}
...
...
@@ -66,7 +65,7 @@ LPVOID WINAPI PathAddBackslashAW(LPVOID lpszPath)
*/
LPVOID
WINAPI
PathBuildRootAW
(
LPVOID
lpszPath
,
int
drive
)
{
if
(
VERSION
_OsIsUnicode
())
if
(
SHELL
_OsIsUnicode
())
return
PathBuildRootW
(
lpszPath
,
drive
);
return
PathBuildRootA
(
lpszPath
,
drive
);
}
...
...
@@ -80,7 +79,7 @@ LPVOID WINAPI PathBuildRootAW(LPVOID lpszPath, int drive)
*/
LPVOID
WINAPI
PathFindFileNameAW
(
LPCVOID
lpszPath
)
{
if
(
VERSION
_OsIsUnicode
())
if
(
SHELL
_OsIsUnicode
())
return
PathFindFileNameW
(
lpszPath
);
return
PathFindFileNameA
(
lpszPath
);
}
...
...
@@ -90,18 +89,44 @@ LPVOID WINAPI PathFindFileNameAW(LPCVOID lpszPath)
*/
LPVOID
WINAPI
PathFindExtensionAW
(
LPCVOID
lpszPath
)
{
if
(
VERSION
_OsIsUnicode
())
if
(
SHELL
_OsIsUnicode
())
return
PathFindExtensionW
(
lpszPath
);
return
PathFindExtensionA
(
lpszPath
);
}
/*************************************************************************
* PathGetExtensionA [internal]
*
* NOTES
* exported by ordinal
* return value points to the first char after the dot
*/
static
LPSTR
PathGetExtensionA
(
LPCSTR
lpszPath
)
{
TRACE
(
"(%s)
\n
"
,
lpszPath
);
lpszPath
=
PathFindExtensionA
(
lpszPath
);
return
(
LPSTR
)(
*
lpszPath
?
(
lpszPath
+
1
)
:
lpszPath
);
}
/*************************************************************************
* PathGetExtensionW [internal]
*/
static
LPWSTR
PathGetExtensionW
(
LPCWSTR
lpszPath
)
{
TRACE
(
"(%s)
\n
"
,
debugstr_w
(
lpszPath
));
lpszPath
=
PathFindExtensionW
(
lpszPath
);
return
(
LPWSTR
)(
*
lpszPath
?
(
lpszPath
+
1
)
:
lpszPath
);
}
/*************************************************************************
* PathGetExtensionAW [SHELL32.158]
*/
LPVOID
WINAPI
PathGetExtensionAW
(
LPCVOID
lpszPath
)
{
if
(
VERSION
_OsIsUnicode
())
if
(
SHELL
_OsIsUnicode
())
return
PathGetExtensionW
(
lpszPath
);
return
PathGetExtensionA
(
lpszPath
);
}
...
...
@@ -111,7 +136,7 @@ LPVOID WINAPI PathGetExtensionAW(LPCVOID lpszPath)
*/
LPVOID
WINAPI
PathGetArgsAW
(
LPVOID
lpszPath
)
{
if
(
VERSION
_OsIsUnicode
())
if
(
SHELL
_OsIsUnicode
())
return
PathGetArgsW
(
lpszPath
);
return
PathGetArgsA
(
lpszPath
);
}
...
...
@@ -121,7 +146,7 @@ LPVOID WINAPI PathGetArgsAW(LPVOID lpszPath)
*/
int
WINAPI
PathGetDriveNumberAW
(
LPVOID
lpszPath
)
{
if
(
VERSION
_OsIsUnicode
())
if
(
SHELL
_OsIsUnicode
())
return
PathGetDriveNumberW
(
lpszPath
);
return
PathGetDriveNumberA
(
lpszPath
);
}
...
...
@@ -131,7 +156,7 @@ int WINAPI PathGetDriveNumberAW(LPVOID lpszPath)
*/
BOOL
WINAPI
PathRemoveFileSpecAW
(
LPVOID
lpszPath
)
{
if
(
VERSION
_OsIsUnicode
())
if
(
SHELL
_OsIsUnicode
())
return
PathRemoveFileSpecW
(
lpszPath
);
return
PathRemoveFileSpecA
(
lpszPath
);
}
...
...
@@ -141,7 +166,7 @@ BOOL WINAPI PathRemoveFileSpecAW(LPVOID lpszPath)
*/
void
WINAPI
PathStripPathAW
(
LPVOID
lpszPath
)
{
if
(
VERSION
_OsIsUnicode
())
if
(
SHELL
_OsIsUnicode
())
return
PathStripPathW
(
lpszPath
);
return
PathStripPathA
(
lpszPath
);
}
...
...
@@ -151,7 +176,7 @@ void WINAPI PathStripPathAW(LPVOID lpszPath)
*/
BOOL
WINAPI
PathStripToRootAW
(
LPVOID
lpszPath
)
{
if
(
VERSION
_OsIsUnicode
())
if
(
SHELL
_OsIsUnicode
())
return
PathStripToRootW
(
lpszPath
);
return
PathStripToRootA
(
lpszPath
);
}
...
...
@@ -161,7 +186,7 @@ BOOL WINAPI PathStripToRootAW(LPVOID lpszPath)
*/
void
WINAPI
PathRemoveArgsAW
(
LPVOID
lpszPath
)
{
if
(
VERSION
_OsIsUnicode
())
if
(
SHELL
_OsIsUnicode
())
PathRemoveArgsW
(
lpszPath
);
PathRemoveArgsA
(
lpszPath
);
}
...
...
@@ -171,7 +196,7 @@ void WINAPI PathRemoveArgsAW(LPVOID lpszPath)
*/
void
WINAPI
PathRemoveExtensionAW
(
LPVOID
lpszPath
)
{
if
(
VERSION
_OsIsUnicode
())
if
(
SHELL
_OsIsUnicode
())
return
PathRemoveExtensionW
(
lpszPath
);
return
PathRemoveExtensionA
(
lpszPath
);
}
...
...
@@ -204,7 +229,7 @@ LPWSTR WINAPI PathGetShortPathW(LPWSTR lpszPath)
*/
LPVOID
WINAPI
PathGetShortPathAW
(
LPVOID
lpszPath
)
{
if
(
VERSION
_OsIsUnicode
())
if
(
SHELL
_OsIsUnicode
())
return
PathGetShortPathW
(
lpszPath
);
return
PathGetShortPathA
(
lpszPath
);
}
...
...
@@ -214,7 +239,7 @@ LPVOID WINAPI PathGetShortPathAW(LPVOID lpszPath)
*/
void
WINAPI
PathRemoveBlanksAW
(
LPVOID
str
)
{
if
(
VERSION
_OsIsUnicode
())
if
(
SHELL
_OsIsUnicode
())
PathRemoveBlanksW
(
str
);
PathRemoveBlanksA
(
str
);
}
...
...
@@ -224,7 +249,7 @@ void WINAPI PathRemoveBlanksAW(LPVOID str)
*/
LPVOID
WINAPI
PathQuoteSpacesAW
(
LPVOID
lpszPath
)
{
if
(
VERSION
_OsIsUnicode
())
if
(
SHELL
_OsIsUnicode
())
return
PathQuoteSpacesW
(
lpszPath
);
return
PathQuoteSpacesA
(
lpszPath
);
}
...
...
@@ -234,7 +259,7 @@ LPVOID WINAPI PathQuoteSpacesAW (LPVOID lpszPath)
*/
VOID
WINAPI
PathUnquoteSpacesAW
(
LPVOID
str
)
{
if
(
VERSION
_OsIsUnicode
())
if
(
SHELL
_OsIsUnicode
())
PathUnquoteSpacesW
(
str
);
else
PathUnquoteSpacesA
(
str
);
...
...
@@ -245,7 +270,7 @@ VOID WINAPI PathUnquoteSpacesAW(LPVOID str)
*/
int
WINAPI
PathParseIconLocationAW
(
LPVOID
lpszPath
)
{
if
(
VERSION
_OsIsUnicode
())
if
(
SHELL
_OsIsUnicode
())
return
PathParseIconLocationW
(
lpszPath
);
return
PathParseIconLocationA
(
lpszPath
);
}
...
...
@@ -258,7 +283,7 @@ int WINAPI PathParseIconLocationAW (LPVOID lpszPath)
*/
BOOL
WINAPI
PathIsUNCAW
(
LPCVOID
lpszPath
)
{
if
(
VERSION
_OsIsUnicode
())
if
(
SHELL
_OsIsUnicode
())
return
PathIsUNCW
(
lpszPath
);
return
PathIsUNCA
(
lpszPath
);
}
...
...
@@ -268,7 +293,7 @@ BOOL WINAPI PathIsUNCAW (LPCVOID lpszPath)
*/
BOOL
WINAPI
PathIsRelativeAW
(
LPCVOID
lpszPath
)
{
if
(
VERSION
_OsIsUnicode
())
if
(
SHELL
_OsIsUnicode
())
return
PathIsRelativeW
(
lpszPath
);
return
PathIsRelativeA
(
lpszPath
);
}
...
...
@@ -278,17 +303,53 @@ BOOL WINAPI PathIsRelativeAW (LPCVOID lpszPath)
*/
BOOL
WINAPI
PathIsRootAW
(
LPCVOID
lpszPath
)
{
if
(
VERSION
_OsIsUnicode
())
if
(
SHELL
_OsIsUnicode
())
return
PathIsRootW
(
lpszPath
);
return
PathIsRootA
(
lpszPath
);
}
/*************************************************************************
* PathIsExeA [internal]
*/
static
BOOL
PathIsExeA
(
LPCSTR
lpszPath
)
{
LPCSTR
lpszExtension
=
PathGetExtensionA
(
lpszPath
);
int
i
=
0
;
static
char
*
lpszExtensions
[
6
]
=
{
"exe"
,
"com"
,
"pid"
,
"cmd"
,
"bat"
,
NULL
};
TRACE
(
"path=%s
\n
"
,
lpszPath
);
for
(
i
=
0
;
lpszExtensions
[
i
];
i
++
)
if
(
!
strcasecmp
(
lpszExtension
,
lpszExtensions
[
i
]))
return
TRUE
;
return
FALSE
;
}
/*************************************************************************
* PathIsExeW [internal]
*/
static
BOOL
PathIsExeW
(
LPCWSTR
lpszPath
)
{
LPCWSTR
lpszExtension
=
PathGetExtensionW
(
lpszPath
);
int
i
=
0
;
static
WCHAR
lpszExtensions
[
6
][
4
]
=
{{
'e'
,
'x'
,
'e'
,
'\0'
},
{
'c'
,
'o'
,
'm'
,
'\0'
},
{
'p'
,
'i'
,
'd'
,
'\0'
},
{
'c'
,
'm'
,
'd'
,
'\0'
},
{
'b'
,
'a'
,
't'
,
'\0'
},
{
'\0'
}
};
TRACE
(
"path=%s
\n
"
,
debugstr_w
(
lpszPath
));
for
(
i
=
0
;
lpszExtensions
[
i
];
i
++
)
if
(
!
strcmpiW
(
lpszExtension
,
lpszExtensions
[
i
]))
return
TRUE
;
return
FALSE
;
}
/*************************************************************************
* PathIsExeAW [SHELL32.43]
*/
BOOL
WINAPI
PathIsExeAW
(
LPCVOID
path
)
{
if
(
VERSION
_OsIsUnicode
())
if
(
SHELL
_OsIsUnicode
())
return
PathIsExeW
(
path
);
return
PathIsExeA
(
path
);
}
...
...
@@ -298,7 +359,7 @@ BOOL WINAPI PathIsExeAW (LPCVOID path)
*/
BOOL
WINAPI
PathIsDirectoryAW
(
LPCVOID
lpszPath
)
{
if
(
VERSION
_OsIsUnicode
())
if
(
SHELL
_OsIsUnicode
())
return
PathIsDirectoryW
(
lpszPath
);
return
PathIsDirectoryA
(
lpszPath
);
}
...
...
@@ -308,7 +369,7 @@ BOOL WINAPI PathIsDirectoryAW (LPCVOID lpszPath)
*/
BOOL
WINAPI
PathFileExistsAW
(
LPCVOID
lpszPath
)
{
if
(
VERSION
_OsIsUnicode
())
if
(
SHELL
_OsIsUnicode
())
return
PathFileExistsW
(
lpszPath
);
return
PathFileExistsA
(
lpszPath
);
}
...
...
@@ -318,7 +379,7 @@ BOOL WINAPI PathFileExistsAW (LPCVOID lpszPath)
*/
BOOL
WINAPI
PathMatchSpecAW
(
LPVOID
name
,
LPVOID
mask
)
{
if
(
VERSION
_OsIsUnicode
())
if
(
SHELL
_OsIsUnicode
())
return
PathMatchSpecW
(
name
,
mask
);
return
PathMatchSpecA
(
name
,
mask
);
}
...
...
@@ -328,7 +389,7 @@ BOOL WINAPI PathMatchSpecAW(LPVOID name, LPVOID mask)
*/
BOOL
WINAPI
PathIsSameRootAW
(
LPCVOID
lpszPath1
,
LPCVOID
lpszPath2
)
{
if
(
VERSION
_OsIsUnicode
())
if
(
SHELL
_OsIsUnicode
())
return
PathIsSameRootW
(
lpszPath1
,
lpszPath2
);
return
PathIsSameRootA
(
lpszPath1
,
lpszPath2
);
}
...
...
@@ -393,7 +454,7 @@ BOOL WINAPI PathMakeUniqueNameAW(
LPCVOID
lpszLongName
,
LPCVOID
lpszPathName
)
{
if
(
VERSION
_OsIsUnicode
())
if
(
SHELL
_OsIsUnicode
())
return
PathMakeUniqueNameW
(
lpszBuffer
,
dwBuffSize
,
lpszShortName
,
lpszLongName
,
lpszPathName
);
return
PathMakeUniqueNameA
(
lpszBuffer
,
dwBuffSize
,
lpszShortName
,
lpszLongName
,
lpszPathName
);
}
...
...
@@ -425,7 +486,7 @@ BOOL WINAPI PathYetAnotherMakeUniqueNameA(
*/
BOOL
WINAPI
PathFindOnPathAW
(
LPVOID
sFile
,
LPCVOID
sOtherDirs
)
{
if
(
VERSION
_OsIsUnicode
())
if
(
SHELL
_OsIsUnicode
())
return
PathFindOnPathW
(
sFile
,
sOtherDirs
);
return
PathFindOnPathA
(
sFile
,
sOtherDirs
);
}
...
...
@@ -435,9 +496,8 @@ BOOL WINAPI PathFindOnPathAW(LPVOID sFile, LPCVOID sOtherDirs)
*/
DWORD
WINAPI
PathCleanupSpecAW
(
LPVOID
x
,
LPVOID
y
)
{
if
(
VERSION_OsIsUnicode
())
return
PathCleanupSpecW
(
x
,
y
);
return
PathCleanupSpecA
(
x
,
y
);
FIXME
(
"(%p, %p) stub
\n
"
,
x
,
y
);
return
TRUE
;
}
/*************************************************************************
...
...
@@ -463,7 +523,7 @@ BOOL WINAPI PathQualifyW(LPCWSTR pszPath)
*/
BOOL
WINAPI
PathQualifyAW
(
LPCVOID
pszPath
)
{
if
(
VERSION
_OsIsUnicode
())
if
(
SHELL
_OsIsUnicode
())
return
PathQualifyW
(
pszPath
);
return
PathQualifyA
(
pszPath
);
}
...
...
@@ -502,7 +562,7 @@ BOOL WINAPI PathResolveAW(
LPCVOID
*
alpszPaths
,
DWORD
dwFlags
)
{
if
(
VERSION
_OsIsUnicode
())
if
(
SHELL
_OsIsUnicode
())
return
PathResolveW
(
lpszPath
,
(
LPCWSTR
*
)
alpszPaths
,
dwFlags
);
return
PathResolveA
(
lpszPath
,
(
LPCSTR
*
)
alpszPaths
,
dwFlags
);
}
...
...
@@ -518,7 +578,7 @@ HRESULT WINAPI PathProcessCommandA (
{
FIXME
(
"%s %p 0x%04lx 0x%04lx stub
\n
"
,
lpszPath
,
lpszBuff
,
dwBuffSize
,
dwFlags
);
lstrcpyA
(
lpszBuff
,
lpszPath
);
strcpy
(
lpszBuff
,
lpszPath
);
return
0
;
}
...
...
@@ -533,7 +593,7 @@ HRESULT WINAPI PathProcessCommandW (
{
FIXME
(
"(%s, %p, 0x%04lx, 0x%04lx) stub
\n
"
,
debugstr_w
(
lpszPath
),
lpszBuff
,
dwBuffSize
,
dwFlags
);
l
strcpyW
(
lpszBuff
,
lpszPath
);
strcpyW
(
lpszBuff
,
lpszPath
);
return
0
;
}
...
...
@@ -546,7 +606,7 @@ HRESULT WINAPI PathProcessCommandAW (
DWORD
dwBuffSize
,
DWORD
dwFlags
)
{
if
(
VERSION
_OsIsUnicode
())
if
(
SHELL
_OsIsUnicode
())
return
PathProcessCommandW
(
lpszPath
,
lpszBuff
,
dwBuffSize
,
dwFlags
);
return
PathProcessCommandA
(
lpszPath
,
lpszBuff
,
dwBuffSize
,
dwFlags
);
}
...
...
@@ -559,7 +619,7 @@ HRESULT WINAPI PathProcessCommandAW (
* PathSetDlgItemPathAW
*/
BOOL
WINAPI
PathSetDlgItemPathAW
(
HWND
hDlg
,
int
id
,
LPCVOID
pszPath
)
{
if
(
VERSION
_OsIsUnicode
())
{
if
(
SHELL
_OsIsUnicode
())
return
PathSetDlgItemPathW
(
hDlg
,
id
,
pszPath
);
return
PathSetDlgItemPathA
(
hDlg
,
id
,
pszPath
);
}
...
...
@@ -806,7 +866,7 @@ BOOL WINAPI SHGetSpecialFolderPathAW (
BOOL
bCreate
)
{
if
(
VERSION
_OsIsUnicode
())
if
(
SHELL
_OsIsUnicode
())
return
SHGetSpecialFolderPathW
(
hwndOwner
,
szPath
,
csidl
,
bCreate
);
return
SHGetSpecialFolderPathA
(
hwndOwner
,
szPath
,
csidl
,
bCreate
);
}
...
...
dlls/shell32/shellreg.c
View file @
d586dc99
...
...
@@ -7,7 +7,6 @@
#include "winreg.h"
#include "debugtools.h"
#include "winnls.h"
#include "winversion.h"
#include "heap.h"
#include "shellapi.h"
...
...
dlls/shell32/shellstring.c
View file @
d586dc99
...
...
@@ -6,10 +6,10 @@
#include "winnls.h"
#include "winerror.h"
#include "debugtools.h"
#include "winversion.h"
#include "heap.h"
#include "shellapi.h"
#include "shell32_main.h"
#include "wine/undocshell.h"
#include "wine/unicode.h"
...
...
@@ -37,7 +37,7 @@ HRESULT WINAPI StrRetToStrNW (LPVOID dest, DWORD len, LPSTRRET src, LPITEMIDLIST
HRESULT
WINAPI
StrRetToStrNAW
(
LPVOID
dest
,
DWORD
len
,
LPSTRRET
src
,
LPITEMIDLIST
pidl
)
{
if
(
VERSION
_OsIsUnicode
())
if
(
SHELL
_OsIsUnicode
())
return
StrRetToStrNW
(
dest
,
len
,
src
,
pidl
);
return
StrRetToStrNA
(
dest
,
len
,
src
,
pidl
);
}
...
...
@@ -61,15 +61,13 @@ int WINAPI StrToOleStrW (LPWSTR lpWideCharStr, LPCWSTR lpWString)
TRACE
(
"(%p, %p %s)
\n
"
,
lpWideCharStr
,
lpWString
,
debugstr_w
(
lpWString
));
if
(
lstrcpyW
(
lpWideCharStr
,
lpWString
))
{
return
lstrlenW
(
lpWideCharStr
);
}
return
0
;
strcpyW
(
lpWideCharStr
,
lpWString
);
return
strlenW
(
lpWideCharStr
);
}
BOOL
WINAPI
StrToOleStrAW
(
LPWSTR
lpWideCharStr
,
LPCVOID
lpString
)
{
if
(
VERSION
_OsIsUnicode
())
if
(
SHELL
_OsIsUnicode
())
return
StrToOleStrW
(
lpWideCharStr
,
lpString
);
return
StrToOleStrA
(
lpWideCharStr
,
lpString
);
}
...
...
@@ -96,7 +94,7 @@ BOOL WINAPI StrToOleStrNW (LPWSTR lpWide, INT nWide, LPCWSTR lpStrW, INT nStr)
BOOL
WINAPI
StrToOleStrNAW
(
LPWSTR
lpWide
,
INT
nWide
,
LPCVOID
lpStr
,
INT
nStr
)
{
if
(
VERSION
_OsIsUnicode
())
if
(
SHELL
_OsIsUnicode
())
return
StrToOleStrNW
(
lpWide
,
nWide
,
lpStr
,
nStr
);
return
StrToOleStrNA
(
lpWide
,
nWide
,
lpStr
,
nStr
);
}
...
...
@@ -122,7 +120,7 @@ BOOL WINAPI OleStrToStrNW (LPWSTR lpwStr, INT nwStr, LPCWSTR lpOle, INT nOle)
BOOL
WINAPI
OleStrToStrNAW
(
LPVOID
lpOut
,
INT
nOut
,
LPCVOID
lpIn
,
INT
nIn
)
{
if
(
VERSION
_OsIsUnicode
())
if
(
SHELL
_OsIsUnicode
())
return
OleStrToStrNW
(
lpOut
,
nOut
,
lpIn
,
nIn
);
return
OleStrToStrNA
(
lpOut
,
nOut
,
lpIn
,
nIn
);
}
dlls/shell32/shlfileop.c
View file @
d586dc99
...
...
@@ -5,7 +5,6 @@
#include "debugtools.h"
#include "shellapi.h"
#include "shell32_main.h"
#include "winversion.h"
#include "shlobj.h"
#include "shresdef.h"
...
...
@@ -140,7 +139,7 @@ DWORD WINAPI SHFileOperationW (LPSHFILEOPSTRUCTW lpFileOp)
*/
DWORD
WINAPI
SHFileOperationAW
(
LPVOID
lpFileOp
)
{
if
(
VERSION
_OsIsUnicode
())
if
(
SHELL
_OsIsUnicode
())
return
SHFileOperationW
(
lpFileOp
);
return
SHFileOperationA
(
lpFileOp
);
}
...
...
dlls/shell32/shlmenu.c
View file @
d586dc99
...
...
@@ -10,7 +10,6 @@
#include "heap.h"
#include "debugtools.h"
#include "winversion.h"
#include "shell32_main.h"
#include "shlguid.h"
...
...
@@ -365,7 +364,7 @@ BOOL WINAPI FileMenu_AppendItemAW(
BOOL
ret
;
LPSTR
lpszText
=
NULL
;
if
(
VERSION
_OsIsUnicode
()
&&
(
lpText
!=
FM_SEPARATOR
))
if
(
SHELL
_OsIsUnicode
()
&&
(
lpText
!=
FM_SEPARATOR
))
lpszText
=
HEAP_strdupWtoA
(
GetProcessHeap
(),
0
,
lpText
);
ret
=
FileMenu_AppendItemA
(
hMenu
,
(
lpszText
)
?
lpszText
:
lpText
,
uID
,
icon
,
hMenuPopup
,
nItemHeight
);
...
...
include/winversion.h
deleted
100644 → 0
View file @
198746d8
#ifndef __WINE_WINVERSION_H
#define __WINE_WINVERSION_H
#include "windef.h"
typedef
enum
{
WIN31
,
/* Windows 3.1 */
WIN95
,
/* Windows 95 */
WIN98
,
/* Windows 98 */
NT351
,
/* Windows NT 3.51 */
NT40
,
/* Windows NT 4.0 */
NB_WINDOWS_VERSIONS
}
WINDOWS_VERSION
;
extern
WINDOWS_VERSION
VERSION_GetVersion
(
void
);
extern
char
*
VERSION_GetVersionName
(
void
);
extern
BOOL
VERSION_OsIsUnicode
(
void
);
extern
DWORD
VERSION_AppWinVer
(
void
);
#endif
/* __WINE_WINVERSION_H */
misc/version.c
View file @
d586dc99
...
...
@@ -19,10 +19,19 @@
#include "options.h"
#include "debugtools.h"
#include "neexe.h"
#include "winversion.h"
#include "winerror.h"
DEFAULT_DEBUG_CHANNEL
(
ver
)
DEFAULT_DEBUG_CHANNEL
(
ver
);
typedef
enum
{
WIN31
,
/* Windows 3.1 */
WIN95
,
/* Windows 95 */
WIN98
,
/* Windows 98 */
NT351
,
/* Windows NT 3.51 */
NT40
,
/* Windows NT 4.0 */
NB_WINDOWS_VERSIONS
}
WINDOWS_VERSION
;
typedef
struct
{
...
...
@@ -31,7 +40,6 @@ typedef struct
OSVERSIONINFOA
getVersionEx
;
}
VERSION_DATA
;
/* FIXME: compare values below with original and fix */
static
VERSION_DATA
VersionData
[
NB_WINDOWS_VERSIONS
]
=
{
...
...
@@ -309,7 +317,7 @@ DWORD VERSION_GetLinkedDllVersion(PDB *pdb)
* is called by EVERY GetVersion*() API !
*
*/
WINDOWS_VERSION
VERSION_GetVersion
(
void
)
static
WINDOWS_VERSION
VERSION_GetVersion
(
void
)
{
static
WORD
winver
=
0xffff
;
...
...
@@ -325,56 +333,6 @@ WINDOWS_VERSION VERSION_GetVersion(void)
return
winver
;
}
/**********************************************************************
* VERSION_AppWinVer
* Returns the window version in case Wine emulates a later version
* of windows then the application expects.
*
* In a number of cases when windows runs an application that was
* designed for an earlier windows version, windows reverts
* to "old" behaviour of that earlier version.
*
* An example is a disabled edit control that needs to be painted.
* Old style behaviour is to send a WM_CTLCOLOREDIT message. This was
* changed in Win95, NT4.0 by a WM_CTLCOLORSTATIC message _only_ for
* applications with an expected version 0f 4.0 or higher.
*
*/
DWORD
VERSION_AppWinVer
(
void
)
{
WINDOWS_VERSION
ver
=
VERSION_GetVersion
();
DWORD
dwEmulatedVersion
=
MAKELONG
(
VersionData
[
ver
].
getVersionEx
.
dwMinorVersion
,
VersionData
[
ver
].
getVersionEx
.
dwMajorVersion
);
/* fixme: this may not be 100% correct; see discussion on the
* wine developer list in Nov 1999 */
DWORD
dwProcVersion
=
GetProcessVersion
(
0
);
return
dwProcVersion
<
dwEmulatedVersion
?
dwProcVersion
:
dwEmulatedVersion
;
}
/**********************************************************************
* VERSION_GetVersionName
*/
char
*
VERSION_GetVersionName
()
{
WINDOWS_VERSION
ver
=
VERSION_GetVersion
();
switch
(
ver
)
{
case
WIN31
:
return
"Windows 3.1"
;
case
WIN95
:
return
"Windows 95"
;
case
WIN98
:
return
"Windows 98"
;
case
NT351
:
return
"Windows NT 3.51"
;
case
NT40
:
return
"Windows NT 4.0"
;
default:
FIXME
(
"Windows version %d not named"
,
ver
);
return
"Windows <Unknown>"
;
}
}
/***********************************************************************
* GetVersion16 (KERNEL.3)
...
...
@@ -545,22 +503,3 @@ void WINAPI DiagOutput16(LPCSTR str)
/* FIXME */
DPRINTF
(
"DIAGOUTPUT:%s
\n
"
,
debugstr_a
(
str
));
}
/***********************************************************************
* VERSION_OsIsUnicode [internal]
*
* NOTES
* some functions getting sometimes LPSTR sometimes LPWSTR...
*
*/
BOOL
VERSION_OsIsUnicode
(
void
)
{
switch
(
VERSION_GetVersion
())
{
case
NT351
:
case
NT40
:
return
TRUE
;
default:
return
FALSE
;
}
}
win32/device.c
View file @
d586dc99
...
...
@@ -26,7 +26,6 @@
#include "winbase.h"
#include "winreg.h"
#include "winerror.h"
#include "winversion.h"
#include "file.h"
#include "process.h"
#include "heap.h"
...
...
@@ -989,32 +988,8 @@ static DWORD VxDCall_VWin32( DWORD service, CONTEXT86 *context )
{
case
0x0000
:
/* GetVersion */
{
DWORD
vers
=
VERSION_GetVersion
();
switch
(
vers
)
{
case
WIN31
:
return
(
0x0301
);
/* Windows 3.1 */
break
;
case
WIN95
:
return
(
0x0400
);
/* Win95 aka 4.0 */
break
;
case
WIN98
:
return
(
0x040a
);
/* Win98 aka 4.10 */
break
;
case
NT351
:
case
NT40
:
ERR
(
"VxDCall when emulating NT???
\n
"
);
break
;
default:
WARN
(
"Unknown version %lx
\n
"
,
vers
);
break
;
}
return
(
0x040a
);
/* default to win98 */
DWORD
vers
=
GetVersion
();
return
(
LOBYTE
(
vers
)
<<
8
)
|
HIBYTE
(
vers
);
}
break
;
...
...
windows/winhelp.c
View file @
d586dc99
...
...
@@ -11,12 +11,11 @@
#include "wingdi.h"
#include "wine/winuser16.h"
#include "wine/winbase16.h"
#include "winversion.h"
#include "heap.h"
#include "ldt.h"
#include "syslevel.h"
DEFAULT_DEBUG_CHANNEL
(
win
)
DEFAULT_DEBUG_CHANNEL
(
win
)
;
/**********************************************************************
...
...
@@ -28,7 +27,17 @@ BOOL16 WINAPI WinHelp16( HWND16 hWnd, LPCSTR lpHelpFile, UINT16 wCommand,
BOOL
ret
;
/* We might call WinExec() */
SYSLEVEL_ReleaseWin16Lock
();
ret
=
WinHelpA
(
hWnd
,
lpHelpFile
,
wCommand
,
(
DWORD
)
PTR_SEG_TO_LIN
(
dwData
)
);
if
(
!
(
ret
=
WinHelpA
(
hWnd
,
lpHelpFile
,
wCommand
,
(
DWORD
)
PTR_SEG_TO_LIN
(
dwData
)
)))
{
/* try to start the 16-bit winhelp */
if
(
WinExec
(
"winhelp.exe -x"
,
SW_SHOWNORMAL
)
>=
32
)
{
Yield16
();
ret
=
WinHelpA
(
hWnd
,
lpHelpFile
,
wCommand
,
(
DWORD
)
PTR_SEG_TO_LIN
(
dwData
)
);
}
}
SYSLEVEL_RestoreWin16Lock
();
return
ret
;
}
...
...
@@ -44,7 +53,6 @@ BOOL WINAPI WinHelpA( HWND hWnd, LPCSTR lpHelpFile, UINT wCommand,
HWND
hDest
;
LPWINHELP
lpwh
;
HGLOBAL16
hwh
;
HINSTANCE
winhelp
;
int
size
,
dsize
,
nlen
;
...
...
@@ -57,17 +65,8 @@ BOOL WINAPI WinHelpA( HWND hWnd, LPCSTR lpHelpFile, UINT wCommand,
hDest
=
FindWindowA
(
"MS_WINHELP"
,
NULL
);
if
(
!
hDest
)
{
if
(
wCommand
==
HELP_QUIT
)
return
TRUE
;
else
if
(
VERSION_GetVersion
()
==
WIN31
)
{
winhelp
=
WinExec
(
"winhelp.exe -x"
,
SW_SHOWNORMAL
);
Yield16
();
}
else
{
winhelp
=
WinExec
(
"winhlp32.exe -x"
,
SW_SHOWNORMAL
);
}
if
(
winhelp
<=
32
)
return
FALSE
;
if
(
wCommand
==
HELP_QUIT
)
return
TRUE
;
if
(
WinExec
(
"winhlp32.exe -x"
,
SW_SHOWNORMAL
)
<
32
)
return
FALSE
;
if
(
!
(
hDest
=
FindWindowA
(
"MS_WINHELP"
,
NULL
)
))
return
FALSE
;
}
...
...
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