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
1025ff0c
Commit
1025ff0c
authored
Dec 01, 2003
by
Huw Davies
Committed by
Alexandre Julliard
Dec 01, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement CopyEnhMetaFileW.
parent
f1f3b915
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
1 deletion
+38
-1
gdi32.spec
dlls/gdi/gdi32.spec
+1
-1
enhmetafile.c
objects/enhmetafile.c
+37
-0
No files found.
dlls/gdi/gdi32.spec
View file @
1025ff0c
...
...
@@ -31,7 +31,7 @@
@ stdcall CombineRgn(long long long long)
@ stdcall CombineTransform(ptr ptr ptr)
@ stdcall CopyEnhMetaFileA(long str)
@ st
ub CopyEnhMetaFileW
@ st
dcall CopyEnhMetaFileW(long wstr)
@ stdcall CopyMetaFileA(long str)
@ stdcall CopyMetaFileW(long wstr)
@ stdcall CreateBitmap(long long long long ptr)
...
...
objects/enhmetafile.c
View file @
1025ff0c
...
...
@@ -2248,6 +2248,43 @@ HENHMETAFILE WINAPI CopyEnhMetaFileA(
return
hmfDst
;
}
/*****************************************************************************
* CopyEnhMetaFileW (GDI32.@) Duplicate an enhanced metafile
*
*
*/
HENHMETAFILE
WINAPI
CopyEnhMetaFileW
(
HENHMETAFILE
hmfSrc
,
LPCWSTR
file
)
{
ENHMETAHEADER
*
emrSrc
=
EMF_GetEnhMetaHeader
(
hmfSrc
),
*
emrDst
;
HENHMETAFILE
hmfDst
;
if
(
!
emrSrc
)
return
FALSE
;
if
(
!
file
)
{
emrDst
=
HeapAlloc
(
GetProcessHeap
(),
0
,
emrSrc
->
nBytes
);
memcpy
(
emrDst
,
emrSrc
,
emrSrc
->
nBytes
);
hmfDst
=
EMF_Create_HENHMETAFILE
(
emrDst
,
FALSE
);
}
else
{
HANDLE
hFile
;
hFile
=
CreateFileW
(
file
,
GENERIC_WRITE
|
GENERIC_READ
,
0
,
NULL
,
CREATE_ALWAYS
,
0
,
0
);
WriteFile
(
hFile
,
emrSrc
,
emrSrc
->
nBytes
,
0
,
0
);
CloseHandle
(
hFile
);
/* Reopen file for reading only, so that apps can share
read access to the file while hmf is still valid */
hFile
=
CreateFileW
(
file
,
GENERIC_READ
,
FILE_SHARE_READ
,
NULL
,
OPEN_EXISTING
,
0
,
0
);
if
(
hFile
==
INVALID_HANDLE_VALUE
)
{
ERR
(
"Can't reopen emf for reading
\n
"
);
return
0
;
}
hmfDst
=
EMF_GetEnhMetaFile
(
hFile
);
CloseHandle
(
hFile
);
}
return
hmfDst
;
}
/* Struct to be used to be passed in the LPVOID parameter for cbEnhPaletteCopy */
typedef
struct
tagEMF_PaletteCopy
...
...
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