?????: MFCAxs.exe ?????? ?????? Script Host ??????? MFC

?????? ????????? ?????? ?????????
???? ???????: 168214 - ??? ???????? ???? ????? ????? ??? ???????.
??? ????? ??? ???????. ????? "??? ??" ??? ??? ??????? ??? ????.
????? ???? | ?? ????

?? ??? ??????

??????

?? MFCAxs.exe ????? ????? ??? MfcAxscrVb. MfcAxscrVb ????? ?????? "??????? ??????" ???? ????? ???????? MFC. ?? ?????? DLL VBScript; ??? ???? ????? "??????? ??????" ????? ??? ?? ???? "??????? ??????". ????? MfcAxscrVb ????? ????? ????? ??? ???? ?????? ??????? ?? ?????? ?????? ?????? "????? ???? ????" ?????? ?? ??????? ????? ???????? ?? ?????? ?? ????? ????? ??? ???? ??????? ??????.

????? MfcAxscrVb ??? ????? ????? "?" ????? 5.0 Visual C++. ??? ????? ?? ??? ??? ????? ?? VC ++ 4.2 makefile ?????? ?? mdpfile ????????? ???????? ????? MfcAxscrVb ?????? ?? MFC 4.2b.

????????? ???????: COM ???????

??????? ????

????? ????? ?????? ??????? ?? "???? ??????? ?? Microsoft":
MFCAxs.exe
?????? ??? ??????? ?????? ??? ????? ????? ????? ??? Microsoft "? ???? ??? ??? ??????? ?????? ?????? ??" ????? ??????? ?? Microsoft:
119591????? ?????? ??? ????? ??? Microsoft ?? ??????? ??? ????????
???? Microsoft ???? ??? ????? ????? ?? ?????????. ??????? Microsoft ???? ?? ?????? ??? ??????? ??????? ??? ??????? ???? ?? ??? ?????. ??? ????? ????? ??? ?????? ????? ?????? ???? ????? ??? ??? ????? ??? ??????? ??? ???? ??? ??? ?????.

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

??? ????? ????? MfcAxscrVb ?????? ???? ???? ????? ????? ????? ?? ????? ?????? ?????? ?? ???????. ????? ??? ?? ???? ??? ???????? ????? ?? ??? ?????? ?? ??? "????? ??????" ??????? ???????? ?????. ??? ????? ?????? ?? ??????? ?????? ?????? ?? ?? Script.txt ?????? Testevents.txt.

?????? ?????: ????? ??????

???? ??????? ??????? ?????? ??? ??? ?????? ????? ??????? ???????? ???????? MFC. ??? ??? ????? ??????. ??? ??????? ???? ??? ????? ????????? ??? ?? ??? ???? ?? ??? ??? ???????? ?????.

????? ??????? "??????? ??????" ???? ????? ???? ???? ???????? ???? ?? ???????. ????? ?????? ???? ??????? ??????? ??? ?????? ??? ?? ???? "??????? ??????". ???? ??? ????? ???? ?????? ??? ???????: ???? 14 ? 15 ?? ????? Brockshmidt "???? OLE ?" ????? 11 ????? Rogerson "???? COM" ? "????????? ????? OLE ??????."

CCmdTargetPlus:

?? ????? ???? ??? ???????? ???? ???? ?????? ?????? ??????? ?????? ??????? ? ???????? ???? IDispatch ???? ????? ????? ????? ?????? ?????? ??????? ??????. ?? MFC ???? ???? ????? grunt ?? ??? ????? ??????? ?????? ???? COM. ??? ???? ????? ??? MFC ??? ???? ?? ???????? ??????? ??????? ? ?????? ??????? ??????? ?? ??????? ????? COleControl. COleControl ???? ???? bulky ???? ????. ????? ??? ???? ??????? ????? ???????? ?? ???? ?????????. ????? VBScript ????? ??????? ??? ???????? ??????? ???? ???? ???????. ???? ?? ??? ????? ??? ??? ???? ? ?? ????? ????? ??? ???? ???????? ??????? ?????? ????? ?? ?? ?????? ??? ITypeInfo ??? ???? ???????.

????? ?? ??????? ?? ???? ??? ???????? MfcAxscrVb ????? ??? ??? ?????? ???? CCmdTargetPlus ????? ??? ??????? ???????: ????? ????? ? ???? ??????? ?? ???? ????? ??? ???? ?????? ? ??????? ??? ?????? ?????? ?? ???? IProvideClassInfo. ??? ????? ???? ????????? ???????? ?? CmdTargetPlus ?????? ??????? ??? ????? ????? ???? ???? ????? ????? ??? ?????? ?????? ???? ?????.

????? ??????:

