????? ??????? ????????? ????? #import ??? ???? ?????? ??? ?????? ?????? ActiveX (ADO) ?? Visual C++

?????? ????????? ?????? ?????????
???? ???????: 177425 - ??? ???????? ???? ????? ????? ??? ???????.
??? ????? ??? ???????. ????? "??? ??" ??? ??? ??????? ??? ????.
?????? Microsoft Visual C++ .NET 2002 Microsoft Visual C++ .NET 2003 ???? ?? ?? ???? ????????? ???????? ??????? ???? ?? ??????? ?? ??? Microsoft .NET Framework ? ????? ????????? ???????? ??? ???????? Microsoft Windows ??????. ????? ????????? ??????? ?? ??? ??????? ??? ??? ????????? ???????? ??? ???????? Visual C++.????? Microsoft Visual C++ .NET 2005 ????? ????????? ???????? ??????? ???? ?? ??????? ?? ??? Microsoft .NET Framework ?????? ????? ????????? ???????? ??? ???????? Microsoft Windows ??????.
????? ???? | ?? ????

?? ??? ??????

??????

???????? ????? #import ?????? ????? ?????? ???? ????????? ?????? ???? ??? ??????? _com_error ????? ????? ????? ??????? ?????? HRESULT ?????. ?? ???? ???? ????? ????? ???????? ??? ?????? ??????? ????? ??.

??????? ????

???? ??????? ??????? #import ??? ??? ???? ??? ??? ??????? HRESULTS ???????. ????? ?????? ??????? ???? raw_interfaces_only ?? ??????? #import. ??? ????? ?? ???? ??? negates ??? ????? ???? ??????? ???? ???? #import.

????? ?????? ?????? ????? ????? ????? ?? ?????? ??? _com_raise_error ??? ????? ??????? ?????? ? ?????????? ???????:

   void __stdcall _com_raise_error(HRESULT hr, IErrorInfo* perrinfo = 0)
   throw(_com_error);

   void __stdcall
   _com_raise_error(HRESULT hr, IErrorInfo* perrinfo = 0) throw(_com_error)
   {
       throw _com_error(hr, perrinfo);
   }
				
??? ????? ??? ?????? ???? ?? ??? ????? ?? ??? Comdef.h. ??? ??? ?????? ??????? ????? ?? ?? ??? .OBJ linker ?????? ??? ??????? ????? ??? ????? ?? ????? Comsupp.lib. ???? _com_raise_error ?? ?????? ????? ?? ?? ????? Comsupp.lib ??? ??? ???? ????????? ?????? ?????? ????????? ???????? ?????? ??.

???? ?????? ????? ????? ????????? ????? #import ??? ??????.

??????: ?????? ?????? ??????? ???? - ??????? ?????? ??????? ????? ?????? ??????? ??????:

????? C4290: ????? "??????? ???????" C++.
?? ??? ????? ?????? ??????? ?? ??????? ??????? ?? ??? standardized, ?? ??? ???? ???? ?? ??? ????? ?? Microsoft Visual C++. ?? ????? ????????? ???????? ???????? ?? ??????? ????? ????????? recompiled ?? ??? ????? ???????? ?? ????????? ?????????? ????? ??????? ?????????. ????? ???? ??? ??????? ???????? pragma ?????:

#pragma warning( disable : 4290 ) 
				

??? ?????

   void __stdcall
   _com_raise_error(HRESULT hr, IErrorInfo* perrinfo = 0) throw(_com_error)
       {
           //This message box is for demonstration purpose only.
           AfxMessageBox( "_com_raise_error (HRESULT, IErrorInfo*)" );
           //Your own error handling code or just an abort.
       }

    #import <msado15.dll>
        ...


     _bstr_t     bstrEmpty(L"");
     _ConnectionPtr  Conn1 = NULL;
     Conn1.CreateInstance( __uuidof( Connection ) );
     Conn1->Open( bstrEmpty, bstrEmpty, bstrEmpty );

				
????? ??? ???????? ???????? ?? ??? ???? ????? ?????? ?????? ActiveX (ADO) ??? ????? ?? ??????? ????? ????. ??????? _com_raise_error ??? _com_error ??? ????? ?????.

???????

???? ???????: 177425 - ????? ??? ??????: 28/???? ??????/1435 - ??????: 4.0
????? ???
  • Microsoft Visual C++ 5.0 Enterprise Edition
  • Microsoft Visual C++ 6.0 Enterprise Edition
  • Microsoft Visual C++ 5.0 Professional Edition
  • Microsoft Visual C++ 6.0 Professional Edition
  • Microsoft Visual C++, 32-bit Learning Edition 6.0
  • Microsoft Visual C++ 2005 Express Edition
  • Microsoft Visual C++ .NET 2003 Standard Edition
  • Microsoft Visual C++ .NET 2002 Standard Edition
????? ??????: 
kbnosurvey kbarchive kbmt kbhowto kbcompiler kbdatabase kbinfo kbmdacnosweep KB177425 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????177425

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com