#include "shelltest.h"
#include <stdio.h>
Go to the source code of this file.
◆ FileExists()
Definition at line 18 of file ExtractIconEx.cpp.
19{
22
25 {
28 }
29 return exists;
30}
_Check_return_ _CRTIMP FILE *__cdecl fopen(_In_z_ const char *_Filename, _In_z_ const char *_Mode)
_Check_return_opt_ _CRTIMP int __cdecl fclose(_Inout_ FILE *_File)
Referenced by ResourceToFile().
◆ ResourceToFile()
Definition at line 32 of file ExtractIconEx.cpp.
33{
36 HRSRC hRes;
39
41 {
44 }
45
48 {
49 skip(
"Could not locate resource (%d). Exiting now\n",
i);
51 }
52
54
57 {
58 skip(
"Could not load resource (%d). Exiting now\n",
i);
60 }
61
62
64 if (lpResLock ==
NULL)
65 {
66 skip(
"Could not lock resource (%d). Exiting now\n",
i);
68 }
69
71 fwrite(lpResLock, iSize, 1, fout);
74}
HRSRC WINAPI FindResourceW(HINSTANCE hModule, LPCWSTR name, LPCWSTR type)
DWORD WINAPI SizeofResource(HINSTANCE hModule, HRSRC hRsrc)
LPVOID WINAPI LockResource(HGLOBAL handle)
HGLOBAL WINAPI LoadResource(HINSTANCE hModule, HRSRC hRsrc)
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
_Check_return_opt_ _CRTIMP size_t __cdecl fwrite(_In_reads_bytes_(_Size *_Count) const void *_Str, _In_ size_t _Size, _In_ size_t _Count, _Inout_ FILE *_File)
#define MAKEINTRESOURCEW(i)
Referenced by START_TEST().
◆ START_TEST()
Definition at line 98 of file ExtractIconEx.cpp.
99{
100 UINT i, nReturnedIcons, nExtractedIcons;
102
104 return;
106 return;
107
108
110 {
112 ok(nReturnedIcons ==
IconTests[
i].nIcons,
"ExtractIconExW(%u): Expects %u icons, got %u\n",
i,
IconTests[
i].nIcons, nReturnedIcons);
113 }
114
115
117 {
119 ok(nExtractedIcons ==
IconTests[
i].nIcons,
"ExtractIconExW(%u): Expects %u icons, got %u\n",
i,
IconTests[
i].nIcons, nExtractedIcons);
120 }
121
124}
BOOL WINAPI DeleteFileA(IN LPCSTR lpFileName)
UINT WINAPI ExtractIconExW(LPCWSTR lpszFile, INT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIcons)
◆ IconTests
Initial value:=
{
{
L"%SystemRoot%\\System32\\cmd.exe", 1},
{
L"%SystemRoot%\\System32\\autochk.exe", 0},
{
L"%SystemRoot%\\non-existent-file.sdf", 0},
{
L"%SystemRoot%\\explorer.exe", 18},
}
Definition at line 76 of file ExtractIconEx.cpp.
Referenced by START_TEST().