Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
a8e2b240
Commit
a8e2b240
authored
Mar 18, 2012
by
André Hentschel
Committed by
Alexandre Julliard
Mar 26, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winefile: Fully convert to unicode.
parent
b97b7082
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
28 deletions
+9
-28
Makefile.in
programs/winefile/Makefile.in
+1
-1
winefile.c
programs/winefile/winefile.c
+8
-23
winefile.h
programs/winefile/winefile.h
+0
-4
No files found.
programs/winefile/Makefile.in
View file @
a8e2b240
EXTRADEFS
=
-D__WINE__
MODULE
=
winefile.exe
APPMODE
=
-mwindows
APPMODE
=
-mwindows
-municode
IMPORTS
=
uuid shell32 comdlg32 comctl32 ole32 mpr version user32 gdi32 advapi32
C_SRCS
=
\
...
...
programs/winefile/winefile.c
View file @
a8e2b240
...
...
@@ -1761,6 +1761,7 @@ static void CheckForFileInfo(struct PropertiesDialog* dlg, HWND hwnd, LPCWSTR st
static
WCHAR
sTranslation
[]
=
{
'\\'
,
'V'
,
'a'
,
'r'
,
'F'
,
'i'
,
'l'
,
'e'
,
'I'
,
'n'
,
'f'
,
'o'
,
'\\'
,
'T'
,
'r'
,
'a'
,
'n'
,
's'
,
'l'
,
'a'
,
't'
,
'i'
,
'o'
,
'n'
,
'\0'
};
static
WCHAR
sStringFileInfo
[]
=
{
'\\'
,
'S'
,
't'
,
'r'
,
'i'
,
'n'
,
'g'
,
'F'
,
'i'
,
'l'
,
'e'
,
'I'
,
'n'
,
'f'
,
'o'
,
'\\'
,
'%'
,
'0'
,
'4'
,
'x'
,
'%'
,
'0'
,
'4'
,
'x'
,
'\\'
,
'%'
,
's'
,
'\0'
};
static
WCHAR
sFmt
[]
=
{
'%'
,
'd'
,
'.'
,
'%'
,
'd'
,
'.'
,
'%'
,
'd'
,
'.'
,
'%'
,
'd'
,
'\0'
};
DWORD
dwVersionDataLen
=
GetFileVersionInfoSizeW
(
strFilename
,
NULL
);
if
(
dwVersionDataLen
)
{
...
...
@@ -1773,13 +1774,13 @@ static void CheckForFileInfo(struct PropertiesDialog* dlg, HWND hwnd, LPCWSTR st
if
(
VerQueryValueW
(
dlg
->
pVersionData
,
sBackSlash
,
&
pVal
,
&
nValLen
))
{
if
(
nValLen
==
sizeof
(
VS_FIXEDFILEINFO
))
{
VS_FIXEDFILEINFO
*
pFixedFileInfo
=
(
VS_FIXEDFILEINFO
*
)
pVal
;
char
buffer
[
BUFFER_LEN
];
WCHAR
buffer
[
BUFFER_LEN
];
sprintf
(
buffer
,
"%d.%d.%d.%d"
,
HIWORD
(
pFixedFileInfo
->
dwFileVersionMS
),
LOWORD
(
pFixedFileInfo
->
dwFileVersionMS
),
HIWORD
(
pFixedFileInfo
->
dwFileVersionLS
),
LOWORD
(
pFixedFileInfo
->
dwFileVersionLS
));
sprintfW
(
buffer
,
sFmt
,
HIWORD
(
pFixedFileInfo
->
dwFileVersionMS
),
LOWORD
(
pFixedFileInfo
->
dwFileVersionMS
),
HIWORD
(
pFixedFileInfo
->
dwFileVersionLS
),
LOWORD
(
pFixedFileInfo
->
dwFileVersionLS
));
SetDlgItemTextA
(
hwnd
,
IDC_STATIC_PROP_VERSION
,
buffer
);
SetDlgItemTextW
(
hwnd
,
IDC_STATIC_PROP_VERSION
,
buffer
);
}
}
...
...
@@ -4377,13 +4378,13 @@ static void ExitInstance(void)
ImageList_Destroy
(
Globals
.
himl
);
}
static
int
winefile_main
(
HINSTANCE
hinstance
,
int
cmdshow
,
LPCWSTR
path
)
int
APIENTRY
wWinMain
(
HINSTANCE
hinstance
,
HINSTANCE
previnstance
,
LPWSTR
cmdline
,
int
cmdshow
)
{
MSG
msg
;
InitInstance
(
hinstance
);
if
(
!
show_frame
(
0
,
cmdshow
,
path
)
)
if
(
!
show_frame
(
0
,
cmdshow
,
cmdline
)
)
{
ExitInstance
();
return
1
;
...
...
@@ -4404,19 +4405,3 @@ static int winefile_main(HINSTANCE hinstance, int cmdshow, LPCWSTR path)
return
msg
.
wParam
;
}
#if defined(_MSC_VER)
int
APIENTRY
wWinMain
(
HINSTANCE
hinstance
,
HINSTANCE
previnstance
,
LPWSTR
cmdline
,
int
cmdshow
)
#else
int
APIENTRY
WinMain
(
HINSTANCE
hinstance
,
HINSTANCE
previnstance
,
LPSTR
cmdline
,
int
cmdshow
)
#endif
{
{
/* convert ANSI cmdline into WCS path string */
WCHAR
buffer
[
MAX_PATH
];
MultiByteToWideChar
(
CP_ACP
,
0
,
cmdline
,
-
1
,
buffer
,
MAX_PATH
);
winefile_main
(
hinstance
,
cmdshow
,
buffer
);
}
return
0
;
}
programs/winefile/winefile.h
View file @
a8e2b240
...
...
@@ -30,16 +30,12 @@
#define NONAMELESSUNION
#include <windows.h>
#include <commctrl.h>
#include <commdlg.h>
#ifdef UNICODE
#define _UNICODE
#endif
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
#include <locale.h>
#include <time.h>
...
...
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