First of all, code is from MSDN. http://msdn.microsoft.com/en-us/library/windows/desktop/dd756686(v=vs.85).aspx
They creating pointers without memory allocation then using CreateDecoderFromFilename function. When i buildling project, i geting error: access Violation reading "0x00000000".
I cant beat this... plz help!
You set pFactory to NULL and tried to call methods through it. Other than an access violation, I am not sure what you expected to happen. The MSDN page you linked to does not initialize pFactory to NULL, but assumes you already have a valid pointer to the Factory object.
Thank you! i thought about that... i tried it, but problem didnt went away =(
Now i need to create IWICBitmapDecoder from my pointer.
Can somebody help me with it? I cant find in MSDN any answer(((
I tried this: CoCreateInstance(CLSID_WICBmpDecoder, NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&pDecoder));
but still accees violation ...
Sadly, i cant say here what i think about this... sheet)
Well, did the call to CoCreateInstance(...) succeed? If it did not, what error value did CoCreateInstance return? The only reason I can think CoCreateInstance would fail in this case is that you did not initialize the COM library with a call to CoInitializeEx before calling CoCreateInstance.
Well, did the call to CoCreateInstance(...) succeed? If it did not, what error value did CoCreateInstance return? The only reason I can think CoCreateInstance would fail in this case is that you did not initialize the COM library with a call to CoInitializeEx before calling CoCreateInstance.
Oh! Well, it is nice idea, i will try it.
But description of CoInitializeEx on MSDN pwnd me hard... i am too low for understandig it fast =(
Thx for adwices! =)