2015-11-14 16:45:41 +00:00
|
|
|
/*
|
2018-05-13 20:15:41 +00:00
|
|
|
* PROJECT: ReactOS Clipboard Viewer
|
|
|
|
* LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
|
|
|
|
* PURPOSE: Clipboard file format helper functions.
|
|
|
|
* COPYRIGHT: Copyright 2015-2018 Ricardo Hanke
|
|
|
|
* Copyright 2015-2018 Hermes Belusca-Maito
|
2015-11-14 16:45:41 +00:00
|
|
|
*/
|
|
|
|
|
2018-05-13 20:15:41 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
/* Clipboard file format signatures */
|
2016-02-13 16:08:09 +00:00
|
|
|
#define CLIP_FMT_31 0xC350
|
|
|
|
#define CLIP_FMT_NT 0xC351
|
|
|
|
#define CLIP_FMT_BK 0xC352
|
2018-05-13 20:15:41 +00:00
|
|
|
|
2015-11-14 16:45:41 +00:00
|
|
|
#define MAX_FMT_NAME_LEN 79
|
|
|
|
|
2016-02-13 16:08:09 +00:00
|
|
|
/*
|
|
|
|
* Win3.1 Clipboard File Format (default)
|
|
|
|
*/
|
|
|
|
#pragma pack(push, 1)
|
|
|
|
typedef struct _CLIPFILEHEADER
|
|
|
|
{
|
|
|
|
WORD wFileIdentifier;
|
|
|
|
WORD wFormatCount;
|
|
|
|
} CLIPFILEHEADER;
|
|
|
|
|
|
|
|
typedef struct _CLIPFORMATHEADER
|
|
|
|
{
|
|
|
|
WORD dwFormatID;
|
|
|
|
DWORD dwLenData;
|
|
|
|
DWORD dwOffData;
|
|
|
|
CHAR szName[MAX_FMT_NAME_LEN];
|
|
|
|
} CLIPFORMATHEADER;
|
|
|
|
#pragma pack(pop)
|
|
|
|
|
|
|
|
/*
|
|
|
|
* NT Clipboard File Format
|
|
|
|
*/
|
|
|
|
typedef struct _NTCLIPFILEHEADER
|
2015-11-14 16:45:41 +00:00
|
|
|
{
|
|
|
|
WORD wFileIdentifier;
|
|
|
|
WORD wFormatCount;
|
2016-02-13 16:08:09 +00:00
|
|
|
} NTCLIPFILEHEADER;
|
2015-11-14 16:45:41 +00:00
|
|
|
|
2016-02-13 16:08:09 +00:00
|
|
|
typedef struct _NTCLIPFORMATHEADER
|
2015-11-14 16:45:41 +00:00
|
|
|
{
|
|
|
|
DWORD dwFormatID;
|
|
|
|
DWORD dwLenData;
|
|
|
|
DWORD dwOffData;
|
|
|
|
WCHAR szName[MAX_FMT_NAME_LEN];
|
2016-02-13 16:08:09 +00:00
|
|
|
} NTCLIPFORMATHEADER;
|
2015-11-14 16:45:41 +00:00
|
|
|
|
|
|
|
void ReadClipboardFile(LPCWSTR lpFileName);
|
2016-02-13 17:04:40 +00:00
|
|
|
void WriteClipboardFile(LPCWSTR lpFileName, WORD wFileIdentifier);
|