Book a Demo
Prev Next

Interface CMService

The CMService is the primary interface object, used to access Code Miner data. It allows you to connect to local files as well as local or remote code miner services, and supports execution of mFQL queries against Code Miner databases.

CMService Methods

Method

Remarks

See also

GetLastError( )

Returns a string value describing the most recent error that occurred in relation to this object, or null string if there was no error.

Return type:  string  (read only)

CMLoadDatabase(string filename)

Load a Code Miner database from a file.  Returns True on success; check GetLastError on failure.

Return type:  boolean  (read only)

Parameters:

  • filename: Full path to Code Miner database file.

CMConnectService(string hostname, long port, long dbID)

Connect to a Code Miner service.  Returns True on success; check GetLastError on failure.

Note:  To query all code miner databases, specify dbID = -1.

Return type:  boolean  (read only)

Parameters:

  • hostname: the computer name to connect to
  • port: port number the service is listening to
  • dbID: Database ID to use.

CMConnectAnalyzer()

Connect to the default Code Miner database.  Returns True on success; check GetLastError on failure.

Return type:  boolean  (read only)

CMAcquire()

Currently not implemented.

Return type:  boolean

ExecuteMFQL(string Query)

Returns a CMDataSet object on success; check GetLastError on failure.

Return type:  CMDataSet  (read only)

Parameter:

  • query: An mFQL query string
Interface CMDataSet

CloseCMDatabase()

Close the connection to the Code Miner service or database file.  Returns True on success; check GetLastError on failure.

Return type:  boolean  (read only)