??? ????? ???? ???????? ??????? ???????? ?? ??? ?????? ???????? CCmdTargetPlus. ???? ??? ??????? ???? ????? ??? ?????? ????? ???? ???. ?????? ??? ?? ???? ??????? (CAButtonDispatch CBButtonDispatch ? ???) ?????? ??? ?? ?? ????????. ??? ??? rundown ??????? ??? ???? ?????? ????? MfcAxscrvb ?? ????? ??? ???????.

??? ??? ?????? ???????? ?????? ?? ???? ?? ???? ????? GUIDs ???? ??????? ??????? ? ?????? ??????? ???????? ??? ??? clsid ????? ?? ???????. ????? ??? ??? ?? ??? ?? ??? ????? ??? ??? .odl. (?? ???? ????? ???.) ?? ??? ???? ????? ??????? ??????? ??? ?? ?? ??????? ??? ??? ????? ???????. ????? ??? ????? ???? ???? ?? ???? ????? ?? ??? ??? ?????? ?? .odl ? .h ? .cpp ??????? ????? ???????? ?????? ????? ????? ???????? ? ?????? ?????? ??????? ????? ?? ??? ?? ??? MFC OLE ??????. ??? ??? ????????? sort.

????? MfcAxscrVb ???? ????? ????? ??????? ?????? ?? ?????? MFC ?????? ??? ??????? ???. ??? ???? ??????? ????? ???? ?????? ?? ???? ?? "AButton," ????? ?????? ?????? ??????? ??????. ?? ???? ???? MFC CButton. ??? ????? CCmdTargetPlus ? CAButtonDispatch ? ?????? ?????. ??? ???? ?????. ??? ?? ??????? ?????? ???? ???? ?????? ???? ???????? MFC ???????? ?????? ?????? Windows ???? ?????? ?????? ??????? ??????.

CeventsListBox CEventsButton CEventsEdit ?:

???????, ???? ??? ?? ???? ??? ????????? ???????? ???? ?????? Windows ?????--???? ? ???? ??? ??--????? ?????? ??? ???? ??????? ??????. (???? ??? ??????? ??? ????? ??? ???????? ?????? ???? ????? ?? ???? ???? ?????.) accomplishes ??? ??????? ??? ?? ???? ????? ??????? ????? MFC ???????? ??? ?????? ????? ?? ?????? ????????. ??? ?? ??? ??????? ??? ???????? FireEvent (?????? ?? ????????? ???????? ????? ??? CCmdTargetPlus) ??? ???? ???????. ?? ??? ??? ???? ????????.

??? ???? ??????? ??????? ???? MFC ?????? ???????? ?? ??? ?????? ? ???? ????? ?????? ???? ???? ??? ??????? ????. ??? ????? ??? ?? ???? Mfcaxscrvbdlg.

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

????? ?? ???? ???? ???????? ??????? ???? ????? ????? ???? ???? ???? ??????? ?????? ?????. ???????? ?? ???? ???????? ??????? ??????? ???? ???? ??????? ?????? ??? ???? "Script Namespace." ??? ????? ??????? ??? ????? ??? ???????? ????? ?? ???? ????? IActiveScript::AddNamedItem. ??? ??? ?????? ??? duty ?????? ????? IDispatch ?????? ???? ??????? ??? ???? ITypeInfo ??????. ????? ????? ???? ???????? ????? ?? ?? ???? ??? ???? ???? ? ?????? ??????? IActiveScriptSite::GetItemInfo ???? ??? ???? IUnknown (??? ?????? ????? ??? IDispatch) ????? ITypeInfo.

?? ??? ???? ???? ???? ?????? ?????? ??????? ?????? ??? ?? ???? ???? ????. ????? ??? ???? ??? ?????? ??????? ???? ??????? ??? sub-objects ????? ???? ???? ??????? ????. metaphor ????? ?? "?????"-> ???????-> ??????? ?????? ???? ??? ???? ??????? ???? ?????? ????? ?? ?????? ????? ??????? ?????? ?????? IDispatch ?????? ????? ????. ???? ??????? ?????? ??????? ???? ??? sub-objects ??? ????? ?? ???? ????? ?????? ??? ??? ???? ???? ?? contrivance ??????.

???????? ??? ?????? ? ???? ??????? ?????? ???? ?????? ????? ???????? ??? sub-item ??? ???? ??? ???????? ????? ?????? ??? ?????? ??? ??????? ?? ?????? ???? ?????? ??? ????? ??? ???????? ?????:
Set Obj = Application.Document.Item(1)
				
????? ??? sub-objects ????? ?? ?????? ??? ????? ?????? ????? ?????? ??? ? ???? ??????? ?????? ???? ????? ?????. interestingly ?????, ???? ???????? ????? ?? "?????" ?????? ?? ??????? ?????? ?? ??????? ??????. ???? ???? ??? ?? ??? ??????? ?? ????? ???? ??????? ??????, ?? ??? ????? ?? ??? ?????? ??? ????????? ???????? ?????? ???????:
Set Obj = Document.Item(1)
				
