276{
281 PVOID pClipFileHeader;
282 PVOID pClipFormatArray;
283 DWORD SizeOfFileHeader, SizeOfFormatHeader;
284
285 WORD wFileIdentifier;
291
296
297
301 {
303 goto done;
304 }
305
306
307 if (!
ReadFile(
hFile, &wFileIdentifier,
sizeof(wFileIdentifier), &dwBytesRead,
NULL))
308 {
310 goto done;
311 }
312
313
314 switch (wFileIdentifier)
315 {
319 pClipFileHeader = &ClipFileHeader;
320 pClipFormatArray = &ClipFormatArray;
321 break;
322
327 pClipFileHeader = &NtClipFileHeader;
328 pClipFormatArray = &NtClipFormatArray;
329 break;
330
331 default:
333 goto done;
334 }
335
336
339 dwBytesRead != SizeOfFileHeader)
340 {
342 goto done;
343 }
344
345
346 switch (wFileIdentifier)
347 {
351 break;
352
357 break;
358 }
359
360
361 for (
i = 0;
i < wFormatCount;
i++)
362 {
364 {
366 goto done;
367 }
368
370 {
372 goto done;
373 }
374
375
376 switch (wFileIdentifier)
377 {
383 break;
384
391 break;
392 }
393
394 switch (dwFormatID)
395 {
397 {
398 break;
399 }
400
403 {
405 break;
406 }
407
410 {
412 break;
413 }
414
417 {
419 break;
420 }
421
423 {
425 break;
426 }
427
428 default:
429 {
431 {
433 }
434 break;
435 }
436 }
437
438 if (!bResult)
440 }
441
442done:
445
446 return;
447}
static BOOL ClipboardReadPalette(HANDLE hFile, DWORD dwOffset, DWORD dwLength)
static BOOL ClipboardReadBitmap(HANDLE hFile, DWORD dwOffset, DWORD dwLength)
static BOOL ClipboardReadEnhMetafile(HANDLE hFile, DWORD dwOffset, DWORD dwLength)
static BOOL ClipboardReadMemory(HANDLE hFile, DWORD dwFormat, DWORD dwOffset, DWORD dwLength, WORD FileIdentifier, PVOID lpFormatName)
static BOOL ClipboardReadMetafile(HANDLE hFile, DWORD dwOffset, DWORD dwLength)
#define ERROR_INVALID_FILE_FORMAT
#define CF_DSPENHMETAFILE
#define CF_DSPMETAFILEPICT
struct _CLIPFORMATHEADER CLIPFORMATHEADER
struct _CLIPFILEHEADER CLIPFILEHEADER
struct _NTCLIPFILEHEADER NTCLIPFILEHEADER
struct _NTCLIPFORMATHEADER NTCLIPFORMATHEADER
CLIPBOARD_GLOBALS Globals
#define INVALID_HANDLE_VALUE
#define FILE_ATTRIBUTE_NORMAL
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
static const WCHAR szName[]
int MessageBoxRes(HWND hWnd, HINSTANCE hInstance, UINT uText, UINT uCaption, UINT uType)
void ShowLastWin32Error(HWND hwndParent)