Hi! First of all, sry for my not perfect english
MS Visual Studio 2010 C++, Windows 7 x64, GeForce GTS450.
I cant solve one problem about 2 days.
I wanna create simple 2D game. I trying to use DX11 for it, but understood, that Direct2D will be much better and easy for this task.
The first thing i wanted to try: load bmp file to my window.
I find how to make it here: http://msdn.microsoft.com/en-us/library/windows/desktop/dd756686(v=vs.85).aspx
But when i trying to build solution i get acces violation in adress 0x0000000.
There is part of my code:
IWICImagingFactory *pFactory = NULL; //Creating pointer factory
IWICBitmapDecoder *pDecoder = NULL; //Creating pointer decoder
pFactory->CreateDecoder(GUID_ContainerFormatBmp, &GUID_VendorMicrosoft, &pDecoder); //here is the first AV
pFactory->CreateDecoderFromFilename( //here is the second AV (when i commented line of code above
L"man.bmp",
NULL,
GENERIC_READ,
WICDecodeMetadataCacheOnDemand,
&pDecoder
);
I have one idea why this code dont wanna work: i dont allocating memory for pointer pDecoder. But i saw many examples from MSDN, where teachers didnt do this too. So i totaly cant understand what i doing wrong... i puted file "man.bmp" in many locations, but it didnt helped me too.
Plz, help with any adwice