473,399 Members | 4,177 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Interop Dlls question

Hi,
In my application I have to use som external COM dll's.
In the code:
using MyDll

when I build the project, I get (in addition to the .exe file) a Dll called
Interop.MyDll.dll
I want to send the .exe to the users without needing to send the dll.
Is it possible to build my project without the accompanying dll ?

Yoav.
Jan 1 '07 #1
5 1879
Hi Yoav,

The .dll itself is a managed wrapper around your unmanaged reference.
Without the managed wrapper your program can't run.

Unless that .dll is in the GAC on all users' machines then you'll need to
install it with your .exe.

You can add a Setup and Deployment project to your solution and choose the
project output for your application's project. The .msi file that is
created will install both files.

You can also use ClickOnce in the 2.0 Framework as an alternative if you
want to provide a web installer.

Of course, the last option is to simply copy both files to the users'
machines :)

--
Dave Sexton
http://davesexton.com/blog

"Yoavo" <yo**@cimatron.co.ilwrote in message
news:el**************@TK2MSFTNGP02.phx.gbl...
Hi,
In my application I have to use som external COM dll's.
In the code:
using MyDll

when I build the project, I get (in addition to the .exe file) a Dll
called Interop.MyDll.dll
I want to send the .exe to the users without needing to send the dll.
Is it possible to build my project without the accompanying dll ?

Yoav.

Jan 1 '07 #2
Thanks for the answer.
However, I have a another question regarding this issue:
I have another application that uses the same COM Dll's but use different
interfaces.
Will the resulting interop Dll's will be the same as the first application ?
( Can I use one interop dll for both applications? )

Yoav.
"Dave Sexton" <dave@jwa[remove.this]online.comwrote in message
news:OM**************@TK2MSFTNGP03.phx.gbl...
Hi Yoav,

The .dll itself is a managed wrapper around your unmanaged reference.
Without the managed wrapper your program can't run.

Unless that .dll is in the GAC on all users' machines then you'll need to
install it with your .exe.

You can add a Setup and Deployment project to your solution and choose the
project output for your application's project. The .msi file that is
created will install both files.

You can also use ClickOnce in the 2.0 Framework as an alternative if you
want to provide a web installer.

Of course, the last option is to simply copy both files to the users'
machines :)

--
Dave Sexton
http://davesexton.com/blog

"Yoavo" <yo**@cimatron.co.ilwrote in message
news:el**************@TK2MSFTNGP02.phx.gbl...
>Hi,
In my application I have to use som external COM dll's.
In the code:
using MyDll

when I build the project, I get (in addition to the .exe file) a Dll
called Interop.MyDll.dll
I want to send the .exe to the users without needing to send the dll.
Is it possible to build my project without the accompanying dll ?

Yoav.


Jan 2 '07 #3
Hi Yoav,

You can have as many different versions of the interop assembly as you'd
like. One for each application is fine.

On the other hand, if there is a PIA (Primary Interop Assembly) provided by
the author then you should use that instead, in which case it's probably in
the GAC.

Whether there is a PIA or the interop assembly is made by you it could be
installed into the GAC so that it's shared by all of your applications, in
one place. Check out the gacutil program or you can simply copy the
assembly into the gac using explorer. (Another option is to use the Global
Assembly Cache folder in a Setup and Deployment project).

--
Dave Sexton
http://davesexton.com/blog

"Yoavo" <yo**@cimatron.co.ilwrote in message
news:uy****************@TK2MSFTNGP02.phx.gbl...
Thanks for the answer.
However, I have a another question regarding this issue:
I have another application that uses the same COM Dll's but use different
interfaces.
Will the resulting interop Dll's will be the same as the first application
?
( Can I use one interop dll for both applications? )

Yoav.
"Dave Sexton" <dave@jwa[remove.this]online.comwrote in message
news:OM**************@TK2MSFTNGP03.phx.gbl...
>Hi Yoav,

The .dll itself is a managed wrapper around your unmanaged reference.
Without the managed wrapper your program can't run.

