Powered by MSDN

US - English
NEW! Silverlight 5 is available Learn More

way to create IE toolbar using the silverlight.. RSS

7 replies

Last post Dec 24, 2008 12:50 PM by avadhutphisake

(0)
  • avadhutphisake

    avadhutphisake

    Member

    1 Points

    12 Posts

    way to create IE toolbar using the silverlight..

    Dec 15, 2008 12:51 PM | LINK

    Hi Friends,

    I am way finding the way to create IE toolbar using the silverlight.
    I following questions.

    1) As MSN Toolbar is developed using ATL(Win32)  and Silverlight, how we can develop the same.
     If  it is not possible due to unavailability of hosting API's what is Microsoft's answer for the hosting silverlight in the IE Toolbar using VC++(ATL) programming as we don't want to provide the .Net framework to the end user.

     2)We can have silverlight control developed using the C#  technology also,and using the methods scriptable it is possible to Toolbar to Silverlight comunication.
    Then from above 2 points my question is that which is the most correct and possible way for the IE Toolbar Development.
    Please guide me on the above mentioned points.

    Thanks,
    Avadhut Phisake.

  • Jonathan Shen – MSFT

    Jonathan She...

    All-Star

    50156 Points

    4951 Posts

    Microsoft

    Re: way to create IE toolbar using the silverlight..

    Dec 18, 2008 06:01 AM | LINK

    Hi  Avadhut Phisake,

    avadhutphisake

    1) As MSN Toolbar is developed using ATL(Win32)  and Silverlight, how we can develop the same.
     If  it is not possible due to unavailability of hosting API's what is Microsoft's answer for the hosting silverlight in the IE Toolbar using VC++(ATL) programming as we don't want to provide the .Net framework to the end user.
     

    Silverlight application is a dll, which is running on the Silverlight plugin.  As far as I know, your goal is not achievable by using Silverlight.  We only can use managed code in Silverlight.

    avadhutphisake

    Then from above 2 points my question is that which is the most correct and possible way for the IE Toolbar Development.
    Please guide me on the above mentioned points.
     

    I would prefer VC++/C++ for your purpose.

    Best regards,

    Jonathan

    Please mark the replies as answers if they help or unmark if not.
    If you have any feedback about my replies, please contact msdnmg@microsoft.com.
    Microsoft One Code Framework
  • StefanWick

    StefanWick

    Contributor

    3004 Points

    453 Posts

    Microsoft

    Re: way to create IE toolbar using the silverlight..

    Dec 19, 2008 09:38 PM | LINK

    It is achievable - here is the documentation for the APIs that you need in order to natively host the Silverlight plugin in an application:

    http://msdn.microsoft.com/en-us/library/cc296246(VS.95).aspx

    Thanks, Stefan Wick

    Microsoft Silverlight | http://blogs.msdn.com/swick/
  • Jonathan Shen – MSFT

    Jonathan She...

    All-Star

    50156 Points

    4951 Posts

    Microsoft

    Re: way to create IE toolbar using the silverlight..

    Dec 20, 2008 06:51 AM | LINK

     Hi Avadhut,

    Silverlight provides a set of COM interfaces on the Microsoft Internet Explorer version of the plug-in (agcore.dll) and another set that is available for either ActiveX or NPAPI control models. These interfaces are used for hosting the Silverlight plug-in within an application, rather than by using a browser's ActiveX or NPAPI control models to embed Silverlight as part of an HTML page loaded by a browser. The interface definition for these interfaces can be found in the file xcpctrl.idl.  Somebody has done something successfully, please see our discussion here.

    Best regards,

    Jonathan

    Please mark the replies as answers if they help or unmark if not.
    If you have any feedback about my replies, please contact msdnmg@microsoft.com.
    Microsoft One Code Framework
  • avadhutphisake

    avadhutphisake

    Member

    1 Points

    12 Posts

    Re: Re: way to create IE toolbar using the silverlight..

    Dec 23, 2008 05:32 AM | LINK

     Hi StefanWick,

    Thanks for your help.

    Could you please give me some sample code for use of hosting Interfaces in VC++.

    And i could not able to get the xcpctrl.idl file.

    Thanks

    Avadhut Phisake.

     

  • StefanWick

    StefanWick

    Contributor

    3004 Points

    453 Posts

    Microsoft

    Re: Re: way to create IE toolbar using the silverlight..

    Dec 23, 2008 08:08 AM | LINK

    The IDL file is linked from the MSDN docs. It is here:

    http://download.microsoft.com/download/a/a/5/aa5f4c3e-0e9b-4536-adce-976419682da6/xcpctrl.idl

    Unfortunately, we don't have any public samples on this subject today. We hope to get a couple of samples published within the next few months. I can't give you a date for this, though.

    Thanks, Stefan Wick

    Microsoft Silverlight | http://blogs.msdn.com/swick/
  • avadhutphisake

    avadhutphisake

    Member

    1 Points

    12 Posts

    Re: Re: way to create IE toolbar using the silverlight..

    Dec 23, 2008 01:38 PM | LINK

     Hi Jonathan,

    Thanks for your quick reply.

    I have Following queries next.

    I am using Silverlight2.0.

    From the npctrl.dll( Com Dll ) I get the followong interfaces and classes.

    XcpControl,IXcpControl, IXcpObject.

    But for hosting to be done the steps are given as follows from some post on this forum.

    1- implement IXCpControlHost/IXCpControlHost2 to communicate with the host.

    2- Use CAxHostWindow class to create SL ActiveX control (Typically inherit your class with CAxHostWindow)

    Override QueryService() in your derived class and pass interface pointer of IXcpControlHost/IXcpControlHost2 to Host which is hosting SL ActiveX.

    AtlAxWinInit();
     HRESULT hr;

     // Creating the control with IUnnknown might be useful but not in our case. so create SL control directly
     hr = CoCreateInstance(CLSID_XcpControl, NULL, CLSCTX_INPROC_SERVER, __uuidof(XcpControlLib::IXcpControl2), (void**)&s_pXcpControl2);

     if (SUCCEEDED(hr))
     {
      CComPtr<IUnknown> spUnkContainer;

      hr = CAxHostWindowEx::_CreatorClass::CreateInstance(NULL, IID_IUnknown, (void**)&spUnkContainer);
      if (SUCCEEDED(hr)) {
       CComPtr<IAxWinHostWindow> pAxWindow;

       hr = spUnkContainer->QueryInterface(IID_IAxWinHostWindow, (void**)&pAxWindow);

       // Attaching our created silverlight control with static control placed on main dialog box.
       hr = pAxWindow->AttachControl(s_pXcpControl2, hWnd);            
       s_hWnd = hWnd;
      }
     }

     My queries are as follows.

    1) How to implement  IXCpControlHost / IXcpControlHost2 interfaces as i could not found anything on this.

     2) how to get XcpControlHost / IXcpControlHost2.. as i could not found it in agcore.dll and agcore.dll is not com dll and also it is not assembly in .Net which is exposed to COM.

    3) Next Question is How to Override the SessionQuery method of CAxHostWindow. as it is required to have XcpControlHost.

    Your Help expected.

    Thanks,
    Avadhut phisake. 

     

     

     

     

     

     

  • avadhutphisake

    avadhutphisake

    Member

    1 Points

    12 Posts

    Re: Re: way to create IE toolbar using the silverlight..

    Dec 24, 2008 12:50 PM | LINK

     Hi jonathan Shen,

    Could you please comment on my previous query.

    Thanks,
    Avadhut Phisake.