[ATL][ATL_APITEST] Add CImage initial implementation + tests, by Katayama Hirofumi MZ. CORE-10029 #comment Thanks, first iteration committed!

- Tests focus mainly on loading + saving images.
- The implementation is not perfect yet, see CImage_WIP.txt for test results.
- The GDI+ functions should be fixed before this test can pass fully, MS' ATL fails in ReactOS, but passes on Windows.

svn path=/trunk/; revision=72332
This commit is contained in:
Mark Jansen 2016-08-18 19:27:49 +00:00
parent ded08d3fbb
commit 6db0c12e85
12 changed files with 1729 additions and 1 deletions

View file

@ -21,6 +21,8 @@
#pragma once
#include <cguid.h> // for GUID_NULL
namespace ATL
{

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,278 @@
/*
* PROJECT: ReactOS api tests
* LICENSE: LGPLv2.1+ - See COPYING.LIB in the top level directory
* PURPOSE: Test for CImage
* PROGRAMMER: Katayama Hirofumi MZ (katayama.hirofumi.mz@gmail.com)
*/
#include <atlimage.h>
#include "resource.h"
#ifdef __REACTOS__
#include <apitest.h>
#else
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
const char *g_file = NULL;
int g_line = 0;
int g_tests_executed = 0;
int g_tests_failed = 0;
void ok_func(BOOL value, const char *fmt, ...)
{
va_list va;
va_start(va, fmt);
if (!value)
{
printf("%s (%d): ", g_file, g_line);
vprintf(fmt, va);
g_tests_failed++;
}
g_tests_executed++;
va_end(va);
}
#undef ok
#define ok g_file = __FILE__; g_line = __LINE__; ok_func
#define START_TEST(x) int main(void)
#endif
const TCHAR* szFiles[] = {
TEXT("ant.png"),
TEXT("ant.tif"),
TEXT("ant.gif"),
TEXT("ant.jpg"),
TEXT("ant.bmp"),
};
static TCHAR szTempPath[MAX_PATH];
TCHAR* file_name(const TCHAR* file)
{
static TCHAR buffer[MAX_PATH];
lstrcpy(buffer, szTempPath);
lstrcat(buffer, TEXT("\\"));
lstrcat(buffer, file);
return buffer;
}
static void write_bitmap(HINSTANCE hInst, int id, TCHAR* file)
{
HRSRC rsrc;
rsrc = FindResource(hInst, MAKEINTRESOURCE(id), MAKEINTRESOURCE(RT_BITMAP));
ok(rsrc != NULL, "Expected to find an image resource\n");
if (rsrc)
{
void *rsrc_data;
HANDLE hfile;
BOOL ret;
HGLOBAL glob = LoadResource(hInst, rsrc);
DWORD rsrc_size = SizeofResource(hInst, rsrc);
rsrc_data = LockResource(glob);
hfile = CreateFile(file, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0);
ok(hfile != INVALID_HANDLE_VALUE, "Unable to open temp file: %lu\n", GetLastError());
if (hfile != INVALID_HANDLE_VALUE)
{
BITMAPFILEHEADER bfh = { 0 };
DWORD dwWritten;
bfh.bfType = 'MB';
bfh.bfSize = rsrc_size + sizeof(BITMAPFILEHEADER);
bfh.bfOffBits = sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFOHEADER);
bfh.bfReserved1 = bfh.bfReserved2 = 0;
ret = WriteFile(hfile, &bfh, sizeof(bfh), &dwWritten, NULL);
ok(ret, "Unable to write temp file: %lu\n", GetLastError());
ret = WriteFile(hfile, rsrc_data, rsrc_size, &dwWritten, NULL);
ok(ret, "Unable to write temp file: %lu\n", GetLastError());
CloseHandle(hfile);
}
UnlockResource(rsrc_data);
}
}
typedef Gdiplus::GpStatus (WINAPI *STARTUP)(ULONG_PTR *, const Gdiplus::GdiplusStartupInput *, Gdiplus::GdiplusStartupOutput *);
typedef void (WINAPI *SHUTDOWN)(ULONG_PTR);
typedef Gdiplus::GpStatus (WINGDIPAPI *CREATEBITMAPFROMFILE)(GDIPCONST WCHAR*, Gdiplus::GpBitmap **);
typedef Gdiplus::GpStatus (WINGDIPAPI *GETPIXELFORMAT)(Gdiplus::GpImage *image, Gdiplus::PixelFormat *format);
typedef Gdiplus::GpStatus (WINGDIPAPI *DISPOSEIMAGE)(Gdiplus::GpImage *);
static HINSTANCE hinstGdiPlus;
static ULONG_PTR gdiplusToken;
static STARTUP Startup;
static SHUTDOWN Shutdown;
static CREATEBITMAPFROMFILE CreateBitmapFromFile;
static GETPIXELFORMAT GetImagePixelFormat;
static DISPOSEIMAGE DisposeImage;
template <typename TYPE>
TYPE AddrOf(const char *name)
{
FARPROC proc = ::GetProcAddress(hinstGdiPlus, name);
return reinterpret_cast<TYPE>(proc);
}
static void init_gdip()
{
hinstGdiPlus = ::LoadLibraryA("gdiplus.dll");
Startup = AddrOf<STARTUP>("GdiplusStartup");
Shutdown = AddrOf<SHUTDOWN>("GdiplusShutdown");
CreateBitmapFromFile = AddrOf<CREATEBITMAPFROMFILE>("GdipCreateBitmapFromFile");
GetImagePixelFormat = AddrOf<GETPIXELFORMAT>("GdipGetImagePixelFormat");
DisposeImage = AddrOf<DISPOSEIMAGE>("GdipDisposeImage");
}
static void determine_file_bpp(TCHAR* tfile, Gdiplus::PixelFormat expect_pf)
{
using namespace Gdiplus;
GpBitmap *pBitmap = NULL;
#ifdef UNICODE
WCHAR* file = tfile;
#else
WCHAR file[MAX_PATH];
::MultiByteToWideChar(CP_ACP, 0, tfile, -1, file, MAX_PATH);
#endif
if (Startup == NULL)
init_gdip();
Gdiplus::GdiplusStartupInput gdiplusStartupInput;
Startup(&gdiplusToken, &gdiplusStartupInput, NULL);
Gdiplus::GpStatus status = CreateBitmapFromFile(file, &pBitmap);
ok(status == Gdiplus::Ok, "Expected status to be %i, was: %i\n", (int)Gdiplus::Ok, (int)status);
ok(pBitmap != NULL, "Expected a valid bitmap\n");
if (pBitmap)
{
PixelFormat pf;
GetImagePixelFormat(pBitmap, &pf);
ok(pf == expect_pf, "Expected PixelFormat to be 0x%x, was: 0x%x\n", (int)expect_pf, (int)pf);
DisposeImage(pBitmap);
}
Shutdown(gdiplusToken);
}
START_TEST(CImage)
{
HRESULT hr;
TCHAR* file;
BOOL bOK;
int width, height, bpp;
size_t n;
CImage image1, image2;
COLORREF color;
HDC hDC;
#if 0
width = image1.GetWidth();
height = image1.GetHeight();
bpp = image1.GetBPP();
#endif
HINSTANCE hInst = GetModuleHandle(NULL);
GetTempPath(MAX_PATH, szTempPath);
image1.LoadFromResource(hInst, IDB_ANT);
ok(!image1.IsNull(), "Expected image1 is not null\n");
width = image1.GetWidth();
ok(width == 48, "Expected width to be 48, was: %d\n", width);
height = image1.GetHeight();
ok(height == 48, "Expected height to be 48, was: %d\n", height);
bpp = image1.GetBPP();
ok(bpp == 8, "Expected bpp to be 8, was: %d\n", bpp);
image2.LoadFromResource(hInst, IDB_CROSS);
ok(!image2.IsNull(), "Expected image2 is not null\n");
image2.SetTransparentColor(RGB(255, 255, 255));
width = image2.GetWidth();
ok(width == 32, "Expected width to be 32, was: %d\n", width);
height = image2.GetHeight();
ok(height == 32, "Expected height to be 32, was: %d\n", height);
bpp = image2.GetBPP();
ok(bpp == 8, "Expected bpp to be 8, was: %d\n", bpp);
color = image1.GetPixel(5, 5);
ok(color == RGB(166, 202, 240), "Expected color to be 166, 202, 240; was: %i, %i, %i\n", GetRValue(color), GetGValue(color), GetBValue(color));
hDC = image1.GetDC();
bOK = image2.Draw(hDC, 0, 0);
image1.ReleaseDC();
ok(bOK != FALSE, "Expected bDraw to be TRUE, was: %d\n", bOK);
image2.Destroy();
color = image1.GetPixel(5, 5);
ok(color == RGB(255, 0,0), "Expected color to be 255, 0, 0; was: %i, %i, %i\n", GetRValue(color), GetGValue(color), GetBValue(color));
file = file_name(TEXT("ant.bmp"));
write_bitmap(hInst, IDB_ANT, file);
init_gdip();
determine_file_bpp(file, PixelFormat8bppIndexed);
hr = image2.Load(file);
ok(hr == S_OK, "Expected hr to be S_OK, was: %08lx\n", hr);
ok(!image2.IsNull(), "Expected image1 is not null\n");
bOK = DeleteFile(file);
ok(bOK, "Expected bOK to be TRUE, was: %d\n", bOK);
width = image2.GetWidth();
ok(width == 48, "Expected width to be 48, was: %d\n", width);
height = image2.GetHeight();
ok(height == 48, "Expected height to be 48, was: %d\n", height);
bpp = image2.GetBPP();
ok(bpp == 8, "Expected bpp to be 8, was: %d\n", bpp);
for (n = 0; n < _countof(szFiles); ++n)
{
file = file_name(szFiles[n]);
image2.Destroy();
if (n == 0)
hr = image1.Save(file, Gdiplus::ImageFormatPNG);
else
hr = image1.Save(file);
ok(hr == S_OK, "Expected hr to be S_OK, was: %08lx (for %i)\n", hr, n);
bOK = (GetFileAttributes(file) != 0xFFFFFFFF);
ok(bOK, "Expected bOK to be TRUE, was: %d (for %i)\n", bOK, n);
hr = image2.Load(file);
ok(hr == S_OK, "Expected hr to be S_OK, was: %08lx (for %i)\n", hr, n);
width = image2.GetWidth();
ok(width == 48, "Expected width to be 48, was: %d (for %i)\n", width, n);
height = image2.GetHeight();
ok(height == 48, "Expected height to be 48, was: %d (for %i)\n", height, n);
bpp = image2.GetBPP();
if (n == 3)
{
ok(bpp == 24, "Expected bpp to be 24, was: %d (for %i)\n", bpp, n);
determine_file_bpp(file, PixelFormat24bppRGB);
}
else
{
ok(bpp == 8, "Expected bpp to be 8, was: %d (for %i)\n", bpp, n);
determine_file_bpp(file, PixelFormat8bppIndexed);
}
color = image1.GetPixel(5, 5);
ok(color == RGB(255, 0,0), "Expected color to be 255, 0, 0; was: %i, %i, %i (for %i)\n", GetRValue(color), GetGValue(color), GetBValue(color), n);
bOK = DeleteFile(file);
ok(bOK, "Expected bOK to be TRUE, was: %d (for %i)\n", bOK, n);
}
#ifndef __REACTOS__
printf("CImage: %i tests executed (0 marked as todo, %i failures), 0 skipped.\n", g_tests_executed, g_tests_failed);
#endif
}