Unless that .dll is in the GAC on all users' machines then you'll need to
install it with your .exe.

You can add a Setup and Deployment project to your solution and choose
the project output for your application's project. The .msi file that is
created will install both files.

You can also use ClickOnce in the 2.0 Framework as an alternative if you
want to provide a web installer.

Of course, the last option is to simply copy both files to the users'
machines :)

--
Dave Sexton
http://davesexton.com/blog

"Yoavo" <yo**@cimatron.co.ilwrote in message
news:el**************@TK2MSFTNGP02.phx.gbl...
>>Hi,
In my application I have to use som external COM dll's.
In the code:
using MyDll

when I build the project, I get (in addition to the .exe file) a Dll
called Interop.MyDll.dll
I want to send the .exe to the users without needing to send the dll.
Is it possible to build my project without the accompanying dll ?

Yoav.



Jan 2 '07 #4
Is one of the Interop files that are created by one of the applications can
be used as the PIA ?
"Dave Sexton" <dave@jwa[remove.this]online.comwrote in message
news:uD**************@TK2MSFTNGP06.phx.gbl...
Hi Yoav,

You can have as many different versions of the interop assembly as you'd
like. One for each application is fine.

On the other hand, if there is a PIA (Primary Interop Assembly) provided
by the author then you should use that instead, in which case it's
probably in the GAC.

Whether there is a PIA or the interop assembly is made by you it could be
installed into the GAC so that it's shared by all of your applications, in
one place. Check out the gacutil program or you can simply copy the
assembly into the gac using explorer. (Another option is to use the
Global Assembly Cache folder in a Setup and Deployment project).

--
Dave Sexton
http://davesexton.com/blog

"Yoavo" <yo**@cimatron.co.ilwrote in message
news:uy****************@TK2MSFTNGP02.phx.gbl...
>Thanks for the answer.
However, I have a another question regarding this issue:
I have another application that uses the same COM Dll's but use different
interfaces.
Will the resulting interop Dll's will be the same as the first
application ?
( Can I use one interop dll for both applications? )

Yoav.
"Dave Sexton" <dave@jwa[remove.this]online.comwrote in message
news:OM**************@TK2MSFTNGP03.phx.gbl...
>>Hi Yoav,

The .dll itself is a managed wrapper around your unmanaged reference.
Without the managed wrapper your program can't run.

Unless that .dll is in the GAC on all users' machines then you'll need
to install it with your .exe.

You can add a Setup and Deployment project to your solution and choose
the project output for your application's project. The .msi file that
is created will install both files.

You can also use ClickOnce in the 2.0 Framework as an alternative if you
want to provide a web installer.

Of course, the last option is to simply copy both files to the users'
machines :)

--
Dave Sexton
http://davesexton.com/blog

"Yoavo" <yo**@cimatron.co.ilwrote in message
news:el**************@TK2MSFTNGP02.phx.gbl...
Hi,
In my application I have to use som external COM dll's.
In the code:
using MyDll

when I build the project, I get (in addition to the .exe file) a Dll
called Interop.MyDll.dll
I want to send the .exe to the users without needing to send the dll.
Is it possible to build my project without the accompanying dll ?

Yoav.



Jan 2 '07 #5
Hi Yoavo,

PIA is just a fancy name for the interop assembly that a company claims to
be its primary assembly for interoperability with its unmanaged component.
Typically PIAs are a better managed wrapper than what is generated by the
tlbimp program used by Visual Studio.

You can't really make your own PIA unless it's your own unmanaged component
that you're wrapping :)

--
Dave Sexton
http://davesexton.com/blog

"Yoavo" <yo**@cimatron.co.ilwrote in message
news:eW**************@TK2MSFTNGP02.phx.gbl...
Is one of the Interop files that are created by one of the applications
can be used as the PIA ?
"Dave Sexton" <dave@jwa[remove.this]online.comwrote in message
news:uD**************@TK2MSFTNGP06.phx.gbl...
>Hi Yoav,

