I have a .net dll that I want to use in my php application
I have tested the dll on .net app and it worked perfectly
my c# class:
namespace CryptoCs
{
[Guid("15D16831-D6BE-43C4-AB4F-F0BAA35987DB")]
[ClassInterface(ClassInterfaceType.None)]
[ProgId("CryptoCs")]
[ComVisible(true)]
public class Crypto : iCryptoCs
{
public Crypto()
{
}
public bool Login(string username, string password)
{
// some code
}
}
[Guid("5BDBB53A-571A-4EC7-B37E-A4D2A6A54DEB")]
[InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
[ComVisible(true)]
public interface iCryptoCs
{
[DispId(1)]
bool Login(string username, string password);
}
}
my usage code is:
$crypto = new COM('CryptoCs.Crypto');
this page give this error:
Failed to create COM object
I tried to register the dll using gacutil.exe the result was:
Assembly successfully added to the cache
but the error wasn't fixed
I tried regasm.exe and the result is:
Types registered successfully
still the error is the same
I tried REGSVR32.exe but it gabe me this error:
Can't find entry point
I'm on windows server 2003 sp2 using vs2010 .net4