Show/Hide Toolbars

Licence Protector 5

 

Name

StopConcurrentUsage                                                                              

Purpose

Stops the concurrent usage of a module for a user

Params

Parameter

Type

Example

Note

ModuleID

String

D1006

Unique ModuleID – identifies the module to be tested

Name

String

Tom

The user or item name to check for

UseWindowsUser

Boolean

False

Determines if the windows login name should be used as name

Returncode

Returncode

Type Integer

Note

0

Ok, User no longer use this module

256

Module with the specified user is not recognized as running concurrent user

Usage

An alternative for quit which stops all local concurrent users. StopConcurrentUsage only stops the specified user for the specified module and frees that one slot for other users.

Sample

 

  iRes := lic.StopConcurrentUsage(‘D1006’, ‘’, true);

  if iRes = 0 then

  begin

     << successfully removed >>

     ...

  end

  else if iRes = 256 then

  begin

     << user on that module probably wasn’t active >>

     ...

  end

  else

  begin

     << another error occurred >>

     ...

 

See also

Concurrent User Modules, Validate, Quit, GetCUIsRunning, GetCUNextValidate, GetCULastValidate, GetCURunCounter

 

If you want to remove the user from all modules, use QUIT at the end of your application.