CmBorrow
Description
CmBorrow() is a high level API call. It offers the possibility to borrow, validate or return a license from or to the borrowing server. This function is remapped on library side (WibuCmXX.dll/lib) to several other API commands.
|
Please note that borrowing in this context does not involve a license transfer. Rather it refers to borrowing using Firm Codes smaller than 6,000,000 and especially prepared CmContainer. |
|
Triple Mode Redundancy-related information (TMR)
|
Syntax
int CMAPIENTRY CmBorrow(HCMSysEntry hcmse, CMULONG flCtrl, const char *pszServer);
Parameter
hcmse contains the handle opened by CmAccess / CmAccess2. This has to be the handle to the entry of the borrow client. Remember to use the force flag CM_ACCESS_FORCE in the CMACCESS / CMACCESS2 structure.
flCtrl specifies the kind of borrowing action to be done:
CM_ACCESS_BORROW_ACCESS specifies that this license should be borrowed from the server.
CM_ACCESS_BORROW_RELEASE specifies that this borrowed license should be returned to the server.
CM_ACCESS_BORROW_VALIDATE specifies that this license should be validated.
CM_ACCESS_BORROW_IGNORESTATE specifies that the state of this license should be ignored.
CM_ACCESS_IGNORE_LINGERTIME specifies that this license should ignore the linger time.
pszServer contains a pointer to a buffer that contains the borrowing server as a name or as IP-address. This is only used for the flag CM_ACCESS_BORROW_ACCESS, in all other cases the server is read out of the stored borrowing data.
Return
The return value is TRUE, if the specified action was successful, FALSE if not.
Syntax
This method is overloaded, i.e. the same method name is used with different type of parameters or different set of parameters.
Method 1:
public bool CmBorrow(HCMSysEntry hcmse, CmAccess.Option flCtrl, UInt32 BorrowTime, string server)
|
Parameter
hcmse contains the handle opened by CmAccess / CmAccess2. This has to be the handle to the entry of the borrow client. Remember to use the force flag CM_ACCESS_FORCE in the CMACCESS / CMACCESS2 structure.
Option specifies the kind of borrowing action to be done:
BorrowAccess specifies that this license should be borrowed from the server.
BorrowRelease specifies that this borrowed license should be returned to the server.
BorrowValidate specifies that this license should be validated.
BorrowIgnorestate specifies that the state of this license should be ignored.
BorrowIgnoreLingerTime specifies that this license should ignore the linger time.
BorrowTime integer contains a desired borrowing time in minutes.
server contains a pointer to a buffer that contains the borrowing server as a name or as IP-address. This is only used for the flag BorrowAccess, in all other cases the server is read out of the stored borrowing data.
Method2:
public bool CmBorrow(HCMSysEntry hcmse, CmAccess.Option flCtrl, TimeSpan BorrowTime, string server)
|
Parameter
hcmse contains the handle opened by CmAccess / CmAccess2. This has to be the handle to the entry of the borrow client. Remember to use the force flag CM_ACCESS_FORCE in the CMACCESS / CMACCESS2 structure.
Option specifies the kind of borrowing action to be done:
BorrowAccess specifies that this license should be borrowed from the server.
BorrowRelease specifies that this borrowed license should be returned to the server.
BorrowValidate specifies that this license should be validated.
BorrowIgnorestate specifies that the state of this license should be ignored.
BorrowIgnoreLingerTime specifies that this license should ignore the linger time.
BorrowTime contains a desired borrowing time in minutes considered in a TimeSpan structure.
server contains a pointer to a buffer that contains the borrowing server as a name or as IP-address. This is only used for the flag BorrowAccess, in all other cases the server is read out of the stored borrowing data.
Return
The return value is true, if the specified action was successful, false if not.
Not implemented.