I am attempting to write a C# application connecting to a Cognos TM1 datastore using the tm1api.dll. I have created a basic shell project in VS C# Express 2008, and added the following code
public partial class MainPortal : Window
{
[System.Runtime.InteropServices.DllImport(@"C:\\Program Files\\Cognos\\TM1\\bin\\tm1api.dll", EntryPoint="TM1APIInitialise")]
public static extern void TM1APIInitialise();
public MainPortal()
{
InitializeComponent();
TM1APIInitialise();
}
}
I can build this project with no errors, but when running I get the following error:
"Unable to find an entry point named 'TM1APIInitialise' in DLL 'C:\\Program Files\\Cognos\\TM1\\bin\\tm1api.dll'."
I have used 'dumpbin /exports tm1api.dll' to determine its entry point:
101 5D 00008360 TM1APIFinalize
Now I am at a loss, it seems to have an entry point but does recognize it. Can anyone point me in the right direction?
PS. I am completely new to C#, so I may be making extremely basic mistakes :)