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
ee9c7dc0
Commit
ee9c7dc0
authored
Feb 25, 2014
by
Nikolay Sivov
Committed by
Alexandre Julliard
Feb 26, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fntcache: Added stub Font Cache service.
parent
99298f85
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
143 additions
and
4 deletions
+143
-4
configure
configure
+2
-0
configure.ac
configure.ac
+1
-0
Makefile.in
dlls/fntcache/Makefile.in
+5
-0
fntcache.spec
dlls/fntcache/fntcache.spec
+3
-0
main.c
dlls/fntcache/main.c
+112
-0
wine.inf.in
loader/wine.inf.in
+20
-4
No files found.
configure
View file @
ee9c7dc0
...
...
@@ -1028,6 +1028,7 @@ enable_explorerframe
enable_ext_ms_win_gdi_devcaps_l1_1_0
enable_faultrep
enable_fltlib
enable_fntcache
enable_fusion
enable_fwpuclnt
enable_gameux
...
...
@@ -16849,6 +16850,7 @@ wine_fn_config_dll ext-ms-win-gdi-devcaps-l1-1-0 enable_ext_ms_win_gdi_devcaps_l
wine_fn_config_dll faultrep enable_faultrep implib
wine_fn_config_test dlls/faultrep/tests faultrep_test
wine_fn_config_dll fltlib enable_fltlib
wine_fn_config_dll fntcache enable_fntcache
wine_fn_config_dll fusion enable_fusion
wine_fn_config_test dlls/fusion/tests fusion_test
wine_fn_config_dll fwpuclnt enable_fwpuclnt
...
...
configure.ac
View file @
ee9c7dc0
...
...
@@ -2857,6 +2857,7 @@ WINE_CONFIG_DLL(ext-ms-win-gdi-devcaps-l1-1-0)
WINE_CONFIG_DLL(faultrep,,[implib])
WINE_CONFIG_TEST(dlls/faultrep/tests)
WINE_CONFIG_DLL(fltlib)
WINE_CONFIG_DLL(fntcache)
WINE_CONFIG_DLL(fusion)
WINE_CONFIG_TEST(dlls/fusion/tests)
WINE_CONFIG_DLL(fwpuclnt)
...
...
dlls/fntcache/Makefile.in
0 → 100644
View file @
ee9c7dc0
MODULE
=
fntcache.dll
IMPORTS
=
advapi32
C_SRCS
=
\
main.c
dlls/fntcache/fntcache.spec
0 → 100644
View file @
ee9c7dc0
@ stub DllRegisterServer
@ stub DllUnregisterServer
@ stdcall -private ServiceMain(long ptr)
dlls/fntcache/main.c
0 → 100644
View file @
ee9c7dc0
/*
* Font Cache service
*
* Copyright 2014 Nikolay Sivov for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include "winsvc.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
fontcache
);
static
HINSTANCE
hInst
;
static
SERVICE_STATUS_HANDLE
service_handle
;
static
HANDLE
stop_event
;
/***********************************************************************
* DllMain (fntcache.@)
*/
BOOL
WINAPI
DllMain
(
HINSTANCE
hinstDLL
,
DWORD
fdwReason
,
LPVOID
lpvReserved
)
{
TRACE
(
"(%p, %d, %p)
\n
"
,
hinstDLL
,
fdwReason
,
lpvReserved
);
switch
(
fdwReason
)
{
case
DLL_WINE_PREATTACH
:
return
FALSE
;
/* prefer native version */
case
DLL_PROCESS_ATTACH
:
DisableThreadLibraryCalls
(
hinstDLL
);
hInst
=
hinstDLL
;
break
;
}
return
TRUE
;
}
static
DWORD
WINAPI
service_handler
(
DWORD
ctrl
,
DWORD
event_type
,
void
*
event_data
,
void
*
context
)
{
SERVICE_STATUS
status
;
status
.
dwServiceType
=
SERVICE_WIN32
;
status
.
dwControlsAccepted
=
SERVICE_ACCEPT_STOP
;
status
.
dwWin32ExitCode
=
0
;
status
.
dwServiceSpecificExitCode
=
0
;
status
.
dwCheckPoint
=
0
;
status
.
dwWaitHint
=
0
;
switch
(
ctrl
)
{
case
SERVICE_CONTROL_STOP
:
case
SERVICE_CONTROL_SHUTDOWN
:
WINE_TRACE
(
"shutting down
\n
"
);
status
.
dwCurrentState
=
SERVICE_STOP_PENDING
;
status
.
dwControlsAccepted
=
0
;
SetServiceStatus
(
service_handle
,
&
status
);
SetEvent
(
stop_event
);
return
NO_ERROR
;
default:
WINE_FIXME
(
"got service ctrl %x
\n
"
,
ctrl
);
status
.
dwCurrentState
=
SERVICE_RUNNING
;
SetServiceStatus
(
service_handle
,
&
status
);
return
NO_ERROR
;
}
}
/***********************************************************************
* ServiceMain (fntcache.@)
*/
VOID
WINAPI
ServiceMain
(
DWORD
argc
,
LPWSTR
*
argv
)
{
static
const
WCHAR
fontcacheW
[]
=
{
'F'
,
'o'
,
'n'
,
't'
,
'C'
,
'a'
,
'c'
,
'h'
,
'e'
,
0
};
SERVICE_STATUS
status
;
WINE_TRACE
(
"starting service
\n
"
);
stop_event
=
CreateEventW
(
NULL
,
TRUE
,
FALSE
,
NULL
);
service_handle
=
RegisterServiceCtrlHandlerExW
(
fontcacheW
,
service_handler
,
NULL
);
if
(
!
service_handle
)
return
;
status
.
dwServiceType
=
SERVICE_WIN32
;
status
.
dwCurrentState
=
SERVICE_RUNNING
;
status
.
dwControlsAccepted
=
SERVICE_ACCEPT_STOP
|
SERVICE_ACCEPT_SHUTDOWN
;
status
.
dwWin32ExitCode
=
0
;
status
.
dwServiceSpecificExitCode
=
0
;
status
.
dwCheckPoint
=
0
;
status
.
dwWaitHint
=
10000
;
SetServiceStatus
(
service_handle
,
&
status
);
WaitForSingleObject
(
stop_event
,
INFINITE
);
status
.
dwCurrentState
=
SERVICE_STOPPED
;
status
.
dwControlsAccepted
=
0
;
SetServiceStatus
(
service_handle
,
&
status
);
WINE_TRACE
(
"service stopped
\n
"
);
}
loader/wine.inf.in
View file @
ee9c7dc0
...
...
@@ -121,8 +121,9 @@ AddService=Spooler,0,SpoolerService
AddService=StiSvc,0,StiService
AddService=TermService,0,TerminalServices
AddService=PlugPlay,0,PlugPlayService
AddService=FontCache3.0.0.0,0,FontCacheService
AddService=FontCache3.0.0.0,0,
WPF
FontCacheService
AddService=LanmanServer,0,LanmanServerService
AddService=FontCache,0,FontCacheService
[DefaultInstall.NT.Services]
AddService=BITS,0,BITSService
...
...
@@ -132,8 +133,9 @@ AddService=Spooler,0,SpoolerService
AddService=StiSvc,0,StiService
AddService=TermService,0,TerminalServices
AddService=PlugPlay,0,PlugPlayService
AddService=FontCache3.0.0.0,0,FontCacheService
AddService=FontCache3.0.0.0,0,
WPF
FontCacheService
AddService=LanmanServer,0,LanmanServerService
AddService=FontCache,0,FontCacheService
[DefaultInstall.ntamd64.Services]
AddService=BITS,0,BITSService
...
...
@@ -143,8 +145,9 @@ AddService=Spooler,0,SpoolerService
AddService=StiSvc,0,StiService
AddService=TermService,0,TerminalServices
AddService=PlugPlay,0,PlugPlayService
AddService=FontCache3.0.0.0,0,FontCacheService
AddService=FontCache3.0.0.0,0,
WPF
FontCacheService
AddService=LanmanServer,0,LanmanServerService
AddService=FontCache,0,FontCacheService
[Strings]
MciExtStr="Software\Microsoft\Windows NT\CurrentVersion\MCI Extensions"
...
...
@@ -2989,7 +2992,7 @@ ServiceType=32
StartType=2
ErrorControl=1
[FontCacheService]
[
WPF
FontCacheService]
Description="Windows Presentation Foundation font cache service"
DisplayName="Windows Presentation Foundation Font Cache 3.0.0.0"
ServiceBinary="%10%\Microsoft.Net\Framework\v3.0\wpf\presentationfontcache.exe"
...
...
@@ -3010,6 +3013,19 @@ ErrorControl=1
HKR,Parameters,"ServiceDll",,"%11%\srvsvc.dll"
;; HKLM,%CurrentVersionNT%\SvcHost,"netsvcs",0x00010008,"lanmanserver"
[FontCacheService]
AddReg=FontCacheServiceKeys
Description="Windows Font Cache Service"
DisplayName="Windows Font Cache Service"
ServiceBinary="%11%\svchost.exe -k netsvcs"
ServiceType=32
StartType=3
ErrorControl=1
[FontCacheServiceKeys]
HKR,Parameters,"ServiceDll",,"%11%\fntcache.dll"
;; HKLM,%CurrentVersionNT%\SvcHost,"netsvcs",0x00010008,"fontcache"
[Services]
HKLM,%CurrentVersion%\RunServices,"winemenubuilder",2,"%11%\winemenubuilder.exe -a -r"
HKLM,"System\CurrentControlSet\Services\Eventlog\Application",,16
...
...
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