??? ?????? ????? Internet Explorer 3.0 ???? ?? ????????? ???????? ?????? ?? ?????? ????? ??????? Window ??? ????? prefixing ???? ??????? ??? ?????? ?? "????". ????? ???? ???????? ??? ??? ????? ?????? ???????? ????? ??????? ?????? ?? ??????? AddNamedItems ???????? ??????? SCRIPTITEM_GLOBALMEMBERS. ?? ????? ??? ?????? ?? ?????? ????? ???? ???????? ????? "??????? ??????" ???, ??? ???? ??????? ??????? ??? ?????? ?? ???? ???????. ???????? ?????? ?????, ???? ?? ?? ??????? ??????? ??? ?? ???? ????? ???? ??????:
   Sub Application.Document.Item(1)_OnEvent ' this doesn't work!
				
????? ??????? MfcAxscrvbdlg ? ??? ??? ???? ???? ?????? ??? ?????? ??????? ?? ???? ?? ??????? ??????? ?? ???? ??? ????? ??? "???? ????". ?? ???? ????? ?????? ????? ?? ???? ???? Scripter ??????? ?????? (???? ?????? ????) ? ????? ?? ????? ??????? ??????.

?????? WebBrowser:

?? ??? ?????? ???? ???????? ????? ????? ?? ???? ????? ???? ??? ??? ????? ??? ???????? ?????. ??? ?? ?????? WebBrowser ???????? ?? ???? ?????? ????? ?? MFC ??? ???????? ?????? ??????????. ?? ?? ?????? ?? ???????? ????? AddRef ?????? ??? ???? ?????? ?? ???? ??????. ????? ? ????? ?????? ??????? ???? ???? ITypeInfo ??. ???? ??? MfcAxscrVb ???? IProvideClassInfo::GetClassInfo. ??? ???? ? ????? ???? ????? ?????? - ??????? ????? ???? ???? ITypeInfo. ????? ????? ???? ???? ?????? WebBrowser GetClassInfo ? ???? ?? MfcAxscrVb ?? ?????? ????.

??? ???? ????? ?????? ???? ??????? ???????? ???????? ??? ????? ????? ?? ????? ???????? ?????? ??? ????? IUnknown ???????? CoCreateInstance. ????? ?? ???? ???? ?? ????? ?????? ???? ??? ?????? ??? ?????? ?????? albeit ???? ?? ????? ??? ?? ??? ?????? ???????. ?? Visual Basic? ??? ??????? ?????? ?????? CreateObject.

?????? ??? ????????? ??????: HostCreateObject

??? ??? ?????? ??????? ????????? ???? ???? ???????? ??????? ?????? Scripter ??????? (????? ?????? ????) ????? ?? ????? ???? ???? ???. ???? ??? ??????? ????? ???? ????? ?????? ???? CreateObject ????? VB. ???? ?????? ??????? HostCreateObject ?????? ?? ??? ????? ??? ??????? ????? ???? ???????? ????? ???? ??? ?? ???? ?????? ?????? ???? ????. ??? ??????? ??????? ????? ?? ???? ?? ????? ??? ?????? ?????? ????? ??????? ? IE3 ???? ????????. ????? ??????? ?? HostCreateObject ?????? ?????? ??????? ?????? ???????. ????? ???? ??? ???? ??????? ?????? ?????? ???????, ?? ???? ?? ??? ?????? ?? ?? ????.

??????: ???? ?? ??????? 2.0 ??????? VBScript ? JScript ???? ????? CreateObject ??? ???? ?????. ?????? ?? ????? ?????? ??? ???????. ??? ???? ??? ? ??? ?????? ?????? ???? ???? ?? ??? ??? ??????? ??? ?????? ?????? ?????? ?????????. deem ????? ?????? ??? ??????? ?????? ??? ????? IObjectSafety ?? ??? ????? ??? ??????? ??????? "??? ??????" ???????? ?? ??? - ??????? - ???????. ???? ??? ????? ?????Microsoft ?????? ??? ???? ?? ?????????.

??? ????? ???

?? ???? ???? ??? trickery ?? MfcAxscrVb ????????? ???? ?? ??????? ??? ??? ClassWizard. ????? ????? ? ?????? ??? "dumb." ??? ??? mentally ????? ????. ??? ?? ????? ?????? ?? ???? ??? ???? ?? ??? blindly ???? ??????? ???? ?? ??? ????????? ClassWizard ????. ?????? ???? ????? ??????? ?? COleControl ???? ???? ??? ??? ?????? ??? ????? ???????? ??????? ????? ClassWizard ???????? ?????.

