IHTMLDocument2Ptr error 
Author Message
 IHTMLDocument2Ptr error

Hi,

 I am getting the following error. I have updated Platform
SDK and WTL. I don't know how to cure this problem..

d:\Inverito\src\InvToolbar\EdgarIQBand\BandToolBarCtrl.h
(195): error
C2501: 'CBandToolBarCtrl::IHTMLDocument2Ptr' : missing
storage-class or type specifiers



Mon, 07 Mar 2005 02:38:49 GMT  
 IHTMLDocument2Ptr error
So, what's on line 195 of BandToolBarCtrl.h? Do you have #import
<mshtml.tlb> in this file or somewhere before it is included?
--
With best wishes,
    Igor Tandetnik

"For every complex problem, there is a solution that is simple, neat,
and wrong." H.L. Mencken


Quote:
> Hi,

>  I am getting the following error. I have updated Platform
> SDK and WTL. I don't know how to cure this problem..

> d:\Inverito\src\InvToolbar\EdgarIQBand\BandToolBarCtrl.h
> (195): error
> C2501: 'CBandToolBarCtrl::IHTMLDocument2Ptr' : missing
> storage-class or type specifiers



Mon, 07 Mar 2005 03:04:17 GMT  
 IHTMLDocument2Ptr error

 Thanks. Now I got another error messages. Pls help me. :)

 1> d:\Inverito\src\InvToolbar\EdgarIQBand\ToolBandObj.cpp
(206): error C2440: 'initializing' : cannot convert
from 'ATL::CComPtr<T>' to '_com_ptr_t<_IIID>'
        with
        [
            T=IUnknown
        ]
        and
        [
            _IIID=_com_IIID<IServiceProvider,&
_GUID_6d5140c1_7436_11ce_8034_00aa006009fa>
        ]

 The line 206 is like this.

 IServiceProviderPtr pServiceProvider = m_spUnkSite;//
m_spUnkSite is base class member

 2>
d:\Inverito\src\InvToolbar\EdgarIQBand\BandToolBarCtrl.cpp
(152): error C2664: 'GetModuleFileNameA' : cannot convert
parameter 2 from 'std::vector<_Ty,_Ax>::iterator'
to 'LPSTR'
        with
        [
            _Ty=TCHAR,
            _Ax=std::allocator<char>
        ]

 The line 152 is like this.

  vector<TCHAR> exed(1000);
  ::GetModuleFileName(_Module.GetModuleInstance
(),exed.begin(),1000);

 Thanks,
 Keeyong

Quote:
>-----Original Message-----
>So, what's on line 195 of BandToolBarCtrl.h? Do you have
#import
><mshtml.tlb> in this file or somewhere before it is
included?
>--
>With best wishes,
>    Igor Tandetnik

>"For every complex problem, there is a solution that is
simple, neat,
>and wrong." H.L. Mencken



>> Hi,

>>  I am getting the following error. I have updated
Platform
>> SDK and WTL. I don't know how to cure this problem..

>> d:\Inverito\src\InvToolbar\EdgarIQBand\BandToolBarCtrl.h
>> (195): error
>> C2501: 'CBandToolBarCtrl::IHTMLDocument2Ptr' : missing
>> storage-class or type specifiers

>.



Mon, 07 Mar 2005 04:17:12 GMT  
 IHTMLDocument2Ptr error
1) C++ does not allow two user-defined conversions in a row to be
performed implicitly. And that's what happens when you assign between
two different smart pointers - the compiler needs to convert smart
pointer to raw pointer and back to smart pointer. You need to do one of
those conversions explicitly:

IServiceProviderPtr pServiceProvider = (IUnknown*)m_spUnkSite;

2) vector::iterator used to be a plain pointer, but not anymore. Your
code was never legal C++. Use &exed.front()
--
With best wishes,
    Igor Tandetnik

"For every complex problem, there is a solution that is simple, neat,
and wrong." H.L. Mencken


Quote:

>  Thanks. Now I got another error messages. Pls help me. :)

>  1> d:\Inverito\src\InvToolbar\EdgarIQBand\ToolBandObj.cpp
> (206): error C2440: 'initializing' : cannot convert
> from 'ATL::CComPtr<T>' to '_com_ptr_t<_IIID>'
>         with
>         [
>             T=IUnknown
>         ]
>         and
>         [
>             _IIID=_com_IIID<IServiceProvider,&
> _GUID_6d5140c1_7436_11ce_8034_00aa006009fa>
>         ]

>  The line 206 is like this.

>  IServiceProviderPtr pServiceProvider = m_spUnkSite;//
> m_spUnkSite is base class member

>  2>
> d:\Inverito\src\InvToolbar\EdgarIQBand\BandToolBarCtrl.cpp
> (152): error C2664: 'GetModuleFileNameA' : cannot convert
> parameter 2 from 'std::vector<_Ty,_Ax>::iterator'
> to 'LPSTR'
>         with
>         [
>             _Ty=TCHAR,
>             _Ax=std::allocator<char>
>         ]

