Home > Software engineering >  D2D create IWICImagingFactory always returns null pointer online, etc., nasty: :> _ <: :
D2D create IWICImagingFactory always returns null pointer online, etc., nasty: :> _ <: :

Time:10-06

Experts, the code is as follows:
CoInitialize (NULL);
The CoCreateInstance (
CLSID_WICImagingFactory,
Nullptr,
CLSCTX_INPROC_SERVER,
IID_IWICImagingFactory,
(LPVOID *) & amp; M_pWicImagingFactory
);

CoCreateInstance create failure, m_pWicImagingFactory address returns have been empty, why? How to solve?

CodePudding user response:

CoCreateInstance return values are: REGDB_E_CLASSNOTREG Class not registered but what should it do,,,

CodePudding user response:

The corresponding com components registered in the system, using regsvr32 register

CodePudding user response:

Look from the error information is registered

CodePudding user response:

refer to the second floor oyljerry response:
the corresponding com components registered in the system, using regsvr32 register


Register the ah? I am a Windows 7 system, registration which OCX or DLL?

Check a lot of information, the said registration, registration, and the great god, please give details,

CodePudding user response:

@ oyljerry @ to the appointed day moderator a great god, the problem such as upstairs and called for help

CodePudding user response:

Refer to http://jingyan.baidu.com/article/c910274bfea203cd361d2db9.html

CodePudding user response:

refer to 6th floor xianglitian response:
http://jingyan.baidu.com/article/c910274bfea203cd361d2db9.html


There is also a situation is, the same code, VS2013 returns null pointer, but it can be used, VS2010 this situation what can prompt? (my operating system is Windows 7 SP1 64 - bit)

CodePudding user response:

refer to 6th floor xianglitian response:
http://jingyan.baidu.com/article/c910274bfea203cd361d2db9.html


Installation method of reference comdlg32. Ocx registration, but still without any change in the vs2013, same problem, the great god, do how?
@ to the appointed day @ oyljerry

CodePudding user response:

refer to the eighth floor wyzwzwd response:
Quote: refer to the sixth floor xianglitian response:

Refer to http://jingyan.baidu.com/article/c910274bfea203cd361d2db9.html


Installation method of reference comdlg32. Ocx registration, but still without any change in the vs2013, same problem, the great god, do how?
@ to the appointed day @ oyljerry
Don't use
2013

CodePudding user response:

references 9 f xianglitian response:
Quote: refer to the eighth floor wyzwzwd response:

Quote: refer to the sixth floor xianglitian response:

Refer to http://jingyan.baidu.com/article/c910274bfea203cd361d2db9.html


Installation method of reference comdlg32. Ocx registration, but still without any change in the vs2013, same problem, the great god, do how?
@ to the appointed day @ oyljerry
don't use 2013


I think I will cry, I cried... Project requirement VS2013, god, save me!

CodePudding user response:

refer to 7th floor wyzwzwd response:
Quote: refer to the sixth floor xianglitian response:

Refer to http://jingyan.baidu.com/article/c910274bfea203cd361d2db9.html


There is also a situation is, the same code, VS2013 returns null pointer, but it can be used, VS2010 this situation what can prompt? (my operating system is Windows 7 SP1 64)

Look at the engineering properties are the same, if not the project is set to 2013 and 2010

CodePudding user response:

Vs2013 to define CLSID_WICImagingFactory look, there are two, guid,
2010 is right, just use the 1 2013

CodePudding user response:

Two versus using Windows SDK

CodePudding user response:

In a 64 - bit Windows:
64 exe and DLL in the directory c: \ Windows \ sys tem32 directory.
32 bit exe and DLL in the directory c: \ Windows \ sys wow64 directory.
So pay attention to:
In win64 system registered under 32-bit ocx DLL to 32 ocx or copy the DLL to the c: \ Windows \ syswow64 \ directory,
And registered to c: \ Windows \ syswow64 \ regsvr32 XXXXXXX ocx or DLL