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
6790cdb8
Commit
6790cdb8
authored
Aug 14, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: Create a manifest file at dll registration time.
parent
f42b1e9b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
92 additions
and
4 deletions
+92
-4
commctrl.c
dlls/comctl32/commctrl.c
+91
-4
wine.inf
tools/wine.inf
+1
-0
No files found.
dlls/comctl32/commctrl.c
View file @
6790cdb8
...
...
@@ -71,6 +71,58 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
commctrl
);
#define NAME "microsoft.windows.common-controls"
#define FILE "comctl32.dll"
#define VERSION "6.0.0.0"
#define PUBLIC_KEY "6595b64144ccf1df"
#ifdef __i386__
#define ARCH "x86"
#elif defined __x86_64__
#define ARCH "amd64"
#else
#define ARCH "none"
#endif
static
const
char
manifest
[]
=
"<?xml version=
\"
1.0
\"
encoding=
\"
UTF-8
\"
standalone=
\"
yes
\"
?>
\n
"
"<assembly xmlns=
\"
urn:schemas-microsoft-com:asm.v1
\"
manifestVersion=
\"
1.0
\"
>
\n
"
" <assemblyIdentity type=
\"
win32
\"
name=
\"
"
NAME
"
\"
version=
\"
"
VERSION
"
\"
processorArchitecture=
\"
"
ARCH
"
\"
publicKeyToken=
\"
"
PUBLIC_KEY
"
\"
/>
\n
"
" <file name=
\"
"
FILE
"
\"
>
\n
"
" <windowClass>Button</windowClass>
\n
"
" <windowClass>ButtonListBox</windowClass>
\n
"
" <windowClass>ComboBoxEx32</windowClass>
\n
"
" <windowClass>ComboLBox</windowClass>
\n
"
" <windowClass>Combobox</windowClass>
\n
"
" <windowClass>Edit</windowClass>
\n
"
" <windowClass>Listbox</windowClass>
\n
"
" <windowClass>NativeFontCtl</windowClass>
\n
"
" <windowClass>ReBarWindow32</windowClass>
\n
"
" <windowClass>ScrollBar</windowClass>
\n
"
" <windowClass>Static</windowClass>
\n
"
" <windowClass>SysAnimate32</windowClass>
\n
"
" <windowClass>SysDateTimePick32</windowClass>
\n
"
" <windowClass>SysHeader32</windowClass>
\n
"
" <windowClass>SysIPAddress32</windowClass>
\n
"
" <windowClass>SysLink</windowClass>
\n
"
" <windowClass>SysListView32</windowClass>
\n
"
" <windowClass>SysMonthCal32</windowClass>
\n
"
" <windowClass>SysPager</windowClass>
\n
"
" <windowClass>SysTabControl32</windowClass>
\n
"
" <windowClass>SysTreeView32</windowClass>
\n
"
" <windowClass>ToolbarWindow32</windowClass>
\n
"
" <windowClass>msctls_hotkey32</windowClass>
\n
"
" <windowClass>msctls_progress32</windowClass>
\n
"
" <windowClass>msctls_statusbar32</windowClass>
\n
"
" <windowClass>msctls_trackbar32</windowClass>
\n
"
" <windowClass>msctls_updown32</windowClass>
\n
"
" <windowClass>tooltips_class32</windowClass>
\n
"
" </file>
\n
"
"</assembly>
\n
"
;
static
const
char
manifest_filename
[]
=
ARCH
"_"
NAME
"_"
PUBLIC_KEY
"_"
VERSION
"_none_deadbeef.manifest"
;
LRESULT
WINAPI
COMCTL32_SubclassProc
(
HWND
hWnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
);
LPWSTR
COMCTL32_wSubclass
=
NULL
;
...
...
@@ -91,6 +143,42 @@ static const WCHAR strCC32SubclassInfo[] = {
'C'
,
'C'
,
'3'
,
'2'
,
'S'
,
'u'
,
'b'
,
'c'
,
'l'
,
'a'
,
's'
,
's'
,
'I'
,
'n'
,
'f'
,
'o'
,
0
};
static
BOOL
create_manifest
(
BOOL
install
)
{
static
const
WCHAR
dirW
[]
=
{
'\\'
,
'w'
,
'i'
,
'n'
,
's'
,
'x'
,
's'
,
'\\'
,
'm'
,
'a'
,
'n'
,
'i'
,
'f'
,
'e'
,
's'
,
't'
,
's'
,
'\\'
,
0
};
DWORD
len
,
written
;
WCHAR
*
buffer
;
HANDLE
file
;
BOOL
ret
=
FALSE
;
len
=
MultiByteToWideChar
(
CP_UTF8
,
0
,
manifest_filename
,
sizeof
(
manifest_filename
),
NULL
,
0
);
len
+=
GetWindowsDirectoryW
(
NULL
,
0
);
len
=
len
*
sizeof
(
WCHAR
)
+
sizeof
(
dirW
);
if
(
!
(
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
)))
return
FALSE
;
GetWindowsDirectoryW
(
buffer
,
len
);
lstrcatW
(
buffer
,
dirW
);
MultiByteToWideChar
(
CP_UTF8
,
0
,
manifest_filename
,
sizeof
(
manifest_filename
),
buffer
+
lstrlenW
(
buffer
),
len
);
if
(
install
)
{
file
=
CreateFileW
(
buffer
,
GENERIC_WRITE
,
0
,
NULL
,
CREATE_ALWAYS
,
0
,
NULL
);
if
(
file
!=
INVALID_HANDLE_VALUE
)
{
ret
=
(
WriteFile
(
file
,
manifest
,
sizeof
(
manifest
)
-
1
,
&
written
,
NULL
)
&&
written
==
sizeof
(
manifest
)
-
1
);
CloseHandle
(
file
);
if
(
!
ret
)
DeleteFileW
(
buffer
);
else
TRACE
(
"created %s
\n
"
,
debugstr_w
(
buffer
));
}
}
else
ret
=
DeleteFileW
(
buffer
);
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
return
ret
;
}
/***********************************************************************
* DllMain [Internal]
*
...
...
@@ -917,10 +1005,9 @@ HRESULT WINAPI DllGetVersion (DLLVERSIONINFO *pdvi)
*/
HRESULT
WINAPI
DllInstall
(
BOOL
bInstall
,
LPCWSTR
cmdline
)
{
FIXME
(
"(%s, %s): stub
\n
"
,
bInstall
?
"TRUE"
:
"FALSE"
,
debugstr_w
(
cmdline
));
return
S_OK
;
TRACE
(
"(%u, %s): stub
\n
"
,
bInstall
,
debugstr_w
(
cmdline
));
if
(
!
create_manifest
(
bInstall
))
return
HRESULT_FROM_WIN32
(
GetLastError
());
return
S_OK
;
}
/***********************************************************************
...
...
tools/wine.inf
View file @
6790cdb8
...
...
@@ -2126,6 +2126,7 @@ HKLM,%CurrentVersion%\Telephony\Country List\998,"SameAreaRule",,"G"
11,,avifil32.dll,1
11,,browseui.dll,1
11,,comcat.dll,1
11,,comctl32.dll,2
11,,d3dxof.dll,1
11,,ddraw.dll,1
11,,ddrawex.dll,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