folowing "What's a Creel?"s tutorial: Can't create a IWICBitmapDecoder, in visual studio 2015 : I've been following "what's a Creel?"'s tutorial for direct 2d. i got to tutorial 8: 'Loading an image'. I didn't have the `spritesheet` object save the pointer to the `Graphics` object as this caused problems with this version of visual studio, so it's passed every time something needing it is called. main point: when i try creating a `IWICBitmapDecoder` with the `wicfactory->CreateDecoderFromFile()` method, i get the following error:

Exception thrown at 0x008C70A7 in Project8.exe: 0xC0000005: Access violation reading location 0x00000000.

and in the Autos i get:


`hr         | E_NOINTERFACE No such interface supported.
this       | 0x00c1a5c8 {bmp=0x00000000 <NULL> }	spritesheet *
wicfactory | 0x00000000<NULL>
wicdecoder | 0xcccccccc{...}`

the code being this:

    #pragma once

    #include <wincodec.h>	//include windowscodecs.lib in the linker input
    #include "Graphics.h"
    #include <d2d1.h>
    #include<string>

    class spritesheet {
    public:
	
	    ID2D1Bitmap* bmp;
    	spritesheet() {}

	    spritesheet(LPCWSTR file, graphics* gfx) {
	    	//this->gfx = gfx;
		    //bmp = NULL;
	    	HRESULT hr;
	    	//create an image factory
	    	IWICImagingFactory *wicFactory;
	    	hr = CoCreateInstance(
		    	CLSID_WICImagingFactory,
	    		NULL,
	    		CLSCTX_INPROC_SERVER,
	    		CLSID_WICImagingFactory,
	    		(LPVOID*)&wicFactory
	    		);

	    	//create a decoder
	    	IWICBitmapDecoder *wicdecoder;
	    	hr = wicFactory->CreateDecoderFromFilename(
	    		file,
	    		NULL,
	    		GENERIC_READ,
	    		WICDecodeMetadataCacheOnLoad,
	    		&wicdecoder
	    		);
	    	IWICBitmapFrameDecode* wicframe = NULL;
	    	hr = wicdecoder->GetFrame(0, &wicframe);

	    	IWICFormatConverter *wicconverter = NULL;
	    	hr = wicFactory->CreateFormatConverter(&wicconverter);

	    	hr = wicconverter->Initialize(
	    		wicframe,
	    		GUID_WICPixelFormat32bppPBGRA,
	    		WICBitmapDitherTypeNone,
	    		NULL,
	    		0.0,
		    	WICBitmapPaletteTypeCustom
		    	);

		    gfx->gettarget()->CreateBitmapFromWicBitmap(
		    	wicconverter,
		    	NULL,
		    	&bmp
		    	);

	    	if (wicdecoder) wicdecoder->Release();
	    	if (wicFactory) wicFactory->Release();
	    	if (wicconverter) wicconverter->Release();
	    	if (wicframe) wicframe->Release();
  
	    }

	    void init(wchar_t * file, graphics * gfx) {
    		//this->gfx = gfx;
	    	//bmp = NULL;
	    	HRESULT hr;
	    	//create an image factory
	    	IWICImagingFactory* wicFactory;
    		hr = CoCreateInstance(
	    		CLSID_WICImagingFactory,
	    		NULL,
	    		CLSCTX_INPROC_SERVER,
	    		CLSID_WICImagingFactory,
		    	(LPVOID*)&wicFactory
		    	);

	    	//create a decoder
	    	IWICBitmapDecoder* wicdecoder;
	     	hr = wicFactory->CreateDecoderFromFilename(
	    		file,
	    		NULL,
	    		GENERIC_READ,
		    	WICDecodeMetadataCacheOnLoad,
		    	&wicdecoder
		    	);

	    	IWICBitmapFrameDecode* wicframe = NULL;
	    	hr = wicdecoder->GetFrame(0, &wicframe);

	    	IWICFormatConverter *wicconverter = NULL;
		    hr = wicFactory->CreateFormatConverter(&wicconverter);

		    hr = wicconverter->Initialize(
	    		wicframe,
	    		GUID_WICPixelFormat32bppPBGRA,
	    		WICBitmapDitherTypeNone,
		    	NULL,
		    	0.0,
		    	WICBitmapPaletteTypeCustom
		    	);

	    	gfx->rendertarget->CreateBitmapFromWicBitmap(
	    		wicconverter,
	    		NULL,
	    		&bmp
	     		);

		    if (wicdecoder) wicdecoder->Release();
	    	if (wicFactory) wicFactory->Release();
	    	if (wicconverter) wicconverter->Release();
	    	if (wicframe) wicframe->Release();
 
	    	gfx->rendertarget->DrawBitmap(
	    		bmp,
		    	D2D1::RectF(0.0f, 0.0f, 10, 10),		//dest rect
		    	1.0f,
			     D2D1_BITMAP_INTERPOLATION_MODE::D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR,  //effect for scaling
			D2D1::RectF(0, 0, 10, 10));				//scource rect


	}


	void draw(graphics *gfx) {
		gfx->rendertarget->DrawBitmap(
			bmp,
			D2D1::RectF(0.0f, 0.0f, 10, 10),		//dest rect
			1.0f,
			D2D1_BITMAP_INTERPOLATION_MODE::D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR,  //effect for scaling
		    D2D1::RectF(0, 0, 10, 10));				//scource rect

	    }
    };

now, just to test things, i did put a `ID2D1Bitmap* bmp;` at the start of each method just to see where things got, but the `wicdecoder` error message just changed to a random place in memory. if anyone has ether done this, or followed some other tutorial, or done it on their own, and has been successful, please help. 