?????: Comaddin.exe Office 2000 COM ??????? ???????? ???????? ?? Visual C++

?????? ????????? ?????? ?????????
???? ???????: 230689 - ??? ???????? ???? ????? ????? ??? ???????.
????? ???? | ?? ????

?? ??? ??????

??????

Comaddin.exe ?? ??? ???? ??????? ????? ????????? ???? ???? ??????? Office 2000 ?? Office XP ???? ???? ?????? (COM) ??????? ???????? ???????? Visual C++. ????? ???????? COM ???? COM ?? ????? ?????? ?????? ???? ???? ??????? Office 2000 ?? Office XP ?? ????. ???? ????? COM ???????? ????? ???? ????? ? ????? ?????? ???? Office.

??? ????? ????? COM ???????? ???????? ?? ??? ??????? ???? ???? ????? ?????? COM ??? Visual Basic ? C/C++ ? C# ? ? ????? Office 2000 ?????? ?? Office XP ?????? ?? Microsoft Visual Basic for Applications (VBA).

???? ??? ??????? ??????? ??????? ?????? ??? ????? ???????? COM ?? Visual C++. ???? ??????? ??? ?????? ??????? ???????? shell ???? ????? ????? ????? ??????? ???????? ?????? ?? Office.

??????? ????

????? ????? ?????? ??????? ?? "???? ??????? ?? Microsoft":
Comaddin.exe
????? ???????: ? 4 ????? 1999

?????? ??? ??????? ?????? ??? ????? ????? ????? ??? Microsoft "? ???? ??? ??? ??????? ?????? ?????? ??" ????? ??????? ?? Microsoft:
119591????? ?????? ??? ????? ??? Microsoft ?? ??????? ??? ????????
???? Microsoft ???? ??? ????? ????? ?? ?????????. ??????? Microsoft ???? ?? ?????? ??? ??????? ??????? ??? ??????? ???? ?? ??? ?????. ??? ????? ????? ??? ?????? ????? ?????? ???? ????? ??? ??? ????? ??? ??????? ??? ???? ??? ??? ?????.

????? ??????? ?????

Comaddin.exe ??????? ??????? ??????? ??? ???? ?? ???????:
   FileName                    Size
   ----------------------------------------
   
   TestAddin.dsw               541 bytes
   TestAddin.dsp               4.11 KB 
   ComAddin.h                  6.19 KB
   ComAddin.cpp                8.38 KB
   ComAddin.def                205 bytes
   MyAddin.cpp                 10.6 KB
   MyAddinCF.cpp               2.18 KB
   BttnHandler.cpp             6.27 KB

IDTExensibility2

???? COM ?? ????? ?????? Office, ??? ?? ???? ????? IDTExensibility2 ??? ?? ???? ?? ??????? ???????? ???? ??? ????? Microsoft (Msaddndr.dll). ??? ??????? ?? ??????? ?? ?? ?? ComAddin.h ???? ?? ????????? ?????. ???? ????? COM ???????? ??? ?? ??? ??????? ?? ??? ?? ???? ?????? ?? ?? ?????? ??? ????? ??:
  • OnConnection
  • OnDisconnection
  • OnAddInsUpdate
  • OnStartupComplete
  • OnBeginShutdown
??? ????? ???????? COM ????? ????? ? ??? ????? ??????? QueryInterface ?? IDTExtensibility2. ?? ???? ??? ??? ???????? ??????? ???????? ??? ????? ??????. ?? ??? ???? ????????? ??????? ??????? ?????? ???? ????? ?????? ??????? ???????? ????????? ???? ?? ??????? ??? ?????. ???? ??? ?? ?????.

OnConnection

??? ????? OnConnection ???? ??? ?????? ??????? ???????? COM. ??????? ???????? ???? ?????? ?? ??? ??? ??????? ?????? ???????? ??????? ?? ?? ???? ??????? ????????. ??? ??? ?????? OnConnection S_OK ?? ??????? ???????? ?? ???? ???? ??????. ??? ?? ????? ??? ???? ????? ?????? ????? ??????? ?????? ????? ?? ???? ??????? ???????? ?? ???? ????? ??????.

???? OnConnection ???????? ?????? ???????:
  • ??????? - ???? ??? ????? IDispatch ??????? ??????.
  • ConnectMode ???? ???? ????? ??????? ???????? ????.
    • ext_cm_AfterStartup - ????? ?? ????? ???????? ??????? ?? ???? ?????? ??????? ???????? COM.
    • ext_cm_CommandLine - ??????? ?? ??? ???????.
    • ext_cm_External - ????? ?????? ????? ????? ???? ???????.
    • ext_cm_Startup - ????? ?? ??? ?????? ??? ??? ????? ???????. ???? ?????? ??? ?????? ?????? ????? ?? ???????.
  • AddInInst ???? ??? ???? COMAddIn ???? ???? ??? ??? ??????? ???????? ?? "?????? ????? COM ????????" ??????? ??????.
  • ???? - ???? ??????? ??? ???? ???? ???? ???????? ???????? ??????? ?? ??? ????????.


OnDisconnection

