Page 1 of 1

TM1APIFinalize problem

Posted: Sun May 24, 2009 2:27 pm
by mitch23
I am trying to learn the TM1 API and will probably post a few questions here as I do. The firt problem I'm having is properly disconnecting and cleaning up the session. I have followed the example in the help file verbatim and use the function TM1APIFinalize as the final line. The problem is that I get a "Bad DLL Calling Convention" error. Any ideas?

Re: TM1APIFinalize problem

Posted: Sun May 24, 2009 2:48 pm
by mitch23
It seems that I may have stumbled accross the answer. It appears that the declaration syntax in the help file is incorrect. The help file is:

Declare Function TM1APIFinalize Lib "tm1api.dll" ()

but it should be:

Declare Sub TM1APIFinalize Lib "tm1api.dll" ()