Can anyone see whats wrong with this: I keep getting a function not found error:
~InstallAware Clipboard Data~
~Call DLL Function~
~{C8EA685B-9A90-4245-994D-9F2B0BD0011D}~
~"C:\\Users\\myname\\Documents\\Visual Studio 2005\\Projects\\getIPaddress\\getIPaddress\\bin\\Debug\\getIPaddress.dll",test,bool,testVar,$~
~mIDEFunc.dll\\mEXEFunc.dll~
Any help is appreciated.
here's the dll its just a simple c# class to get the ipAddress of a server.
------------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Text;
using System.Net;
namespace getIPaddress
{
public class ipManager
{
public ipManager()
{
}
public string returnHostName()
{
String strHostName;
strHostName= Dns.GetHostName();
return strHostName;
}
public bool test()
{
return true;
}
public string returnIPAddress()
{
String returnIP;
IPHostEntry ipEntry = Dns.GetHostByName(returnHostName());
IPAddress[] addr = ipEntry.AddressList;
returnIP = addr[0].ToString();
return returnIP;
}
}
}
----------------------------------------------------------------------------------
CALL DLL FUNCTION SYNTAX
-
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
I don't think you can create C# DLLs which can be called by ordinary Win32 apps using the STDCALL calling convention.
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
-
- Posts: 5
- Joined: Fri Jul 13, 2007 9:12 am
so do i have to write the dll in c++ so??
Also just wondering can I load a dll into a $PROGRAMFOLDER$ on setup of the installer. Can I just use the INSTALL FILES command in setup. So that I can actually use the CALL DLL FUNCTION to populate a varaiable before the dialog appears.
~Install Files~
~{08E472E5-5D3F-40E7-88CD-1B673C02F140}~
~C:\\Users\\myname\\Documents\\Visual Studio 2005\\Projects\\getIPaddress\\getIPaddress\\bin\\Debug\\getIPaddress.dll~
~FALSE|~
~$PROGRAMFILES$~
~FALSE~
~FALSE~
~FALSE~
~FALSE~
~FALSE~
~FALSE~
~FALSE~
~FALSE~
~FALSE~
Regards
Vince
Also just wondering can I load a dll into a $PROGRAMFOLDER$ on setup of the installer. Can I just use the INSTALL FILES command in setup. So that I can actually use the CALL DLL FUNCTION to populate a varaiable before the dialog appears.
~Install Files~
~{08E472E5-5D3F-40E7-88CD-1B673C02F140}~
~C:\\Users\\myname\\Documents\\Visual Studio 2005\\Projects\\getIPaddress\\getIPaddress\\bin\\Debug\\getIPaddress.dll~
~FALSE|~
~$PROGRAMFILES$~
~FALSE~
~FALSE~
~FALSE~
~FALSE~
~FALSE~
~FALSE~
~FALSE~
~FALSE~
~FALSE~
Regards
Vince
-
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
Install Files (and other purple - AKA Windows Installer) commands are not processed until Apply Install. So you may want to add the DLL as a support file and reference it using $SUPPORTDIR$ instead.
You can write a Win32 DLL in any language that supports pure Win32 output, but .NET probably won't work.
You can write a Win32 DLL in any language that supports pure Win32 output, but .NET probably won't work.
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
-
- Posts: 5
- Joined: Fri Jul 13, 2007 9:12 am
-
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
Also, I just heard that with Delphi .NET you can create DLLs in .NET that can still be called from Win32 applications using a process called reverse P/Invoke.
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
-
- Posts: 5
- Joined: Fri Jul 13, 2007 9:12 am
Who is online
Users browsing this forum: Baidu [Spider] and 108 guests