internal string getSLInfo(string slCode) { string info = null; Hasp.GetInfo(safeNetEntity.loginScope.Replace("{slcode}", slCode), safeNetEntity.formatInfo, safeNetEntity.vendorCode, ref info); return(info); }
/// <summary> /// 获取C2V XML /// </summary> /// <returns></returns> internal string getC2VXML() { string info = null; HaspStatus status = Hasp.GetInfo(safeNetEntity.scope, safeNetEntity.formatC2V, safeNetEntity.vendorCode, ref info); return(info); }
/// <summary> /// 获取SAFENET SLCODE XML /// </summary> /// <returns></returns> internal string getSLXML() { string info = null; Hasp.GetInfo(safeNetEntity.scope, safeNetEntity.format, safeNetEntity.vendorCode, ref info); return(info); }
/// <summary> /// Demonstrates how to use to retrieve a XML containing all available features. /// </summary> public void GetInfoDemo() { string queryFormat = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>" + "<haspformat root=\"hasp_info\">" + " <feature>" + " <attribute name=\"id\" />" + " <element name=\"license\" />" + " </feature>" + "</haspformat>"; Verbose("Get Information Demo"); Verbose("Retrieving Feature Information"); string info = null; HaspStatus status = Hasp.GetInfo(scope, queryFormat, VendorCode.Code, ref info); ReportStatus(status); if (HaspStatus.StatusOk == status) { Verbose("Fature Information:"); Verbose(info.Replace("\n", "\r\n ")); } else { Verbose(""); } }
public static string GetInfo(string scope, string format, bool checkBeforeLogin = false) { string info = null; HaspStatus getStatus = HaspStatus.AlreadyLoggedOut; if (Variables.myStatus == HaspStatus.StatusOk && !checkBeforeLogin) { getStatus = Hasp.GetInfo(scope, format, Variables.vendorCode[Variables.vendorCode.Keys.Where(k => k.Key == Variables.currentBatchCode).FirstOrDefault()], ref info); if (getStatus == HaspStatus.StatusOk) { return(info); } else { return(getStatus.ToString()); } } else if (checkBeforeLogin) { getStatus = Hasp.GetInfo(scope, format, Variables.vendorCode[Variables.vendorCode.Keys.Where(k => k.Key == Variables.currentBatchCode).FirstOrDefault()], ref info); if (getStatus == HaspStatus.StatusOk) { return(info); } else { return(getStatus.ToString()); } } return(getStatus.ToString()); }
/// <summary> /// 获取C2V XML /// </summary> /// <returns></returns> internal string getImmigrationXML() { string info = null; HaspStatus status = Hasp.GetInfo(safeNetEntity.scope, safeNetEntity.formatImmigration, safeNetEntity.vendorCode, ref info); if (status == HaspStatus.StatusOk) { return(info); } else { return((int)status + status.ToString()); } }