View file

@ -0,0 +1,86 @@
Test files:
atl_apitest: CImage class from reactos
CImage.exe : CImage class from microsoft
================================================================================================================
Windows Server 2003 SP2:
================================================================================================================
>atl_apitest.exe CImage
R:\src\trunk\reactos\modules\rostests\apitests\atl\CImage.cpp(234): Test failed: Expected bpp to be 8, was: 32
R:\src\trunk\reactos\modules\rostests\apitests\atl\CImage.cpp(265): Test failed: Expected bpp to be 8, was: 32 (for 0)
R:\src\trunk\reactos\modules\rostests\apitests\atl\CImage.cpp(265): Test failed: Expected bpp to be 8, was: 32 (for 1)
R:\src\trunk\reactos\modules\rostests\apitests\atl\CImage.cpp(265): Test failed: Expected bpp to be 8, was: 32 (for 2)
R:\src\trunk\reactos\modules\rostests\apitests\atl\CImage.cpp(260): Test failed: Expected bpp to be 24, was: 32 (for 3)
R:\src\trunk\reactos\modules\rostests\apitests\atl\CImage.cpp(265): Test failed: Expected bpp to be 8, was: 32 (for 4)
CImage: 79 tests executed (0 marked as todo, 6 failures), 0 skipped.
================================================================================================================
>CImage.exe
CImage: 79 tests executed (0 marked as todo, 0 failures), 0 skipped.
================================================================================================================
================================================================================================================
Windows 10:
================================================================================================================
>atl_apitest.exe CImage
R:\src\trunk\reactos\modules\rostests\apitests\atl\CImage.cpp(234): Test failed: Expected bpp to be 8, was: 32
R:\src\trunk\reactos\modules\rostests\apitests\atl\CImage.cpp(265): Test failed: Expected bpp to be 8, was: 32 (for 0)
R:\src\trunk\reactos\modules\rostests\apitests\atl\CImage.cpp(265): Test failed: Expected bpp to be 8, was: 32 (for 1)
R:\src\trunk\reactos\modules\rostests\apitests\atl\CImage.cpp(265): Test failed: Expected bpp to be 8, was: 32 (for 2)
R:\src\trunk\reactos\modules\rostests\apitests\atl\CImage.cpp(260): Test failed: Expected bpp to be 24, was: 32 (for 3)
R:\src\trunk\reactos\modules\rostests\apitests\atl\CImage.cpp(265): Test failed: Expected bpp to be 8, was: 32 (for 4)
CImage: 79 tests executed (0 marked as todo, 6 failures), 0 skipped.
================================================================================================================
>CImage.exe
CImage: 79 tests executed (0 marked as todo, 0 failures), 0 skipped.
================================================================================================================
================================================================================================================
ReactOS:
================================================================================================================
>atl_apitest.exe CImage
CImage.cpp:234: Test failed: Expected bpp to be 8, was: 32
CImage.cpp:265: Test failed: Expected bpp to be 8, was: 32 (for 0)
CImage.cpp:245: Test failed: Expected hr to be S_OK, was: 80004005 (for 1)
CImage.cpp:251: Test failed: Expected hr to be S_OK, was: 80004005 (for 1)
CImage.cpp:254: Test failed: Expected width to be 48, was: 0 (for 1)
CImage.cpp:256: Test failed: Expected height to be 48, was: 0 (for 1)
CImage.cpp:265: Test failed: Expected bpp to be 8, was: 0 (for 1)
CImage.cpp:148: Test failed: Expected status to be 0, was: 1
CImage.cpp:149: Test failed: Expected a valid bitmap
CImage.cpp:245: Test failed: Expected hr to be S_OK, was: 80004005 (for 2)
CImage.cpp:251: Test failed: Expected hr to be S_OK, was: 80004005 (for 2)
CImage.cpp:254: Test failed: Expected width to be 48, was: 0 (for 2)
CImage.cpp:256: Test failed: Expected height to be 48, was: 0 (for 2)
CImage.cpp:265: Test failed: Expected bpp to be 8, was: 0 (for 2)
CImage.cpp:148: Test failed: Expected status to be 0, was: 1
CImage.cpp:149: Test failed: Expected a valid bitmap
CImage.cpp:260: Test failed: Expected bpp to be 24, was: 32 (for 3)
CImage.cpp:154: Test failed: Expected PixelFormat to be 0x21808, was: 0x30803
CImage.cpp:265: Test failed: Expected bpp to be 8, was: 32 (for 4)
CImage.cpp:154: Test failed: Expected PixelFormat to be 0x30803, was: 0x21808
CImage: 77 tests executed (0 marked as todo, 20 failures), 0 skipped.
================================================================================================================
>CImage.exe
../CImage.cpp (245): Expected hr to be S_OK, was: 80004005 (for 1)
../CImage.cpp (251): Expected hr to be S_OK, was: 80004005 (for 1)
../CImage.cpp (254): Expected width to be 48, was: 0 (for 1)
../CImage.cpp (256): Expected height to be 48, was: 0 (for 1)
../CImage.cpp (265): Expected bpp to be 8, was: 0 (for 1)
../CImage.cpp (148): Expected status to be 0, was: 1
../CImage.cpp (149): Expected a valid bitmap
../CImage.cpp (245): Expected hr to be S_OK, was: 80004005 (for 2)
../CImage.cpp (251): Expected hr to be S_OK, was: 80004005 (for 2)
../CImage.cpp (254): Expected width to be 48, was: 0 (for 2)
../CImage.cpp (256): Expected height to be 48, was: 0 (for 2)
../CImage.cpp (265): Expected bpp to be 8, was: 0 (for 2)
../CImage.cpp (148): Expected status to be 0, was: 1
../CImage.cpp (149): Expected a valid bitmap
../CImage.cpp (260): Expected bpp to be 24, was: 8 (for 3)
../CImage.cpp (154): Expected PixelFormat to be 0x21808, was: 0x30803
../CImage.cpp (265): Expected bpp to be 8, was: 24 (for 4)
../CImage.cpp (154): Expected PixelFormat to be 0x30803, was: 0x21808
CImage: 77 tests executed (0 marked as todo, 18 failures), 0 skipped.
================================================================================================================

