468,135 Members | 1,455 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,135 developers. It's quick & easy.

Install COM using ClickOnce

Hi misters,

I have installed my windows application that uses XpdfViewer (a COM
Component for view Pdfs) using ClickOnce.

But I get this error:

Message:
GRUPOBACKUP.Administrador.Pantallas.IndexadoAutoma tico.frmIndexadoAutomaticoComun
-ProcesarFicheroPDF. Unable to cast COM object of type 'System.__ComObject'
to interface type 'XpdfViewer.IXpdfViewer'. This operation failed because the
QueryInterface call on the COM component for the interface with IID
'{59DF0320-224E-11D7-BD2E-08004608C318}' failed due to the following error:
Interfaz no compatible (Exception from HRESULT: 0x80004002 (E_NOINTERFACE))..
at XpdfViewer.IXpdfViewer.loadFile(String pdfFileName)

at AxXpdfViewer.AxXpdfViewer.loadFile(String pdfFileName)

at GRUPOBACKUP.Componentes.LibreriaPDF.WrapperUCVisor PDF.LoadFile(String
pdfFileName)

at
GRUPOBACKUP.Administrador.Pantallas.IndexadoAutoma tico.frmIndexadoAutomaticoComun.ProcesarFicheroPDF (DoWorkEventArgs e)

If I register manually Xpdfviewer using regsvr32 XpdfviewerCtr.ocx, my
application works fine. But I want and I need install the application using
ClickOnce.

In documentation of ClickOnce it appears:

Visual Studio 2005 includes a new feature called RegFree COM
(Registration-Free COM). Using RegFree COM, you can deploy an application
that uses a COM component without needing to register it on the user's
machine, so you avoid the notorious problems of "DLL hell." You can even have
multiple versions of the COM component running side by side on the same
machine.
--------------------------------------------------------------------------------

Tip: RegFree COM works by automatically generating a manifest from the COM
component's type library and component registration on the developer's
machine. Therefore, while you're not required to install the component on
your users' machines, a copy must be registered on the developer's machine.
--------------------------------------------------------------------------------

To support RegFree COM, all COM components referenced in Visual Studio 2005
have a new Isolated property. If you set Isolated to TRue, then the component
can be deployed through ClickOnce and Visual Studio 2005 will automatically
do all of the work to deploy the COM component onto the target machine
(without needing to register it on the target machine).

As an example, you can drag and drop an OCX control (such as Acrobat's PDF
viewer control) onto your form and, under the References section in Solution
Explorer (click the Show All Files button located second from left at the top
of Solution Explorer), view the properties of the control (AxAcroPDFLib; see
Figure 1-19), and set its Isolated property to TRue.

Figure 1-19. Setting the Isolated property of an OCX control for RegFree COM


In my Solution Explorer, I have two references:

AxInterop.XpdfViewer.dll has not Isolated property

Interop.XpdfViewer.dll has Isolated property and I set to True

Please, mister, any suggestions for install my application using XpdfViewer
with ClickOnce VS 2005 ??

Thanks in advanced, greetings.

--
http://www.alhambra-eidos.es/web2005/index.html
www.kiquenet.net
http://www.setbb.com/putainformatica...opic.php?p=843
www.trabajobasura.com/solusoft

Sep 1 '08 #1
2 3262
Well, you can try registry-free COM, but frankly it is not simple to do.

With regular COM, if the tlb/dll isn't already registered at the client
then ClickOnce probably isn't a suitable deployment mechanism. ClickOnce
is designed to be /largely/ isolated and side-effect free, and COM
registrations don't meet this condition. Consider installing with an
installer msi instead.

Marc
Sep 1 '08 #2
I should clarify - many of these issues manifest when the referenced COM
library is part of non-trivial client install (for example using
multiple dll/ocx files). In this case, it may be preferable to get the
user to install the necessary files manually via pre-requisites.

Where possible, sourcing 100%-managed utilities is a simpler approach -
but I realise that this is not always possible.

Marc
Sep 1 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by Bryce K. Nielsen | last post: by
1 post views Thread by Ronald S. Cook | last post: by
8 posts views Thread by deciacco | last post: by
2 posts views Thread by =?Utf-8?B?ZnJlZGR5?= | last post: by
3 posts views Thread by =?Utf-8?B?Um9nZXIgVHJhbmNoZXo=?= | last post: by
3 posts views Thread by =?Utf-8?B?S2VuIExlbWlldXg=?= | last post: by
1 post views Thread by gcdp | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.