Click here to Skip to main content
14,663,929 members
Home » Discussions » C / C++ / MFC
   

C / C++ / MFC

 
PraiseRe: Return From DoModal with RadioButton Pin
Randor 30-Jun-19 14:22
professional Randor 30-Jun-19 14:22 
GeneralRe: Return From DoModal with RadioButton Pin
ForNow30-Jun-19 16:24
MemberForNow30-Jun-19 16:24 
AnswerRe: Return From DoModal with RadioButton Pin
Randor 30-Jun-19 17:34
professional Randor 30-Jun-19 17:34 
GeneralRe: Return From DoModal with RadioButton Pin
Victor Nijegorodov30-Jun-19 21:37
MemberVictor Nijegorodov30-Jun-19 21:37 
GeneralRe: Return From DoModal with RadioButton Pin
Randor 30-Jun-19 22:38
professional Randor 30-Jun-19 22:38 
QuestionHRESULT variable returning negative value Pin
Member 1449956328-Jun-19 5:58
MemberMember 1449956328-Jun-19 5:58 
AnswerRe: HRESULT variable returning negative value Pin
jeron128-Jun-19 6:15
Memberjeron128-Jun-19 6:15 
GeneralRe: HRESULT variable returning negative value Pin
Member 1449956328-Jun-19 6:57
MemberMember 1449956328-Jun-19 6:57 
Hey, thank you very much for that fast reply.

I saw that discussion and I see all those errors are related to a poor server registration. In my case, I double checked that my server is registered when I was doing some debugging. If you see the paths provided in the sources there is certainly something like this:

REGEDIT
 HKEY_CLASSES_ROOT\Codeproject.Component.1 = 
            Codeproject Component Version 1.0
 HKEY_CLASSES_ROOT\Codeproject.Component.1\CLSID = 
            {49BF12F1-5041-48da-9B44-AA2FAA63AEFB}
 HKEY_CLASSES_ROOT\Codeproject.Component = Codeproject Component 
 HKEY_CLASSES_ROOT\Codeproject.Component\CurVer = Codeproject.Component.1
 HKEY_CLASSES_ROOT\CLSID\{49BF12F1-5041-48da-9B44-AA2FAA63AEFB} = 
            Codeproject Component 1.0
 HKEY_CLASSES_ROOT\CLSID\{49BF12F1-5041-48da-9B44-AA2FAA63AEFB}\InprocServer32 = 
            c:\codeproject\component.dll
 HKEY_CLASSES_ROOT\CLSID\{49BF12F1-5041-48da-9B44-AA2FAA63AEFB}\ProgID = 
            Codeproject.Component.1
 HKEY_CLASSES_ROOT\CLSID\{49BF12F1-5041-48da-9B44-AA2FAA63AEFB}\
            VersionIndependentProgID = Codeproject.Component


All my entries are OK with my server registered so I suppose the problem is somewhere but I can't find it because my lack of expertise. Looking at the MSDN/documentation the value expected should be one of these:

S_OK
Location and connection to the specified class object was successful.

REGDB_E_CLASSNOTREG
The CLSID is not properly registered. This error can also indicate that the value you specified in dwClsContext is not in the registry.

E_NOINTERFACE
Either the object pointed to by ppv does not support the interface identified by riid, or the QueryInterface operation on the class object returned E_NOINTERFACE.

REGDB_E_READREGDB
There was an error reading the registration database.

CO_E_DLLNOTFOUND
Either the in-process DLL or handler DLL was not found (depending on the context).

CO_E_APPNOTFOUND
The executable (.exe) was not found (CLSCTX_LOCAL_SERVER only).

E_ACCESSDENIED
There was a general access failure on load.

CO_E_ERRORINDLL
There is an error in the executable image.

CO_E_APPDIDNTREG
The executable was launched, but it did not register the class object (and it may have shut down).


and not that negative value

hr=-2147221164


What could be happening with this variable
hr
if all variables/pointers are initialized and the server/COM Object is well registered with its CLSID for a Win32 app target?
AnswerRe: HRESULT variable returning negative value Pin
Victor Nijegorodov28-Jun-19 7:42
MemberVictor Nijegorodov28-Jun-19 7:42 
GeneralRe: HRESULT variable returning negative value Pin
Member 1449956328-Jun-19 8:48
MemberMember 1449956328-Jun-19 8:48 
GeneralRe: HRESULT variable returning negative value Pin
Richard MacCutchan29-Jun-19 7:23
mveRichard MacCutchan29-Jun-19 7:23 
GeneralRe: HRESULT variable returning negative value Pin
jschell30-Jun-19 7:14
Memberjschell30-Jun-19 7:14 
GeneralRe: HRESULT variable returning negative value Pin
Richard MacCutchan30-Jun-19 10:14
mveRichard MacCutchan30-Jun-19 10:14 
AnswerRe: HRESULT variable returning negative value Pin
Stefan_Lang30-Jun-19 22:09
mveStefan_Lang30-Jun-19 22:09 
PraiseRe: HRESULT variable returning negative value Pin
Member 144995631-Jul-19 4:05
MemberMember 144995631-Jul-19 4:05 
GeneralRe: HRESULT variable returning negative value Pin
Stefan_Lang1-Jul-19 21:31
mveStefan_Lang1-Jul-19 21:31 
GeneralRe: HRESULT variable returning negative value Pin
Member 144995632-Jul-19 6:29
MemberMember 144995632-Jul-19 6:29 
QuestionHook stops application Pin
Mark_G0027-Jun-19 5:34
MemberMark_G0027-Jun-19 5:34 
AnswerRe: Hook stops application Pin
leon de boer27-Jun-19 7:13
Memberleon de boer27-Jun-19 7:13 
GeneralRe: Hook stops application Pin
Mark_G0028-Jun-19 3:23
MemberMark_G0028-Jun-19 3:23 
GeneralRe: Hook stops application Pin
Victor Nijegorodov28-Jun-19 4:50
MemberVictor Nijegorodov28-Jun-19 4:50 
GeneralRe: Hook stops application Pin
Mark_G0028-Jun-19 6:41
MemberMark_G0028-Jun-19 6:41 
GeneralRe: Hook stops application Pin
Victor Nijegorodov28-Jun-19 7:45
MemberVictor Nijegorodov28-Jun-19 7:45 
GeneralRe: Hook stops application Pin
Mark_G0028-Jun-19 9:03
MemberMark_G0028-Jun-19 9:03 
GeneralRe: Hook stops application Pin
leon de boer28-Jun-19 20:59
Memberleon de boer28-Jun-19 20:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.