Skip to main content

PCMSCloseServer

Syntax

int PCMSCloseServer(PCMServerID serv)

Parameters

PCMServerID serv – The PC*Miler server ID.

Description

Deletes any remaining trips that haven’t been deleted with PCMSDeletetrip and unloads the PC*Miler highway database. PCMSCloseServer is the last PC*Miler Connect function called when finished using the engine. You must call PCMSOpenServer again to reinitialize PC*Miler Connect before calling any other functions.

Return Values

Returns zero (0) upon success. A negative one (-1) indicates an error has occurred.

Sample Code

void UsePCMILER()
{
  PCMServerID server;
  /* Pass neither instance handle, nor parent window*/
  server = PCMSOpenServer(0, 0);
  /* Do other processing here. */
  /* Use the server: calculate trips, etc.... */
  /* Shut down the server */
  PCMSCloseServer(server);
}

Supported Since: PC*Miler Connect 12

Category: Administration

Last updated July 8, 2025.