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
2ce7bc84
Commit
2ce7bc84
authored
Apr 30, 2001
by
Ian Pilcher
Committed by
Alexandre Julliard
Apr 30, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check for errors in PSDRV_Init.
parent
eb0ab768
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
16 deletions
+48
-16
init.c
dlls/wineps/init.c
+48
-16
No files found.
dlls/wineps/init.c
View file @
2ce7bc84
...
...
@@ -243,24 +243,56 @@ BOOL WINAPI PSDRV_Init( HINSTANCE hinst, DWORD reason, LPVOID reserved )
TRACE
(
"(0x%4x, 0x%08lx, %p)
\n
"
,
hinst
,
reason
,
reserved
);
switch
(
reason
)
{
case
DLL_PROCESS_ATTACH
:
/* FIXME: return FALSE if we fail any of these steps */
PSDRV_Heap
=
HeapCreate
(
0
,
0x10000
,
0
);
PSDRV_GetFontMetrics
();
PSDRV_DefaultFont
=
CreateFontIndirectA
(
&
DefaultLogFont
);
/* Register driver as "WINEPS", "WINEPS.DLL" and "WINEPS.DRV"
to allow an easy configuring for users */
DRIVER_RegisterDriver
(
"WINEPS"
,
&
PSDRV_Funcs
);
DRIVER_RegisterDriver
(
"WINEPS.DLL"
,
&
PSDRV_Funcs
);
DRIVER_RegisterDriver
(
"WINEPS.DRV"
,
&
PSDRV_Funcs
);
break
;
PSDRV_Heap
=
HeapCreate
(
0
,
0x10000
,
0
);
if
(
PSDRV_Heap
==
(
HANDLE
)
NULL
)
return
FALSE
;
if
(
PSDRV_GetFontMetrics
()
==
FALSE
)
{
HeapDestroy
(
PSDRV_Heap
);
return
FALSE
;
}
PSDRV_DefaultFont
=
CreateFontIndirectA
(
&
DefaultLogFont
);
if
(
PSDRV_DefaultFont
==
(
HANDLE
)
NULL
)
{
HeapDestroy
(
PSDRV_Heap
);
return
FALSE
;
}
/* Register driver as "WINEPS", "WINEPS.DLL" and "WINEPS.DRV"
to allow an easy configuring for users */
if
(
DRIVER_RegisterDriver
(
"WINEPS"
,
&
PSDRV_Funcs
)
==
FALSE
)
{
HeapDestroy
(
PSDRV_Heap
);
return
FALSE
;
}
if
(
DRIVER_RegisterDriver
(
"WINEPS.DLL"
,
&
PSDRV_Funcs
)
==
FALSE
)
{
DRIVER_UnregisterDriver
(
"WINEPS"
);
HeapDestroy
(
PSDRV_Heap
);
return
FALSE
;
}
if
(
DRIVER_RegisterDriver
(
"WINEPS.DRV"
,
&
PSDRV_Funcs
)
==
FALSE
)
{
DRIVER_UnregisterDriver
(
"WINEPS"
);
DRIVER_UnregisterDriver
(
"WINEPS.DLL"
);
HeapDestroy
(
PSDRV_Heap
);
return
FALSE
;
}
break
;
case
DLL_PROCESS_DETACH
:
DeleteObject
(
PSDRV_DefaultFont
);
HeapDestroy
(
PSDRV_Heap
);
DRIVER_UnregisterDriver
(
"WINEPS"
);
DRIVER_UnregisterDriver
(
"WINEPS.DLL"
);
DRIVER_UnregisterDriver
(
"WINEPS.DRV"
);
break
;
DeleteObject
(
PSDRV_DefaultFont
);
HeapDestroy
(
PSDRV_Heap
);
DRIVER_UnregisterDriver
(
"WINEPS"
);
DRIVER_UnregisterDriver
(
"WINEPS.DLL"
);
DRIVER_UnregisterDriver
(
"WINEPS.DRV"
);
break
;
}
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