Click here to Skip to main content
15,903,175 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionOverflow check on integer multiplication in C ? Pin
Hans9999-Jul-19 2:01
Hans9999-Jul-19 2:01 
AnswerRe: Overflow check on integer multiplication in C ? Pin
Daniel Pfeffer9-Jul-19 3:10
professionalDaniel Pfeffer9-Jul-19 3:10 
AnswerRe: Overflow check on integer multiplication in C ? Pin
Joe Woodbury9-Jul-19 7:41
professionalJoe Woodbury9-Jul-19 7:41 
AnswerRe: Overflow check on integer multiplication in C ? Pin
leon de boer10-Jul-19 3:35
leon de boer10-Jul-19 3:35 
GeneralRe: Overflow check on integer multiplication in C ? Pin
CPallini10-Jul-19 4:57
mveCPallini10-Jul-19 4:57 
SuggestionI have created a Wrapper but while calling a function from C# its moving to my Lib file and giving below error andy solution? Pin
Member 143147593-Jul-19 22:14
Member 143147593-Jul-19 22:14 
GeneralRe: I have created a Wrapper but while calling a function from C# its moving to my Lib file and giving below error andy solution? Pin
leon de boer4-Jul-19 2:39
leon de boer4-Jul-19 2:39 
Question"crosslinking " - different architecture libraries - is is possible? Pin
Vaclav_1-Jul-19 10:54
Vaclav_1-Jul-19 10:54 
AnswerRe: "crosslinking " - different architecture libraries - is is possible? Pin
Richard MacCutchan1-Jul-19 20:56
mveRichard MacCutchan1-Jul-19 20:56 
AnswerRe: "crosslinking " - different architecture libraries - is is possible? Pin
leon de boer2-Jul-19 5:03
leon de boer2-Jul-19 5:03 
QuestionCreated .Dll from and .ocx using C++/CLI but interop is not loading in C# Pin
Member 143147591-Jul-19 3:16
Member 143147591-Jul-19 3:16 
QuestionReturn From DoModal with RadioButton Pin
ForNow30-Jun-19 4:50
ForNow30-Jun-19 4:50 
AnswerRe: Return From DoModal with RadioButton Pin
Victor Nijegorodov30-Jun-19 6:43
Victor Nijegorodov30-Jun-19 6:43 
AnswerRe: Return From DoModal with RadioButton Pin
Randor 30-Jun-19 7:13
professional Randor 30-Jun-19 7:13 
GeneralRe: Return From DoModal with RadioButton Pin
ForNow30-Jun-19 7:53
ForNow30-Jun-19 7:53 
GeneralRe: Return From DoModal with RadioButton Pin
Randor 30-Jun-19 8:08
professional Randor 30-Jun-19 8:08 
GeneralRe: Return From DoModal with RadioButton Pin
ForNow30-Jun-19 9:43
ForNow30-Jun-19 9:43 
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
ForNow30-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
Victor 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
Member 1449956328-Jun-19 5:58 
AnswerRe: HRESULT variable returning negative value Pin
jeron128-Jun-19 6:15
jeron128-Jun-19 6:15 
GeneralRe: HRESULT variable returning negative value Pin
Member 1449956328-Jun-19 6:57
Member 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:

C++
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:

C++
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

C++
hr=-2147221164


What could be happening with this variable
C++
hr
if all variables/pointers are initialized and the server/COM Object is well registered with its CLSID for a Win32 app target?

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.