Hello,
I'm trying to use functions via a self-written DLL with Interop COM at Access 2021 64-bit.
The DLL works and is registered with regasm.exe /codebase. However, as soon as I add this DLL at the references (just adding without using the functions at all), the Access Format function no longer works as a side effect. She only gives #Name! as a result. If I remove the reference it works again. I have checked all references and none are missing.
The DLL consists only of a class called MyTest and a function called Test. If I try to use the function Test it works. Only the standard Format function in Access no longer works in all places in the database as soon I add the reference.
Code:
namespace Test
{
[ComVisible(true)]
[Guid("1D47E5B9-416D-450E-B0BD-27348B4703BA")]
[InterfaceType(ComInterfaceType.InterfaceIsDual)]
public interface ITest
{
string Test();
}
[ComVisible(true)]
[Guid("E9DB2D69-6054-47A0-AD9D-28B263432303")]
[ClassInterface(ClassInterfaceType.None)]
[ProgId("Test.MyTest")]
public class MyTest : ITest
{
public MyTest()
{
}
public string Test()
{
string returnValue = "Test";
return returnValue;
}
}
}
I can't explain why this could be and I just can't find a solution.
I would be grateful for any tip or help.
Thanks a lot,
Andreas