Click here to Skip to main content
15,900,378 members
Home / Discussions / COM
   

COM

 
QuestionHow to pass string from C# to C++ (COM) Pin
Stevo Z18-Apr-07 0:16
Stevo Z18-Apr-07 0:16 
AnswerRe: How to pass string from C# to C++ (COM) Pin
Sujit Gupta18-Apr-07 8:03
Sujit Gupta18-Apr-07 8:03 
AnswerRe: How to pass string from C# to C++ (COM) Pin
sthotakura18-Apr-07 8:25
sthotakura18-Apr-07 8:25 
AnswerRe: How to pass string from C# to C++ (COM) Pin
CPallini18-Apr-07 21:59
mveCPallini18-Apr-07 21:59 
AnswerRe: How to pass string from C# to C++ (COM) Pin
lafleon19-Apr-07 13:22
lafleon19-Apr-07 13:22 
QuestionWhat type of attribute ? Pin
Stevo Z17-Apr-07 0:12
Stevo Z17-Apr-07 0:12 
AnswerRe: What type of attribute ? Pin
sthotakura18-Apr-07 8:49
sthotakura18-Apr-07 8:49 
Questionhr = CoInitialize(NULL); return S_FALSE Pin
amitmistry_petlad 16-Apr-07 23:31
amitmistry_petlad 16-Apr-07 23:31 
In my application I got hr=S_FALSE.

at the end of function retun the green color turned error
give the following error and ask about break or continue the application.
on mouse move on green arrow got following ?

The code has called into another function.when that function is finished, this is the next statement that will be executed.

<br />
<br />
HRESULT Encoder ::  ListSystemProfileForEnocder(HWND hFromEncodeProFile)<br />
 {<br />
<br />
<br />
   HRESULT hr;<br />
    IWMEncoder* pEncoder;<br />
    IWMEncProfileCollection* pProColl;<br />
    IWMEncProfile* pPro;<br />
    long lCount;<br />
    int i;<br />
<br />
// Initialize the COM library and retrieve a pointer<br />
// to an IWMEncoder interface.<br />
    hr = CoInitialize(NULL); <BIG>Return S_FALSE </BIG><br />
	/*if(FAIL(hr))<br />
	{<br />
		Message(0,L("HANDLE RETUNR FAIL"),L("HANDLE RETURN FAIL"),0);<br />
	}*/<br />
    if ( SUCCEEDED( hr ) )<br />
    {<br />
        hr = CoCreateInstance(CLSID_WMEncoder,<br />
                          NULL,<br />
                          CLSCTX_INPROC_SERVER,<br />
                          IID_IWMEncoder,<br />
                          (void**) &pEncoder);<br />
    }<br />
<br />
// Choose a profile from the collection.<br />
    if ( SUCCEEDED( hr ) )<br />
    {<br />
        hr = pEncoder->get_ProfileCollection(&pProColl);<br />
    }<br />
    if ( SUCCEEDED( hr ) )<br />
    {<br />
        hr = pProColl->get_Count(&lCount);<br />
    }<br />
<br />
    // Loop through the profiles and display the names.<br />
     for (i=0; i<lCount; i++)<br />
    {<br />
        CComBSTR bstrName = NULL;<br />
        if ( SUCCEEDED( hr ) )<br />
        {<br />
            hr = pProColl->Item(i, &pPro);<br />
        }<br />
        if ( SUCCEEDED( hr ) )<br />
        {<br />
            hr = pPro->get_Name(&bstrName);<br />
        }<br />
        //wprintf(CComBSTR("%s \n"), bstrName);<br />
<br />
		SendMessage(hFromEncodeProFile,CB_ADDSTRING,i,reinterpret_cast<LPARAM>((LPCTSTR)bstrName));<br />
<br />
     }<br />
<br />
    // Release pointers.<br />
    if ( pProColl )<br />
    {<br />
        pProColl->Release();<br />
        pProColl = NULL;<br />
    }<br />
    if ( pPro )<br />
    {<br />
        pPro->Release();<br />
        pPro = NULL;<br />
    }<br />
      if ( pEncoder )<br />
    {<br />
        pEncoder->Release();<br />
        pEncoder = NULL;<br />
    }<br />
	<br />
	return( hr );	<br />
<br />
 } ///// here in the grrn arrow break the application and when mouse move on the arrow give :<br />
<br />
The code has called into another function.when that function is finished, this is the next statement that will be executed. <br />
<br />



"Success lies not in the result , But in the efforts !!!!!"
Amit Mistry - petlad -Gujarat-India

AnswerRe: hr = CoInitialize(NULL); return S_FALSE Pin
Roger Stoltz17-Apr-07 3:13
Roger Stoltz17-Apr-07 3:13 
GeneralRe: hr = CoInitialize(NULL); return S_FALSE Pin
amitmistry_petlad 17-Apr-07 3:22
amitmistry_petlad 17-Apr-07 3:22 
QuestionCDO internalization issue. Help! Pin
Lane Yu16-Apr-07 22:20
Lane Yu16-Apr-07 22:20 
QuestionCOM DLL Server help Pin
Touseef Afzal15-Apr-07 20:40
Touseef Afzal15-Apr-07 20:40 
QuestionRe: COM DLL Server help Pin
sthotakura16-Apr-07 7:27
sthotakura16-Apr-07 7:27 
AnswerRe: COM DLL Server help Pin
Touseef Afzal16-Apr-07 19:03
Touseef Afzal16-Apr-07 19:03 
AnswerRe: COM DLL Server help Pin
sthotakura16-Apr-07 21:07
sthotakura16-Apr-07 21:07 
GeneralRe: COM DLL Server help Pin
Touseef Afzal26-Apr-07 21:42
Touseef Afzal26-Apr-07 21:42 
GeneralRe: COM DLL Server help Pin
Janma20-Apr-07 1:22
Janma20-Apr-07 1:22 
QuestionPreventing Broadcasting from a Singleton Com Server EXE Pin
georgekjolly15-Apr-07 18:55
georgekjolly15-Apr-07 18:55 
QuestionInstall ActiveX for IE by Setup ? Pin
Jan.Seiffert12-Apr-07 22:56
Jan.Seiffert12-Apr-07 22:56 
Questionsetup Pin
gnanavelu12-Apr-07 19:58
gnanavelu12-Apr-07 19:58 
QuestionHow To Load Google Toolbar For Dialog?? Pin
MyNothing12-Apr-07 7:10
MyNothing12-Apr-07 7:10 
Questionproblem using msxml in services - using webdav method Pin
ArunkumarSundaravelu12-Apr-07 6:31
ArunkumarSundaravelu12-Apr-07 6:31 
QuestionNot able to add COM DLL reference in VB 6.0 Pin
VinuC12-Apr-07 1:03
VinuC12-Apr-07 1:03 
QuestionRe: Not able to add COM DLL reference in VB 6.0 Pin
sthotakura12-Apr-07 5:52
sthotakura12-Apr-07 5:52 
AnswerRe: Not able to add COM DLL reference in VB 6.0 Pin
VinuC12-Apr-07 18:44
VinuC12-Apr-07 18:44 

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.