Load ActiveX inside CompactFramework - PocketPC application

Last post 04-09-2008 8:48 by ctacke. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 04-08-2008 8:58

    • DanDan
    • Top 200 Contributor
    • Joined on 04-08-2008
    • Posts 2

    Load ActiveX inside CompactFramework - PocketPC application

    Dear all,
     
     
    I downloaded and ran the example for hosting ActiveX controll in Compact Framework. The WMP and Flash example work great.
     
    I was wondering through about some errors i have been getting with my own activeX controll. Well no my ActiveX but an active i am trying to put in my application.
     
    I was trying to use the AxImp tool on this ActiveX controll i have and i get the following error:
     
    C:\Program Files\Microsoft Visual Studio 8\VC>aximp C:\svnwork\Compact\IMPlayer.
    dll /source
    AxImp Error: Error loading type library/DLL. (Exception from HRESULT: 0x80029C4A
     (TYPE_E_CANTLOADLIBRARY))
     
    I cant work out why this is not working.
     
    I have the activeX control running inside a normal C# project. I call the fuctions from the ActiveX like this:
     

    System.Environment.CurrentDirectory = (String)Microsoft.Win32.Registry.GetValue("HKEY_LOCAL_MACHINE\\SOFTWARE\\Application\\App Folder", "DataPath", System.Environment.CurrentDirectory);

    And then:
     
    [DllImport("IMPlayer.dll",CharSet=CharSet.Ansi)]

    public static extern int IMC_InitViewer (IntPtr hWnd, int isFullScreen);

    After that i can call the function in my code.
     
    What is really funny is that i cant add a refence to the DLL through add references. I am not sure why VS2005 wont add reference to it.
     
     
    Is there anything you would suggest to make this work properly?
     
     
    I would really apreciate your help.
     
     
    Sincerely
    Dan
    Filed under:
  • 04-08-2008 9:20 In reply to

    • Neil
    • OpenNETCF Staff
    • Top 10 Contributor
    • Joined on 07-30-2007
    • North Wales
    • Posts 1,092

    Re: Load ActiveX inside CompactFramework - PocketPC application

    Is the ActiveX control compiled for either Windows CE or Windows Mobile?

  • 04-08-2008 15:38 In reply to

    • DanDan
    • Top 200 Contributor
    • Joined on 04-08-2008
    • Posts 2

    Re: Load ActiveX inside CompactFramework - PocketPC application

    As far as i know it is not.

     

    I only have and dll file and ocx file to play with.

     

    How can i achieve the task of plugging this into the compact framework?

     

    Thank you.

  • 04-09-2008 8:48 In reply to

    • ctacke
    • OpenNETCF Staff
    • Top 10 Contributor
    • Joined on 07-27-2007
    • Indiana
    • Posts 1,860

    Re: Load ActiveX inside CompactFramework - PocketPC application

    You can't.  If the ActiveX control is not specifically built for Windows CE and your processor architecture, then is simply can't be used. 

Page 1 of 1 (4 items)