Page 1 of 1
Call dll and .net or VB
Posted: Mon Aug 20, 2007 6:21 am
by arupkrdas
Hi,
Is there any way that i can use to call a dll file created in VB.NET, C# or VB6? If yes then how? I mean in the dll file there should be a class and the function will recide in side the class. But i get the option of specifying the DLL file name and function name when i use Call DLL. So how do i callla function that recides in a class created by VB.NET, C# or VB6 When ever i try to acces a function from a dll created by any of these, i get the message "FUNCTIONNOTFOUND" .
Arup..
Same Question
Posted: Mon Aug 20, 2007 10:03 am
by SteveDude
I asked the same question awhile back and never got a reponse. For me it's a COM DLL I would like to use. You can do it in InstallShield via vbScript.
Re: Same Question
Posted: Mon Aug 20, 2007 10:52 pm
by arupkrdas
SteveDude wrote:I asked the same question awhile back and never got a reponse. For me it's a COM DLL I would like to use. You can do it in InstallShield via vbScript.
Thanx a lot Steve for the reply. But can u just help me a bit more. How can i "You can do it in InstallShield via vbScript." I mean should i create COM Dll in languages like C or C++? Inshalshield is not an option for me coz it's too costly. So i have to manage it from here only.
Posted: Tue Aug 21, 2007 2:50 am
by Gizm0
We have replied to these kinds of questions a million times and it's mentioned on the Help file too.
You need a Win32 DLL in order to be able to execute it on InstallAWARE. C# and any other .Net language DOES NOT produce a Win32 DLL , thus you CANNOT call it from InstallAWARE through typical Windows API.
A workaround is to create a .Net Exe that takes some parameters and returns a code, read that code, and do your actions based on the return code. This will require .net to be installed on the end machine.
Don't want an EXE
Posted: Tue Aug 21, 2007 6:09 pm
by SteveDude
I know it's been asked and reanswered. Was just hoping someone came up with a work around. You can pull it off in Wise and InstallShield using vbscript - at least for COM.
I'm playing around with the plugin template now and am attempting to call a COM DLL from within it.
Will post my results.
...Another good reason to make a FAQ's section in the forum.
Re: Don't want an EXE
Posted: Tue Aug 21, 2007 11:31 pm
by arupkrdas
SteveDude wrote:I know it's been asked and reanswered. Was just hoping someone came up with a work around. You can pull it off in Wise and InstallShield using vbscript - at least for COM.
I'm playing around with the plugin template now and am attempting to call a COM DLL from within it.
Will post my results.
...Another good reason to make a FAQ's section in the forum.
Thanks steve, I also knew that it has been answered too but was wondering, if some one has come up with any alternative solution. Will wait for your result.

Non-sense
Posted: Tue Aug 28, 2007 12:24 am
by lextm
I believe it is at this moment non-sense to call functions from a .NET assembly. Except Windows Server 2003/Vista, other Windows do not ship with .NET Framework.
In order to make your installer run on all Windows platforms, you should only make use of Win32 DLL.
I agree with Gizm0 about running a .NET executable but still it requires .NET Framework installation.
Re: Non-sense
Posted: Tue Aug 28, 2007 11:09 pm
by arupkrdas
lextm wrote:I believe it is at this moment non-sense to call functions from a .NET assembly. Except Windows Server 2003/Vista, other Windows do not ship with .NET Framework.
In order to make your installer run on all Windows platforms, you should only make use of Win32 DLL.
I agree with Gizm0 about running a .NET executable but still it requires .NET Framework installation.
Please read the requirements before u call something "non-sense".
1st> in my requirements list VB6 was also there. For which one doesn't need frame work to be installed (at list i think so).
2nd>There is something called prerequisites in the installer and framework is part of that, and even before the main installation begins the prerequisites gets installed, and i shall I think of calling a .net dll only when I am going to deploy a .NET solution. So after Installing Framework as prerequisites if I think of calling a .NET dll, I don’t find any thing non-sense in that.
3rd> and my friend if you are aware that most of the new PCs (Not all of them I know) are coming with Vista bundled and installed in it. An installer is not something u make every day. So while building if I consider Vista also I don’t think I am doing too much of non-sense.
4th>When Installware has provided so much of functionality then I thought there may be a solution to that, or may be if they see such requirement they might think of adding this to there future releases. If I "should only make use of Win32 DLL." then lets give-up using .NET and get back to coding in C, C++ or give up using even windows and live in the UNIX life.
I do understand that one software can not be just perfect and can make everybody happy. Every software has limitations and we have to find a way around that, not necessarily that the company is going to do that for u but also by the users, and I have seen this before that users have been able to find an alternative solution to a problem. And forum is the place where we discuss such things. If u don’t have a solution no problem at all, but be sure when u call something “non-sense” that it actually is “non sense”.
...
Posted: Wed Aug 29, 2007 7:35 am
by SteveDude
I think calling it non-sense is non-sense itself and shows a limited viewpoint of what other people may do/need in the real world.
There are many reasons some would want to do this. I have it working with COM now by just calling the DLL from a plug-in and changing the return value to fit with in the plug-in frame work (Had to include a hard coded reference to it when I built the plug-in)....
My reason, I needed to use a COM DLL that was not part of a program I installed, because it is an add-in to another program, and I needed a way to automate that program and add a new menu to it.
Much easier in Wise and InstallShield because of support for vbscript, but as we know, everything else in those programs does not do as well as IA -excluding registering COM Objects

.
I'm way behind on the .NET stuff, so can't be much help there.