>  The line 152 is like this.

>   vector<TCHAR> exed(1000);
>   ::GetModuleFileName(_Module.GetModuleInstance
> (),exed.begin(),1000);

>  Thanks,
>  Keeyong

> >-----Original Message-----
> >So, what's on line 195 of BandToolBarCtrl.h? Do you have
> #import
> ><mshtml.tlb> in this file or somewhere before it is
> included?
> >--
> >With best wishes,
> >    Igor Tandetnik

> >"For every complex problem, there is a solution that is
> simple, neat,
> >and wrong." H.L. Mencken



> >> Hi,

> >>  I am getting the following error. I have updated
> Platform
> >> SDK and WTL. I don't know how to cure this problem..

> >> d:\Inverito\src\InvToolbar\EdgarIQBand\BandToolBarCtrl.h
> >> (195): error
> >> C2501: 'CBandToolBarCtrl::IHTMLDocument2Ptr' : missing
> >> storage-class or type specifiers

> >.



Mon, 07 Mar 2005 04:32:16 GMT  
 IHTMLDocument2Ptr error

 You are a genius. ^^

 Keeyong

Quote:
>-----Original Message-----
>1) C++ does not allow two user-defined conversions in a
row to be
>performed implicitly. And that's what happens when you
assign between
>two different smart pointers - the compiler needs to
convert smart
>pointer to raw pointer and back to smart pointer. You
need to do one of
>those conversions explicitly:

>IServiceProviderPtr pServiceProvider = (IUnknown*)
m_spUnkSite;

>2) vector::iterator used to be a plain pointer, but not
anymore. Your
>code was never legal C++. Use &exed.front()
>--
>With best wishes,
>    Igor Tandetnik

>"For every complex problem, there is a solution that is
simple, neat,
>and wrong." H.L. Mencken



>>  Thanks. Now I got another error messages. Pls help
me. :)

>>  1>

d:\Inverito\src\InvToolbar\EdgarIQBand\ToolBandObj.cpp

- Show quoted text -

Quote:
>> (206): error C2440: 'initializing' : cannot convert
>> from 'ATL::CComPtr<T>' to '_com_ptr_t<_IIID>'
>>         with
>>         [
>>             T=IUnknown
>>         ]
>>         and
>>         [
>>             _IIID=_com_IIID<IServiceProvider,&
>> _GUID_6d5140c1_7436_11ce_8034_00aa006009fa>
>>         ]

>>  The line 206 is like this.

>>  IServiceProviderPtr pServiceProvider = m_spUnkSite;//
>> m_spUnkSite is base class member

>>  2>

d:\Inverito\src\InvToolbar\EdgarIQBand\BandToolBarCtrl.cpp

- Show quoted text -

Quote:
>> (152): error C2664: 'GetModuleFileNameA' : cannot
convert
>> parameter 2 from 'std::vector<_Ty,_Ax>::iterator'
>> to 'LPSTR'
>>         with
>>         [
>>             _Ty=TCHAR,
>>             _Ax=std::allocator<char>
>>         ]

>>  The line 152 is like this.

>>   vector<TCHAR> exed(1000);
>>   ::GetModuleFileName(_Module.GetModuleInstance
>> (),exed.begin(),1000);

>>  Thanks,
>>  Keeyong

>> >-----Original Message-----
>> >So, what's on line 195 of BandToolBarCtrl.h? Do you
have
>> #import
>> ><mshtml.tlb> in this file or somewhere before it is
>> included?
>> >--
>> >With best wishes,
>> >    Igor Tandetnik

>> >"For every complex problem, there is a solution that is
>> simple, neat,
>> >and wrong." H.L. Mencken



>> >> Hi,

>> >>  I am getting the following error. I have updated
>> Platform
>> >> SDK and WTL. I don't know how to cure this problem..

d:\Inverito\src\InvToolbar\EdgarIQBand\BandToolBarCtrl.h

- Show quoted text -

Quote:
>> >> (195): error
>> >> C2501: 'CBandToolBarCtrl::IHTMLDocument2Ptr' :
missing
>> >> storage-class or type specifiers

>> >.

>.



Mon, 07 Mar 2005 05:52:34 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. IHTMLDocument2Ptr Compile Error

2. error, error, error !!!

3. fatal error C1001: INTERNAL COMPILER ERROR

4. fatal error C1001: INTERNAL COMPILER ERROR

5. vs.net + lnk2019 error +lnk 1120 error

6. fatal error C1001: INTERNAL COMPILER ERROR

7. fatal error C1001: INTERNAL COMPILER ERROR

8. fatal error C1001: INTERNAL COMPILER ERROR

9. Error C2061: Syntax Error

10. Compiler Error: tool returned an error

11. LINK : fatal error LNK1000: unknown error

12. LINK : fatal error LNK1000: Internal error during BuildImage

 

 
Powered by phpBB® Forum Software