Please refer to the attached PB9 test case to make getsessioncount function work with Appeon .NET Server version.


Appeon Server open interfaces (methods) in .NET are encapsulated in a standard .NET/COM components. To call .NET/COM components, Appeon provides a non-autoinstantiated NVO - AppeonDotNetComponent - as the proxy object to call the server-side components. Details refer to Calling .NET/COM server components.

Following is the general step guide to invoke the open interface in PowerBuilder.

Step 1 - Load Appeon Workaround PBL to the application.

Step 2 - Make sure the COM components have been registered using the regsvr32 tool and the components have been copied to the %appeon%/AEM/components folder on the Appeon Server machine.

Step 3 - Create an instance of the AppeonDotNetComponent;

Example
String servername,appname
AppeonDotNetComponent loadDBList
Any la_l[]
Long lRet
serverName = ""
appname = ""
la_l[1] = servername //
la_l[2] = appname //
loadDBList = Create AppeonDotNetComponent

Step 4- Specify the ComponentType and Set the TypeLib property and the ClassDescript property to empty;

Example
loadDBList.ComponentType = "4"
loadDBList.TypeLib = ""
loadDBList.ClassDescript = ""

Step 5 - Invoke one or more open interfaces in the components.

Example
lRet = loadDBList.of_ExecInterface("GetSessionCount",la_l)
If lRet = 0 Then
MessageBox("Get session count successfully.","Session Count:"+string
(loadDBList.ReturnValue))
End If

0
0