Get User Name, Company Name, Serial Number, and Registration Code.
DWORD GetLicenseInfo( LPSTR lpszRegUserName = NULL, LPSTR lpszCompany = NULL, LPSTR lpszSN = NULL, LPSTR lpszRegCode = NULL )
Origin's product code
EX1
void GetLicenseInfo_ex1() { // output user's name and serial number char szUser[LIC_USERINFO_NAME_COMPANY_MAXLEN]; char szSerial[LIC_OTHER_INFO_MAXLEN]; DWORD dwProd = GetLicenseInfo(szUser, NULL, szSerial); printf("User %s has serial number %s\n", szUser, szSerial); // output product type string strProd; switch( dwProd & 0x000000FF ) { case ORGPRODUCTTYPE_REGULAR: strProd = "Regular"; break; case ORGPRODUCTTYPE_PRO: strProd = "Pro"; break; default: strProd = "Evaluation, Student, or Unknown"; break; } printf("User %s is running a %s version of Origin\n", szUser, strProd); }
origin.h