You can have as many different versions of the interop assembly as you'd
like. One for each application is fine.

On the other hand, if there is a PIA (Primary Interop Assembly) provided
by the author then you should use that instead, in which case it's
probably in the GAC.

Whether there is a PIA or the interop assembly is made by you it could be
installed into the GAC so that it's shared by all of your applications,
in one place. Check out the gacutil program or you can simply copy the
assembly into the gac using explorer. (Another option is to use the
Global Assembly Cache folder in a Setup and Deployment project).

--
Dave Sexton
http://davesexton.com/blog

"Yoavo" <yo**@cimatron.co.ilwrote in message
news:uy****************@TK2MSFTNGP02.phx.gbl...
>>Thanks for the answer.
However, I have a another question regarding this issue:
I have another application that uses the same COM Dll's but use
different interfaces.
Will the resulting interop Dll's will be the same as the first
application ?
( Can I use one interop dll for both applications? )

Yoav.
"Dave Sexton" <dave@jwa[remove.this]online.comwrote in message
news:OM**************@TK2MSFTNGP03.phx.gbl...
Hi Yoav,

The .dll itself is a managed wrapper around your unmanaged reference.
Without the managed wrapper your program can't run.

Unless that .dll is in the GAC on all users' machines then you'll need
to install it with your .exe.

You can add a Setup and Deployment project to your solution and choose
the project output for your application's project. The .msi file that
is created will install both files.

You can also use ClickOnce in the 2.0 Framework as an alternative if
you want to provide a web installer.

Of course, the last option is to simply copy both files to the users'
machines :)

--
Dave Sexton
http://davesexton.com/blog

"Yoavo" <yo**@cimatron.co.ilwrote in message
news:el**************@TK2MSFTNGP02.phx.gbl...
Hi,
In my application I have to use som external COM dll's.
In the code:
using MyDll
>
when I build the project, I get (in addition to the .exe file) a Dll
called Interop.MyDll.dll
I want to send the .exe to the users without needing to send the dll.
Is it possible to build my project without the accompanying dll ?
>
Yoav.
>




Jan 2 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Mike | last post by:
Hi, Using VS 2005, i created a class lib using C#. i compiled this as a dll with the "Register for Com Interop" Option checked. In microsoft access, i am able to create the classes in that dll...
1
by: Shiro | last post by:
Hi I have read the various postings relating to Interop strong name signing and cannot find an example similar to mine. I have stringly named my AxInterops/Interops and they all work just...
8
by: Rob Edwards | last post by:
When trying to add the Microsoft CDO for Exchange Management Library (aka CDOEXM.dll) I receive the following message: "A reference to 'Microsoft CDO for Exchange Management Library' could not be...
2
by: William LaMartin | last post by:
I have created a program that allows for the automation of things in Word documents, like changing the values of DocVariables and the links to Excel Sheets. I did it using interoperoperatability,...
4
by: Philip Wagenaar | last post by:
I am trying to create a vb6 activeX dll in .Net. I used the upgrade wizard in vs.net to load my vb6 project and it converted it to vb.net. Now I know that I have to register the DLL from COM...
9
by: Lloyd Dupont | last post by:
If I write a pure C# application, only using the standart publi API, no interop, the same binary should work well on32 bit, 64 bits and perhaps on the compact framework as well if I link against...
1
by: Don.Leri | last post by:
Hi, I have a logger.dll (unmanaged c++ dll compiled in vs2005). I have a C# interop to use that dll in managed code implemented in Interfaces.dll (used by other C# dlls). I also have a...
1
by: Armin Zingler | last post by:
Hi group, after waiting more than 4 month in the .upgrade group for an answer, I dare to ask here. :-) I open a VB6 project in VB 2008 (express) and have the Wizard convert it. It also...
4
by: Just_a_fan | last post by:
I have Googled and done a search in the VB induced help. No answer is apparent. What is the difference of dlls prefixed with Ax and those without? Best I can see, Ax stands for the older...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.