Reputation: 83
I have a unmanaged c# dll (using Giesecke Dllexport). When I open this dll with js-ctypes in Windows 7,8 64/32 bits it works, but if I try it on Windows XP i get the error: "couldn't open library".
I made this dll using .Net Framework 2.0.
using RGiesecke.DllExport;
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Text;
namespace MinhaDll
{
public class Dll
{
[DllExport("getA", CallingConvention = CallingConvention.StdCall)]
[return: MarshalAs(UnmanagedType.LPStr)]
public static string getA()
{
return "a";
}
[DllExport("getB", CallingConvention = CallingConvention.StdCall)]
[return: MarshalAs(UnmanagedType.LPStr)]
public static string getB()
{
return "b";
}
}
}
It's like this question, but it doesn't helped me:
Unmanaged DLL Export with Robert Giesecke Library Not Working Under Windows XP
Upvotes: 0
Views: 181
Reputation: 83
Solved it!
I created a new DLL x86 from scratch in C# using DLLExporter by RGiesecke and .NET Framework 2.0, and now this works.
Upvotes: 1