C/C++ API Function Question

Post Reply
User avatar
George Regateiro
MVP
Posts: 326
Joined: Fri May 16, 2008 3:35 pm
OLAP Product: TM1
Version: 10.1.1
Excel Version: 2007 SP3
Location: Tampa FL USA

C/C++ API Function Question

Post by George Regateiro »

I have tried decomposing the DLL for the C API looking for a function that mimics the Disconnect Clients option under Server Manager window of Architect, but I have not found anything that looks similar. There are functions that seem API specific to kill the current user session in the API, but not one that I can disconnect a client (or set) of my choosing. Is there one that I have missed that will perform the client disconnect option?
User avatar
Mike Cowie
Site Admin
Posts: 482
Joined: Sun May 11, 2008 7:07 pm
OLAP Product: IBM TM1/PA, SSAS, and more
Version: Anything thru 11.x
Excel Version: 2003 - Office 365
Location: Alabama, USA
Contact:

Re: C/C++ API Function Question

Post by Mike Cowie »

Hi George:

I had to ask for this originally - not sure why it's not been documented since I asked back in 2000.

This is an old VBA/VB6 declaration, which shouldn't be too hard to rework for C/C++:

Code: Select all

Declare Function TM1ClientDisconnect Lib "tm1api.dll" (ByVal hPool As Long, ByVal hServer As Long, ByVal sClientName As Long) As Long
I believe it will disconnect all connections for that specified user (provided you're an Admin).

Regards,
Mike
Mike Cowie
QueBIT Consulting, LLC

Are you lost without Print Reports in Planning Analytics for Excel (PAfE)? Get it back today, for free, with Print Reports for IBM Planning Analytics for Excel!
Firefly007
Posts: 25
Joined: Tue Feb 26, 2013 12:51 am
OLAP Product: PA,PAW
Version: PA 2.0, PAW(2059)
Excel Version: Excel 2010

Re: C/C++ API Function Question

Post by Firefly007 »

Hello Mike,

TM1ClientDisconnect is not available in TM1 10.2 API list . Is there is any alternate function need to be used to disconnect All active clients?

Thanks,
User avatar
Mike Cowie
Site Admin
Posts: 482
Joined: Sun May 11, 2008 7:07 pm
OLAP Product: IBM TM1/PA, SSAS, and more
Version: Anything thru 11.x
Excel Version: 2003 - Office 365
Location: Alabama, USA
Contact:

Re: C/C++ API Function Question

Post by Mike Cowie »

Hi Firefly007:

No, I don't know of an alternative. As I said below, this function has been around since 2000, but has never been officially documented by Applix, Cognos and now IBM. Why they haven't documented it is beyond me, but you should be able to use it to disconnect all clients (one at a time). It should still be available for use as long as the VB/C TM1 API exists/is supported.

Regards,
Mike
Mike Cowie
QueBIT Consulting, LLC

Are you lost without Print Reports in Planning Analytics for Excel (PAfE)? Get it back today, for free, with Print Reports for IBM Planning Analytics for Excel!
User avatar
Harvey
Community Contributor
Posts: 236
Joined: Mon Aug 04, 2008 4:43 am
OLAP Product: PA, TM1, CX, Palo
Version: TM1 8.3 onwards
Excel Version: 2003 onwards
Contact:

Re: C/C++ API Function Question

Post by Harvey »

TM1ClientDisconnect definitely exists in the 10.1 API dll.

I don't have 10.2 installed on this machine, but I'd be surprised if it was removed, since the front end calls it!

There is also a function called TM1ClientDisconnectEx, but since I'm just "peeking" at the dll using Dependency Walker, I don't know what the purpose of that is.

If you want to know more about using Dependency Walker to look at the function signatures of the API, it's covered in this blog article.

You will be able to use it to verify that 10.2 includes the function call, but you will get a lot of other interesting information from it as well.
Take your TM1 experience to the next level - TM1Innovators.net
Post Reply