??? ????? OnDisconnection ????? ??? ??? ??????? ???????? COM ? ??? ????? ????? ?? ???????. ??????? ???????? ??? ????? ????? ????? ?? ??????? ?? ??? ????? ?? ??????? ??? ??????? ??? ??????? ??? ??????? ??????.

???? OnDisconnection ??????? ???????:
  • RemoveMode ???? ???? ????? ??????? ???????? ?? ??? ?????.
    • ext_dm_HostShutdown - ??? ??????? ??? ????? ??????? ??????.
    • ext_dm_UserClosed - ??? ??????? ?? ??? ???????? ??????? "??" ???? ???? ???????.
  • ???? - ???? ??????? ??? ???? ???? ???? ???????? ???????? ??????? ?? ??? ????????.


OnAddInsUpdate

??? ????? OnAddInsUpdate ??? ????? ?????? ??????? ????? COM ????????. ????? ???? ???? ????? ???????? COM ??? ????? ?? ????? ?? ??????? ?????? ??? ??? ?????.


OnStartupComplete ? OnBeginShutdown

????? OnStartupComplete ? OnBeginShutdown ??????? ???????? ??? ??? ??????? ?????? ?? ??? ????? ???? ??? ??? ???? ????? ???????? ??? ??????? ????? ????? ?? ????? ????? ???? ?? ???????. ???? ??? ????? OnStartupComplete ??? ????? ?????? ?? ????? ????? ??? ??????? ??? ????? ????? OnBeginShutdown ??? ????? ?????? ?? ??? ??????? ?? ??? ?????? ????? ????? ???????.

??? ????? ???????? ??????? ?????? ??? ???? ???? ??? ????? ??? ???????, ??? ???? ??????? ??????? ?????? ??????? ????? ???? ????? ?????? ?? OnConnection ? OnDisconnection.

????? ??????? ???????? COM

???????? ??? ????? COM ?????? ????? ???????? COM ????? ????? ???? ?? ?? ????? Office 2000 ???? ???? ????? ??????. ????? ???? ?? ????? ???? ??? ??????? ???????? ????? ??????? ???? ???????? ProgID ????? ?? ??? ??? ????? ??? ?????? ??????:

HKEY_CURRENT_USER\Software\Microsoft\Office\<appname>\Addins\<addinprogid>
??????? ???????? ???? ????? ????? ?? ??? ?????? ??????? ?? ??? ??? ????? ???? ????. ???????? ??? ???? ??????? ???????? ??? ????? ???? ??????? ??????? ???????? ???? DWORD ???? "LoadBehavior." ???? ??? ?????? ??????? ???????? ???? ????? ??????? ?????? ? ?????? ????? ?? ?????? ?? ????? ???????:
  • 0x00 = ??? ??????? - ??? ??????.
  • = ???? 0x01 - ?? ??????.
  • = 0x02 bootload - ??????? ??? ??????? ??? ???????.
  • 0x08 = demandLoad - ????? ??? ??? ???? ?? ??? ????????.
  • 0x16 = ConnectFirstTime - ??????? ??? ????? ??? (??? ??? ??????? ??????).
?????? ????????? ??????? ?? 0x03 (???? | Bootload).

??? ????? ????? ??????? ???????? ???? ???? ?????? IDTExtensibility2 DWORD ?????? ???? "CommandLineSafe" ???????? ??? ?? ??? ??? ????? ???????? ???? ?? ????? ????? ??????. ???? 0x00 ???? False ? 0x01 True. ??? ??? ?????? ???? ???? ????? ? ??? ??? ??? ????? ??? ??????? ?? ???????? ??? ????? ?????? ??? 0x00.

?????? ?? ?????

???? ????? ??????? ???????? ???????? ????? ??????? ????? ????? regsvr32.exe ??? DLL ??????? ?? ??? ????? Microsoft Word ? Excel/?? ?/?? ?/Powerpoint ?? 2000 Frontpage. ??? ?? ????? ???? ???? ??? ??? ???? ????? ??????? ???????? ???? ???? "??????" ?????? ????? ?? ??.

(c) 1999 ???? Microsoft ? ???? ???? ?????. ????????? ??? ???? R. ???? ? Microsoft Corporation.

???????

???? ???????: 230689 - ????? ??? ??????: 23/????? ???????/1425 - ??????: 5.4
????? ???
  • Microsoft Excel 2000 Standard Edition
  • 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 Office XP Developer Edition
  • Microsoft Office 2000 Developer Edition
  • Microsoft FrontPage 2002 Standard Edition
  • Microsoft FrontPage 2000 Standard Edition
  • Microsoft PowerPoint 2002 Standard Edition
  • Microsoft PowerPoint 2000 Standard Edition
  • Microsoft Word 2002 Standard Edition
  • Microsoft Word 2000 Standard Edition
  • Microsoft Excel 2002 Standard Edition
  • Microsoft Outlook 2000
  • Microsoft Outlook 2002 Standard Edition
????? ??????: 
kbmt kbdownload kbautomation kbfile kbinfo kbsample KB230689 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????230689

????? ???????

 

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