Using OCX in .NET

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?QWxoYW1icmEgRWlkb3MgS2lxdWVuZXQ=?=

    #1

    Using OCX in .NET

    Hi misters,

    I try use an OCX in my Winforms application with VS 2005.

    The OCX is a PDF Viewer (XPdfViewer)

    I have several issues about it:

    1. I add reference to COM, and VS generate Interop.XpdfVie wer.dll

    When I call to method of COM, I get this error:

    ErrorCode -2147467259

    Exception Details: System.Runtime. InteropServices .COMException: Error
    HRESULT E_FAIL has been returned from a call to a COM component

    One question, how I get a detail description of a COMException ?? Any help
    please.


    2. I Choose Items in Toolbox and select COM (OCX). The VStudio generate
    AxInterop.XpdfV iewer.dll.

    (which is the difference AxInterop.XpdfV iewer.dll and
    Interop.XpdfVie wer.dll???)

    For a Component Control, in design, the control XPdfViewer NOT appears in
    toolbox, why ???

    For Forms, in design, the control XPdfViewer appears in toolbox
    For UserControl, in design, the control XPdfViewer appears in toolbox


    Any suggestion about it ? Thanks in advance.


    --


    http://www.setbb.com/putainformatica...opic.php?p=843


  • =?Utf-8?B?Q2lhcmFuIE8nJ0Rvbm5lbGw=?=

    #2
    RE: Using OCX in .NET

    Its been a few years since I used COM based controls but I think the
    difference is the Interop generated file is just a management wrapper around
    the class for using it as a code library. the AxInterop is a wrapper around
    it as an ActiveX control for using it on a form.
    The reason it wont appear for a component is possibly because its an ActiveX
    control as has a UI which so it can only be added to a Form/Usercontrol that
    will use it for a UI control.
    Someone with more recent experience of this than me might be able to confirm
    this though. Its literally been 4 years or so since I used an ActiveX form
    control in .NET

    --
    Ciaran O''Donnell



    "Alhambra Eidos Kiquenet" wrote:
    Hi misters,
    >
    I try use an OCX in my Winforms application with VS 2005.
    >
    The OCX is a PDF Viewer (XPdfViewer)
    >
    I have several issues about it:
    >
    1. I add reference to COM, and VS generate Interop.XpdfVie wer.dll
    >
    When I call to method of COM, I get this error:
    >
    ErrorCode -2147467259
    >
    Exception Details: System.Runtime. InteropServices .COMException: Error
    HRESULT E_FAIL has been returned from a call to a COM component
    >
    One question, how I get a detail description of a COMException ?? Any help
    please.
    >
    >
    2. I Choose Items in Toolbox and select COM (OCX). The VStudio generate
    AxInterop.XpdfV iewer.dll.
    >
    (which is the difference AxInterop.XpdfV iewer.dll and
    Interop.XpdfVie wer.dll???)
    >
    For a Component Control, in design, the control XPdfViewer NOT appears in
    toolbox, why ???
    >
    For Forms, in design, the control XPdfViewer appears in toolbox
    For UserControl, in design, the control XPdfViewer appears in toolbox
    >
    >
    Any suggestion about it ? Thanks in advance.
    >
    >
    --


    http://www.setbb.com/putainformatica...opic.php?p=843

    >

    Comment

    Working...