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
Expand all
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
This diff is collapsed.
Click to expand it.
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