View file

@ -1,4 +1,5 @@
add_definitions(-DINITGUID)
set_cpp(WITH_RUNTIME WITH_EXCEPTIONS)
include_directories(${REACTOS_SOURCE_DIR}/sdk/lib/atl)
@ -7,6 +8,7 @@ add_executable(atl_apitest
atltypes.cpp
CComBSTR.cpp
CComHeapPtr.cpp
CImage.cpp
CRegKey.cpp
CString.cpp
testlist.c
@ -14,5 +16,5 @@ add_executable(atl_apitest
target_link_libraries(atl_apitest wine uuid)
set_module_type(atl_apitest win32cui)
add_importlibs(atl_apitest ole32 oleaut32 advapi32 user32 msvcrt kernel32)
add_importlibs(atl_apitest rpcrt4 ole32 oleaut32 msimg32 gdi32 advapi32 user32 msvcrt kernel32)
add_cd_file(TARGET atl_apitest DESTINATION reactos/bin FOR all)

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

View file

@ -9,3 +9,5 @@ BEGIN
IDS_TEST2 "I am a happy BSTR"
END
IDB_ANT BITMAP "ant.bmp"
IDB_CROSS BITMAP "cross.bmp"

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

View file

@ -0,0 +1,28 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.24720.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CImage", "CImage.vcxproj", "{AE520E17-2DAE-40FF-B082-F32A7A935FB2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{AE520E17-2DAE-40FF-B082-F32A7A935FB2}.Debug|x64.ActiveCfg = Debug|x64
{AE520E17-2DAE-40FF-B082-F32A7A935FB2}.Debug|x64.Build.0 = Debug|x64
{AE520E17-2DAE-40FF-B082-F32A7A935FB2}.Debug|x86.ActiveCfg = Debug|Win32
{AE520E17-2DAE-40FF-B082-F32A7A935FB2}.Debug|x86.Build.0 = Debug|Win32
{AE520E17-2DAE-40FF-B082-F32A7A935FB2}.Release|x64.ActiveCfg = Release|x64
{AE520E17-2DAE-40FF-B082-F32A7A935FB2}.Release|x64.Build.0 = Release|x64
{AE520E17-2DAE-40FF-B082-F32A7A935FB2}.Release|x86.ActiveCfg = Release|Win32
{AE520E17-2DAE-40FF-B082-F32A7A935FB2}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View file

@ -0,0 +1,183 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{AE520E17-2DAE-40FF-B082-F32A7A935FB2}</ProjectGuid>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
<Keyword>AtlProj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v120_xp</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<IgnoreImportLibrary>true</IgnoreImportLibrary>
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<IgnoreImportLibrary>true</IgnoreImportLibrary>
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<IgnoreImportLibrary>true</IgnoreImportLibrary>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<IgnoreImportLibrary>true</IgnoreImportLibrary>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
</ClCompile>
<ResourceCompile>
<Culture>0x0409</Culture>
<AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<RegisterOutput>true</RegisterOutput>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_WINDOWS;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
</ClCompile>
<ResourceCompile>
<Culture>0x0409</Culture>
<AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<RegisterOutput>true</RegisterOutput>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
</ClCompile>
<ResourceCompile>
<Culture>0x0409</Culture>
<AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<RegisterOutput>true</RegisterOutput>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<PreprocessorDefinitions>_WINDOWS;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
</ClCompile>
<ResourceCompile>
<Culture>0x0409</Culture>
<AdditionalIncludeDirectories>$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<RegisterOutput>true</RegisterOutput>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="../CImage.cpp">
<RuntimeLibrary Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MultiThreaded</RuntimeLibrary>
<RuntimeLibrary Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MultiThreaded</RuntimeLibrary>
<RuntimeLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">MultiThreadedDebug</RuntimeLibrary>
<RuntimeLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">NotUsing</PrecompiledHeader>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="../atl_apitest.rc" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View file

@ -1,3 +1,6 @@
#define IDS_TEST1 2000
#define IDS_TEST2 2001
#define IDB_ANT 1
#define IDB_CROSS 2

View file

@ -4,6 +4,7 @@
extern void func_atltypes(void);
extern void func_CComBSTR(void);
extern void func_CComHeapPtr(void);
extern void func_CImage(void);
extern void func_CRegKey(void);
extern void func_CString(void);
@ -12,6 +13,7 @@ const struct test winetest_testlist[] =
{ "atltypes", func_atltypes },
{ "CComBSTR", func_CComBSTR },
{ "CComHeapPtr", func_CComHeapPtr },
{ "CImage", func_CImage },
{ "CRegKey", func_CRegKey },
{ "CString", func_CString },
{ 0, 0 }