????? ??????? URL ???? ??? ?? ???? ???? ActiveX

?????? ????????? ?????? ?????????
???? ???????: 181678 - ??? ???????? ???? ????? ????? ??? ???????.
????? ???? | ?? ????

?? ??? ??????

??????

???? ??? ?????? ??? ???? ???? ???? ActiveX ??????? ???? ???? ????????? (URL) ????? ??? (?????) ??? ??? ??? ??? ???????.

?? ???? ??? ?????? ????? ??????? ???? ???? ActiveX ??? ????/???? ???? ?? ?????? ??? ????? ??? ???? ????.

??????? ????

????? ????? ???? ???? ActiveX ??????? Internet Explorer (IE) ?????? ???? ??? ????? ?????? ?????? IOleObject::SetClientSite() ?????????. ???? ??????? ??? ??????? ??? ??????? ??? ????? ?? ?????? ??? ???? ???? ??????? ???????? URL ????? ??? ???????.

???? ??? ??????? ????? ??????? URL ?????? ?? ????? ???????. ?????? ??? ??????? ?????? ??? ????? ?????? ??? ????? URL ?? ???? ???? ??????? ?????? ?????? ??????? ??????? ?? "????? ??????? ?? Microsoft:
172763INFO: ?????? ??? ???? ???? ?? ???? ???? ???? ActiveX
???? ??????? ??????? ???????? URL ?????? ?? ????? ???????:
  1. ?????? ??? ?????? ???? ????? ???? (IOleClientSite). ????????? ????? IOleObject::SetClientSite() ?????? ???? ??? ???? ??????. ????? ??? ??????? ????? ??????? ?????? ??? ??????.
  2. ?????? ??? ???? ???????? ??? ???? ???? ?????? IOleClientSite::GetMoniker() ?????????.
  3. ??????? IMoniker::GetDisplayName() ?????? ??? URL ??????? ??????.
???? ????? ????????? ???????? ?????? ????? ????? ??????? ??????? ?????? ????? ????? IOleObject::SetClientSite() ?? ???? ???? ActiveX ????? ???? ?????? (ATL):

??? ?????

STDMETHOD(SetClientSite)(IOleClientSite *pClientSite)
{
   if (pClientSite != NULL)
   {
      // Obtain URL from container moniker.
      CComPtr<IMoniker> spmk;
      LPOLESTR pszDisplayName;

      if (SUCCEEDED(pClientSite->GetMoniker(
                                    OLEGETMONIKER_TEMPFORUSER,
                                    OLEWHICHMK_CONTAINER,
                                    &spmk)))
      {
         if (SUCCEEDED(spmk->GetDisplayName(
                                 NULL, NULL, &pszDisplayName)))
         {
            USES_CONVERSION;

            CComBSTR bstrURL;
            bstrURL = pszDisplayName;

            ATLTRACE("The current URL is %s\n", OLE2T(bstrURL));
            CoTaskMemFree((LPVOID)pszDisplayName);
         }
      }
   }

   return IOleObject_SetClientSite(pClientSite);
}
				

?????

?????? ??? ???? ?? ????????? ??? ?????? IOleObject ? IoleClientSite IOleContainer ?????? ?????? ????????? ??????? ?? Microsoft Visual C++.

(?) 1998 ???? Microsoft ? ???? ???? ?????. ????????? ?????? ????? ???? ? ???? ? ???? Microsoft

???????

???? ???????: 181678 - ????? ??? ??????: 27/????? ??????/1425 - ??????: 2.3
????? ???
  • Microsoft Internet Explorer 3.0
  • 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
  • Microsoft Internet Explorer 5.0
  • Microsoft Internet Explorer 5.5
????? ??????: 
kbmt kbhowto KB181678 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????181678
????? ??????? ?? ????? ???? ?? ????? ???????
?? ????? ????? ?????? ???? ???? ???? ??? ??????? ??? ?? ? ?? ??? ??????? Microsoft ??? ????? ??? ??????? ????? ?????? ?????

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

 

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