complication ???? ?????? MfcAxscrVb ?????? ?? ??? ??????? ?????? ?????? ????? ??. ???? ???????? ???? ??????? ?? ???? CButtonDispatch ????? ????? ?? ??????? ????????? ???? ??? ???? ???? ????. ??? ???? ????? ????? ????? ????? ?????? ????? .odl ????? ?? ???? ??????? ????? ??? ???? ??????? ????????? ????? ?????. needless ??? ?? ??? ?? ???????? ??? ???? ??? "????? ???" ??? ?????? ?? ????? ??? ??? DISPIDs. ??? ??? ?????? "????? ???" ???? ?? ???? DISPIDs ???? ?? ?????? ?? ??????: ??? .odl ??? ??????? ???????? "?" ??????? ???? ????? ?????. ??? ????? ?? ?????? ??????? ????, ?? ????? ?????? DISPID ??? ????? ??????? ? ????????. ???? ????? ?????? DISPIDs ? ?????? ?? ???? ?? ????? ?? ??? ??? ??????? ? ??? ??????? ?? ??? ?? MfcAxscrVb.

???????? Visual C++ 5.0 ????? ?????? ?? IDL ?????? ?????? ???? ClassView ? ??? ???? ??? ?? ??? ??? ???? ???? ClassWizard ?? ??. ???? MfcAxscrVb ???? ??? ????. ??????.

?????? ?: ????? ????

scripter:

??? ?? ???? ???????? ??? ?????? ???? ???????? ??????. ?? ???? "IMfcaxscrvbDlg" ?? ??? .odl ??? ????? ???? ???? ???? "Scripter." ???? ?? ????? ???? HostCreateObject ??????? ?????.

?????? ??:

AButton BButton RunScript CancelButton OKButton ?

?????
  • ??????? ?????????: ?? ??? ????.
?????? ????: ???? ?? ????? ??? ????.
  • ????: ???? ?? ????? ??? ????.
???????
  • ???_?????: ????? ??? ????? ??? ??.
  • OnMouseOver: ????? ????? ????? ?????? ??? ????.
  • ????? OnFocus(bSet): ??? ????? ??????? ?? ??? ?? ????.
BroCon:

BroCon ?? ??? ???? ?????? WebBrowser ?? ???? ??????. ????? ???? ??????? ????????? ??? ????? ?? SDK SDK/ActiveX ???? ?????? ????? ?????? WebBrowser.

EditCon:

??????
  • ????? AppendLine(strToAdd): strToAdd ?????? ?? ???? ????? ????.
  • InsertLine (strToAdd ? nWhere): ????? strToAdd ?? #nWhere ???.
  • RemoveLine(nWhere): ????? # nWhere ??? ?? ???? ?????.
???????
  • OnMouseOver: ????? ????? ????? ?????? ??? ??????.
  • OnChar(strChar): ????? ??? ????? ??? strChar ??? ??????.
  • ????? OnFocus(bSet): ??? ????? ??????? ?? ??? ?? ????.
Lbox:

??????
  • AddString(strIn): ????? StrIn ?? ???? ???????.
  • ClearList: ??? ???? ??????? ?? ???? ???????.
  • RemoveString(strRemove): ????? ??? ???? StrRemove ?? ??????? ?? ???? ???????.
  • SelectString(strSelect): ???? ????? ?????? ??????? ?? ??? strSelect.
???????
  • OnMouseOver: ????? ????? ????? ?????? ??? ??????.
  • ????? OnFocus(bSet): ??? ????? ??????? ?? ??? ?? ????.
  • OnSelCancel(strCancelled): ??? ??????? ??? ????? ?? strCancelled ???? "???? ?????.
  • OnSelChange(strChange): ????? strChange ???? "???? ????? ????? ?????? ????????.

???????

???? ???????: 168214 - ????? ??? ??????: 29/???? ?????/1435 - ??????: 2.2
????? ???
  • Microsoft Internet Explorer 3.01
  • Microsoft Internet Explorer 3.02
  • Microsoft Internet Explorer 4.0 128-Bit Edition
  • Microsoft Internet Explorer 4.01 Service Pack 2
  • Visual Basic, Scripting Edition 1.0
  • Microsoft Visual Basic, Scripting Edition 1.1
  • Visual Basic, Scripting Edition 2.0
  • Microsoft Foundation Class Library 4.2, ????? ?????? ??:
    • Microsoft Visual C++ 5.0 Enterprise Edition
    • Microsoft Visual C++ 5.0 Professional Edition
????? ??????: 
kbnosurvey kbarchive kbmt kbdownload kbfile kbinfo kbsample KB168214 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????168214

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