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
ade15558
Commit
ade15558
authored
Feb 26, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
localspl: Use --prefer-native instead of DLL_WINE_PREATTACH.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ec9a3d99
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
74 deletions
+22
-74
Makefile.in
dlls/localspl/Makefile.in
+1
-2
localmon.c
dlls/localspl/localmon.c
+18
-0
localspl_main.c
dlls/localspl/localspl_main.c
+0
-55
localspl_private.h
dlls/localspl/localspl_private.h
+0
-4
provider.c
dlls/localspl/provider.c
+3
-13
No files found.
dlls/localspl/Makefile.in
View file @
ade15558
MODULE
=
localspl.dll
IMPORTS
=
spoolss user32 advapi32
EXTRADLLFLAGS
=
-mno-cygwin
EXTRADLLFLAGS
=
-mno-cygwin
-Wb
,--prefer-native
C_SRCS
=
\
localmon.c
\
localspl_main.c
\
provider.c
RC_SRCS
=
localspl.rc
dlls/localspl/localmon.c
View file @
ade15558
...
...
@@ -81,6 +81,24 @@ static struct list xcv_handles = LIST_INIT( xcv_handles );
static
const
WCHAR
WinNT_CV_PortsW
[]
=
L"Software
\\
Microsoft
\\
Windows NT
\\
CurrentVersion
\\
Ports"
;
static
const
WCHAR
WinNT_CV_WindowsW
[]
=
L"Software
\\
Microsoft
\\
Windows NT
\\
CurrentVersion
\\
Windows"
;
static
HINSTANCE
LOCALSPL_hInstance
;
/*****************************************************
* DllMain
*/
BOOL
WINAPI
DllMain
(
HINSTANCE
hinstDLL
,
DWORD
fdwReason
,
LPVOID
lpvReserved
)
{
TRACE
(
"(%p, %d, %p)
\n
"
,
hinstDLL
,
fdwReason
,
lpvReserved
);
switch
(
fdwReason
)
{
case
DLL_PROCESS_ATTACH
:
DisableThreadLibraryCalls
(
hinstDLL
);
LOCALSPL_hInstance
=
hinstDLL
;
break
;
}
return
TRUE
;
}
/******************************************************************
* does_port_exist (internal)
...
...
dlls/localspl/localspl_main.c
deleted
100644 → 0
View file @
ec9a3d99
/*
* Implementation of the Local Printprovider/ Printmonitor/ Prontprocessor
*
* Copyright 2006-2009 Detlef Riekenberg
*
* 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
*/
#include <stdarg.h>
#define COBJMACROS
#include "windef.h"
#include "winbase.h"
#include "wine/debug.h"
#include "localspl_private.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
localspl
);
HINSTANCE
LOCALSPL_hInstance
=
NULL
;
/*****************************************************
* DllMain
*/
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
);
LOCALSPL_hInstance
=
hinstDLL
;
setup_provider
();
break
;
}
return
TRUE
;
}
dlls/localspl/localspl_private.h
View file @
ade15558
...
...
@@ -23,10 +23,6 @@
#include <windef.h>
/* ## DLL-wide Globals ## */
extern
HINSTANCE
LOCALSPL_hInstance
DECLSPEC_HIDDEN
;
void
setup_provider
(
void
)
DECLSPEC_HIDDEN
;
/* ## Resource-ID ## */
#define IDS_LOCALPORT 500
#define IDS_LOCALMONITOR 507
...
...
dlls/localspl/provider.c
View file @
ade15558
...
...
@@ -99,8 +99,6 @@ typedef struct {
static
struct
list
monitor_handles
=
LIST_INIT
(
monitor_handles
);
static
monitor_t
*
pm_localport
;
static
const
PRINTPROVIDOR
*
pprovider
=
NULL
;
static
const
WCHAR
fmt_driversW
[]
=
L"System
\\
CurrentControlSet
\\
control
\\
Print
\\
Environments
\\
%s
\\
Drivers%s"
;
static
const
WCHAR
fmt_printprocessorsW
[]
=
...
...
@@ -2508,12 +2506,7 @@ static BOOL WINAPI fpXcvData(HANDLE hXcv, LPCWSTR pszDataName, PBYTE pInputData,
return
TRUE
;
}
/*****************************************************
* setup_provider [internal]
*/
void
setup_provider
(
void
)
{
static
const
PRINTPROVIDOR
backend
=
{
static
const
PRINTPROVIDOR
backend
=
{
fpOpenPrinter
,
NULL
,
/* fpSetJob */
NULL
,
/* fpGetJob */
...
...
@@ -2600,10 +2593,7 @@ void setup_provider(void)
NULL
,
/* fpFlushPrinter */
NULL
,
/* fpSendRecvBidiData */
NULL
/* fpAddDriverCatalog */
};
pprovider
=
&
backend
;
}
};
/*****************************************************
* InitializePrintProvidor (localspl.@)
...
...
@@ -2631,7 +2621,7 @@ BOOL WINAPI InitializePrintProvidor(LPPRINTPROVIDOR pPrintProvidor,
{
TRACE
(
"(%p, %u, %s)
\n
"
,
pPrintProvidor
,
cbPrintProvidor
,
debugstr_w
(
pFullRegistryPath
));
memcpy
(
pPrintProvidor
,
pprovider
,
memcpy
(
pPrintProvidor
,
&
backend
,
(
cbPrintProvidor
<
sizeof
(
PRINTPROVIDOR
))
?
cbPrintProvidor
:
sizeof
(
PRINTPROVIDOR
));
return
TRUE
;
...
...
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