I have a C++ method and I want to call a C# method from it. passing in a
string. Works fine with int's, but if I have a string arg the method call is
skipped.
#import "../util/Release/AcornActuateUtil.tlb" raw_interfaces_only
using namespace AcornActuateUtil;
extern "C" UINT __stdcall InstallActuate (MSIHANDLE hInstall)
{
// Initialize COM.
HRESULT hr = CoInitialize(NULL);
// Get temporary folder name
long status = 0;
BSTR tempDirName;
status = getTempDir(hInstall, tempDirName);
if (status != ERROR_SUCCESS) return status;
// Create the interface pointer.
IConfigureActuateXmlPtr pIConfig(__uuidof(ConfigureActuateXml));
long lResult;
pIConfig->EditActuateConfigFile(tempDirName, &lResult);
The C#:
public interface IConfigureActuateXml
{
int EditActuateConfigFile(string s);
};
// Interface implementation.
public class ConfigureActuateXml:IConfigureActuateXml
{
private static readonly ILog log =
LogManager.GetLogger("ConfigureActuateXml");
public int EditActuateConfigFile(string s)
{
owen