---
name: "CopyMetaFileW"
section: "3w"
platform: "linux"
package: "libwine-dev"
version: "1.4.1-4"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/CopyMetaFileW"
---

# CopyMetaFileW(3w)

## NAME

**CopyMetaFileW** (GDI32.@)

## SYNOPSIS

HMETAFILE CopyMetaFileW\
  (\
   HMETAFILE *hSrcMetaFile*,\
   LPCWSTR   *lpFilename*\
  )

## DESCRIPTION

Copies the metafile corresponding to *hSrcMetaFile* to either a disk file, if a filename is given, or to a new memory based metafile, if lpFileName is **NULL**.

## PARAMS

*hSrcMetaFile* **\[In\]**  handle of metafile to copy.

*lpFilename* **\[In\]**  filename if copying to a file.

## RETURNS

Handle to metafile copy on success, **NULL** on failure.

## BUGS

Copying to disk returns **NULL** even if successful.

## IMPLEMENTATION

Declared in **"wingdi.h"**.

Implemented in **"dlls/gdi32/metafile.c"**.

Debug channel **"metafile"**.
