A very simple program I might say..
#include <windows.h>
#include <gdiplus.h>
using namespace Gdiplus;
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR cmdLine, int nShow){
// Gdiplus variables
GdiplusStartupInput mGdiplusStartupInput;
ULONG_PTR mGdiplusToken;
GdiplusStartup(&mGdiplusToken, &mGdiplusStartupInput, NULL);
Bitmap bitmap(L"left.bmp");
GdiplusShutdown(mGdiplusToken);
return 0;
}
When running this example I get an access violation in GdiplusBitmap.h in this function
inline
Image::~Image()
{
DllExports::GdipDisposeImage(nativeImage);
}
By removing the call to Bitmap bitmap(L"left.bmp");
everything works fine.. I tried to find a simple example on msdn (for instance somewhere near the Bitmap constructor, but didn't find anything.)
What am I missing?