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
f7bd46a4
Commit
f7bd46a4
authored
Jun 21, 2007
by
Detlef Riekenberg
Committed by
Alexandre Julliard
Jun 21, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntprint: Implement PSetupCreateMonitorInfo.
parent
1a3689fd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
70 additions
and
4 deletions
+70
-4
Makefile.in
dlls/ntprint/Makefile.in
+1
-1
ntprint.c
dlls/ntprint/ntprint.c
+67
-1
ntprint.spec
dlls/ntprint/ntprint.spec
+2
-2
No files found.
dlls/ntprint/Makefile.in
View file @
f7bd46a4
...
@@ -3,7 +3,7 @@ TOPOBJDIR = ../..
...
@@ -3,7 +3,7 @@ TOPOBJDIR = ../..
SRCDIR
=
@srcdir@
SRCDIR
=
@srcdir@
VPATH
=
@srcdir@
VPATH
=
@srcdir@
MODULE
=
ntprint.dll
MODULE
=
ntprint.dll
IMPORTS
=
kernel32
IMPORTS
=
winspool
kernel32
C_SRCS
=
\
C_SRCS
=
\
ntprint.c
ntprint.c
...
...
dlls/ntprint/ntprint.c
View file @
f7bd46a4
...
@@ -25,8 +25,11 @@
...
@@ -25,8 +25,11 @@
#include "windef.h"
#include "windef.h"
#include "winbase.h"
#include "winbase.h"
#include "winver.h"
#include "winerror.h"
#include "wingdi.h"
#include "winnls.h"
#include "winnls.h"
#include "winver.h"
#include "winspool.h"
#include "wine/unicode.h"
#include "wine/unicode.h"
#include "wine/debug.h"
#include "wine/debug.h"
...
@@ -35,6 +38,11 @@ WINE_DEFAULT_DEBUG_CHANNEL(ntprint);
...
@@ -35,6 +38,11 @@ WINE_DEFAULT_DEBUG_CHANNEL(ntprint);
HINSTANCE
NTPRINT_hInstance
=
NULL
;
HINSTANCE
NTPRINT_hInstance
=
NULL
;
typedef
struct
{
LPMONITOR_INFO_2W
mi2
;
/* Buffer for installed Monitors */
DWORD
installed
;
/* Number of installed Monitors */
}
monitorinfo_t
;
/*****************************************************
/*****************************************************
* DllMain
* DllMain
*/
*/
...
@@ -54,3 +62,61 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
...
@@ -54,3 +62,61 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
}
}
return
TRUE
;
return
TRUE
;
}
}
/*****************************************************
* PSetupCreateMonitorInfo [NTPRINT.@]
*
*
*/
HANDLE
WINAPI
PSetupCreateMonitorInfo
(
LPVOID
unknown1
,
LPVOID
unknown2
,
LPVOID
unknown3
)
{
monitorinfo_t
*
mi
=
NULL
;
DWORD
needed
;
DWORD
res
;
TRACE
(
"(%p, %p, %p)
\n
"
,
unknown1
,
unknown2
,
unknown3
);
if
((
unknown2
!=
NULL
)
||
(
unknown3
!=
NULL
))
{
FIXME
(
"got unknown parameter: (%p, %p, %p)
\n
"
,
unknown1
,
unknown2
,
unknown3
);
return
NULL
;
}
mi
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
monitorinfo_t
));
if
(
!
mi
)
{
/* FIXME: SetLastError() needed? */
return
NULL
;
}
/* Get the needed size for all Monitors */
res
=
EnumMonitorsW
(
NULL
,
2
,
NULL
,
0
,
&
needed
,
&
mi
->
installed
);
if
(
!
res
&&
(
GetLastError
()
==
ERROR_INSUFFICIENT_BUFFER
))
{
mi
->
mi2
=
HeapAlloc
(
GetProcessHeap
(),
0
,
needed
);
res
=
EnumMonitorsW
(
NULL
,
2
,
(
LPBYTE
)
mi
->
mi2
,
needed
,
&
needed
,
&
mi
->
installed
);
}
if
(
!
res
)
{
HeapFree
(
GetProcessHeap
(),
0
,
mi
);
/* FIXME: SetLastError() needed? */
return
NULL
;
}
TRACE
(
"=> %p (%u monitors installed)
\n
"
,
mi
,
mi
->
installed
);
return
(
HANDLE
)
mi
;
}
/*****************************************************
* PSetupDestroyMonitorInfo [NTPRINT.@]
*
*/
VOID
WINAPI
PSetupDestroyMonitorInfo
(
HANDLE
monitorinfo
)
{
monitorinfo_t
*
mi
=
(
monitorinfo_t
*
)
monitorinfo
;
TRACE
(
"(%p)
\n
"
,
mi
);
if
(
mi
)
{
if
(
mi
->
installed
)
HeapFree
(
GetProcessHeap
(),
0
,
mi
->
mi2
);
HeapFree
(
GetProcessHeap
(),
0
,
mi
);
}
}
dlls/ntprint/ntprint.spec
View file @
f7bd46a4
...
@@ -2,10 +2,10 @@
...
@@ -2,10 +2,10 @@
@ stub PSetupAssociateICMProfiles
@ stub PSetupAssociateICMProfiles
@ stub PSetupBuildDriversFromPath
@ stub PSetupBuildDriversFromPath
@ stub PSetupCreateDrvSetupPage
@ stub PSetupCreateDrvSetupPage
@ st
ub PSetupCreateMonitorInfo
@ st
dcall PSetupCreateMonitorInfo(long ptr ptr)
@ stub PSetupCreatePrinterDeviceInfoList
@ stub PSetupCreatePrinterDeviceInfoList
@ stub PSetupDestroyDriverInfo3
@ stub PSetupDestroyDriverInfo3
@ st
ub PSetupDestroyMonitorInfo
@ st
dcall PSetupDestroyMonitorInfo(long)
@ stub PSetupDestroyPrinterDeviceInfoList
@ stub PSetupDestroyPrinterDeviceInfoList
@ stub PSetupDestroySelectedDriverInfo
@ stub PSetupDestroySelectedDriverInfo
@ stub PSetupDriverInfoFromName
@ stub PSetupDriverInfoFromName
...
...
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