Click here to Skip to main content
15,911,896 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRead one struct,write to another struct. Pin
Anu_Bala18-May-08 19:23
Anu_Bala18-May-08 19:23 
AnswerRe: Read one struct,write to another struct. Pin
chandu00418-May-08 19:49
chandu00418-May-08 19:49 
AnswerRe: Read one struct,write to another struct. Pin
Rajkumar R18-May-08 21:08
Rajkumar R18-May-08 21:08 
Question[RESOLVED]Creating Toolbar [modified] Pin
Priya_Sundar18-May-08 18:58
Priya_Sundar18-May-08 18:58 
AnswerRe: Creating Toolbar Pin
ShilpiP18-May-08 19:53
ShilpiP18-May-08 19:53 
AnswerRe: Creating Toolbar Pin
Rajkumar R18-May-08 20:53
Rajkumar R18-May-08 20:53 
General[RESOLVED]: Thanks Pin
Priya_Sundar19-May-08 0:57
Priya_Sundar19-May-08 0:57 
QuestionHow to return COM object? Pin
RYU^^18-May-08 18:13
RYU^^18-May-08 18:13 
Hi,

I tried to return an interface but it gave me this error:
Unable to cast COM object of type 'MyTestLib.MainTestClass' to interface type 'MyTestLib.IMainTest '. This operation failed because the QueryInterface call on the COM component for the interface with IID '{519A413A-2792-4021-847F-B7C205FFE057}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).

Any idea why?

Here is my IDL:
import "oaidl.idl";
import "ocidl.idl";

[ object, uuid(EC23249E-2891-4f06-9D6E-77895E74448F) ] interface IAdd : IUnknown
{
    HRESULT     SetFirstNumber(long nX1);
    HRESULT     SetSecondNumber(long nX2);
    HRESULT     DoTheAddition([out,retval] long *pBuffer);
};

[ object, uuid(519A413A-2792-4021-847F-B7C205FFE057) ] interface IMainTest : IUnknown
{
    HRESULT     GetAddObject([out,retval] IAdd **ppObj);
};

[ uuid(AA484B10-6099-4e37-AEE3-8B4ADFBE2815) ] library MyTestLib
{
    importlib("stdole32.tlb");

    [ uuid(82B76786-E89B-4e42-8C50-B7916FEC1ADC) ]
    coclass AddClass
    {
        [default] interface IAdd;
    }

    [ uuid(E76E5E58-F9D9-4570-AEC5-79A72E8E8743) ]
    coclass MainTestClass
    {
        [default] interface IMainTest;
    }
};


Thanks for any help Smile | :)
AnswerRe: How to return COM object? Pin
RYU^^18-May-08 20:15
RYU^^18-May-08 20:15 
Questioninteger value in editbox Pin
Mohanraj D18-May-08 18:12
Mohanraj D18-May-08 18:12 
AnswerRe: integer value in editbox Pin
Hamid_RT18-May-08 18:17
Hamid_RT18-May-08 18:17 
GeneralRe: integer value in editbox Pin
Mohanraj D18-May-08 19:07
Mohanraj D18-May-08 19:07 
GeneralRe: integer value in editbox Pin
Hamid_RT18-May-08 19:17
Hamid_RT18-May-08 19:17 
GeneralRe: integer value in editbox Pin
Mohanraj D18-May-08 19:31
Mohanraj D18-May-08 19:31 
AnswerRe: integer value in editbox Pin
Paresh Chitte18-May-08 19:07
Paresh Chitte18-May-08 19:07 
GeneralRe: integer value in editbox Pin
Mohanraj D18-May-08 19:27
Mohanraj D18-May-08 19:27 
GeneralRe: integer value in editbox Pin
Paresh Chitte18-May-08 19:54
Paresh Chitte18-May-08 19:54 
GeneralRe: integer value in editbox Pin
Hamid_RT18-May-08 20:10
Hamid_RT18-May-08 20:10 
GeneralRe: integer value in editbox Pin
Hamid_RT18-May-08 20:34
Hamid_RT18-May-08 20:34 
GeneralRe: integer value in editbox Pin
Rajkumar R18-May-08 21:15
Rajkumar R18-May-08 21:15 
GeneralRe: integer value in editbox Pin
Cedric Moonen18-May-08 21:18
Cedric Moonen18-May-08 21:18 
JokeRe: integer value in editbox Pin
Rajesh R Subramanian18-May-08 21:37
professionalRajesh R Subramanian18-May-08 21:37 
GeneralRe: integer value in editbox Pin
CPallini18-May-08 22:09
mveCPallini18-May-08 22:09 
GeneralRe: integer value in editbox Pin
David Crow19-May-08 4:34
David Crow19-May-08 4:34 
GeneralRe: integer value in editbox Pin
David Crow19-May-08 4:35
David Crow19-May-08 4:35 

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.