1c2c66affSColin Finck /* 2c2c66affSColin Finck * PROJECT: ReactOS Clipboard Viewer 3*ebe3d527SHermès Bélusca-Maïto * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+) 4c2c66affSColin Finck * PURPOSE: Clipboard file format helper functions. 5*ebe3d527SHermès Bélusca-Maïto * COPYRIGHT: Copyright 2015-2018 Ricardo Hanke 6*ebe3d527SHermès Bélusca-Maïto * Copyright 2015-2018 Hermes Belusca-Maito 7c2c66affSColin Finck */ 8c2c66affSColin Finck 9*ebe3d527SHermès Bélusca-Maïto #pragma once 10*ebe3d527SHermès Bélusca-Maïto 11*ebe3d527SHermès Bélusca-Maïto /* Clipboard file format signatures */ 12c2c66affSColin Finck #define CLIP_FMT_31 0xC350 13c2c66affSColin Finck #define CLIP_FMT_NT 0xC351 14c2c66affSColin Finck #define CLIP_FMT_BK 0xC352 15*ebe3d527SHermès Bélusca-Maïto 16c2c66affSColin Finck #define MAX_FMT_NAME_LEN 79 17c2c66affSColin Finck 18c2c66affSColin Finck /* 19c2c66affSColin Finck * Win3.1 Clipboard File Format (default) 20c2c66affSColin Finck */ 21c2c66affSColin Finck #pragma pack(push, 1) 22c2c66affSColin Finck typedef struct _CLIPFILEHEADER 23c2c66affSColin Finck { 24c2c66affSColin Finck WORD wFileIdentifier; 25c2c66affSColin Finck WORD wFormatCount; 26c2c66affSColin Finck } CLIPFILEHEADER; 27c2c66affSColin Finck 28c2c66affSColin Finck typedef struct _CLIPFORMATHEADER 29c2c66affSColin Finck { 30c2c66affSColin Finck WORD dwFormatID; 31c2c66affSColin Finck DWORD dwLenData; 32c2c66affSColin Finck DWORD dwOffData; 33c2c66affSColin Finck CHAR szName[MAX_FMT_NAME_LEN]; 34c2c66affSColin Finck } CLIPFORMATHEADER; 35c2c66affSColin Finck #pragma pack(pop) 36c2c66affSColin Finck 37c2c66affSColin Finck /* 38c2c66affSColin Finck * NT Clipboard File Format 39c2c66affSColin Finck */ 40c2c66affSColin Finck typedef struct _NTCLIPFILEHEADER 41c2c66affSColin Finck { 42c2c66affSColin Finck WORD wFileIdentifier; 43c2c66affSColin Finck WORD wFormatCount; 44c2c66affSColin Finck } NTCLIPFILEHEADER; 45c2c66affSColin Finck 46c2c66affSColin Finck typedef struct _NTCLIPFORMATHEADER 47c2c66affSColin Finck { 48c2c66affSColin Finck DWORD dwFormatID; 49c2c66affSColin Finck DWORD dwLenData; 50c2c66affSColin Finck DWORD dwOffData; 51c2c66affSColin Finck WCHAR szName[MAX_FMT_NAME_LEN]; 52c2c66affSColin Finck } NTCLIPFORMATHEADER; 53c2c66affSColin Finck 54c2c66affSColin Finck void ReadClipboardFile(LPCWSTR lpFileName); 55c2c66affSColin Finck void WriteClipboardFile(LPCWSTR lpFileName, WORD wFileIdentifier); 56