ITP_GET_LICENSE_CODE_V3

Top  Previous  Next

This definition gets the license code, which is provided during the registration process.

 

ITP_GET_LICENSE_CODE_V3(wchar_tpwcsLicenseint iMaxLen);

 

Note: pwcsLicense buffer must be filled by zeros before use. Please use the ZeroMemory macros or memset() function.

 

Parameters

 

 pwcsLicense - pointer to the buffer of characters.

 iMaxLen - Length of the buffer of characters.

 

Return

 

 Returns nothing. The output buffer (pwcsLicense) will get the license code.

 

Requirements

 

 Header: IntelliProtectorDeclarations.h

 

Example

 

void GetLicenseCodeW(OUT wchar_t* pwcsLicense, IN int iMaxLength)

{

 if(pwcsLicense == NULL)

         return;

 

 // The defines cannot use parameters from function directly, so creating local variable at first.

 wchar_t* pwcsLocalLicenseBuffer = new wchar_t[iMaxLength];

 ZeroMemory(pwcsLocalLicenseBuffer, iMaxLength);

 

 ITP_GET_LICENSE_CODE_V3(pwcsLocalLicenseBuffer, iMaxLength);

 

 // copy local buffer to pchLicense

 wcscpy_s(pwcsLicense, iMaxLength, pwcsLocalLicenseBuffer);

 

 // remove local variable

 delete[] pwcsLocalLicenseBuffer;

 pwcsLocalLicenseBuffer = NULL;

}

 

 





Copyright © 2015 IntelliProtector.com