I'm quite new to InstallShield, and have a problem, to which i'm sure
the answer is quite simple.
I'm trying to call a C# dll function from within IS Pro 11
InstallScript (I dont see an IS11 group?).
********************************************
C#, Class Library Code (Loads an XML file):
********************************************
using System;
using System.Xml;
namespace IS_XMLWrapper
{
/// <summary>
/// XML Wrapper for use with InstallScript
/// </summary>
public class XMLWrapper
{
private XmlDocument mXMLDoc;
#region Initialization,Loading and Saving
/// <summary>
/// Constructor
/// </summary>
public XMLWrapper()
{
mXMLDoc = new XmlDocument();
}
/// <summary>
/// Loads an XML File
/// </summary>
/// <param name="filename">The file to load</param>
public void loadFile(string filename)
{
mXMLDoc.Load(filename);
}
#endregion
}
}
********************************************
InstallScript Code:
********************************************
...
export prototype ISFn_LoadXMLFile();
prototype STDCALL IS_XMLWrapper.loadFile(BYREF STRING);
// Code start ------------------------------------------------
function ISFn_LoadXMLFile()
STRING szConfigFile;
NUMBER nReturn;
begin
nReturn = UseDLL( SUPPORTDIR ^ "IS_XMLWrapper.dll" );
szConfigFile = TARGETDIR ^ "\\Server.XML";
//******************************************
// Error occurs on the following line
//******************************************
IS_XMLWrapper.loadFile(szConfigFile);
UnUseDLL( SUPPORTDIR ^ "K2IS_XMLWrapper.dll" );
end;
********************************************************
When calling the dll function I get the error:
Err.Number: 0x80040703 (-2147219709)
Err.Description: Failed to find dll function: IS_XMLWrapper.loadFile
Setup will now terminate.
********************************************************
Is there some way in which I should specify the class name "XMLWrapper"
when calling the function?
Any help would be greatly appreciated!!!