使用手册
KG_GenerateRegistrationKeyFromProjectW 函数KG_GenerateRegistrationKeyFromProjectW 类似 KG_GenerateRegistrationKeyW 获取 unicode 形式注册密钥。请注意,需要允许程序获取 unicode 形式注册密钥,具体请点击 常规选项 - 常规 面板 (公钥,私钥,密钥长度,密钥输出方式以及加密常数 TGenKeyParamW。 KG_GenerateRegistrationKeyFromProjectW 有两个属性,一个为项目文件为 uicode 形式, 空值将导致程序停止运行, 另外一个属性为 TGenKeyParamW 结构。 Return Values
定义
function KG_GenerateRegistrationKeyW(kg : PKeyGenParamsW) : dword; external keygen_api_dll_name name 'KG_GenerateRegistrationKeyW';
extern "C" __declspec( dllimport ) __stdcall int KG_GenerateRegistrationKeyW(PKeyGenParamsW kg);
public class Enigma_KeyGen_IDE { [DllImport("keygen.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.StdCall)] public static extern uint KG_GenerateRegistrationKeyW(ref TKeyGenParamsW kg); } 实例
procedure TfrmMain.bGenFPClick(Sender: TObject); var kg : TKeyGenParamsW; KeyBuffer : array [0..2047] of widechar; dwResult : dword; begin mKey.Clear; if eUserInfo.Text = '' then begin ShowMessage('User info field is empty!'); Exit; end; ZeroMemory(@kg, SizeOf(kg)); // Hyphens kg.KeyWithHyphens := cbHyphens.Checked; // Fill key buffer ZeroMemory(@KeyBuffer, SizeOf(KeyBuffer)); kg.Key := @KeyBuffer; kg.KeyLen := SizeOf(KeyBuffer); // Fill User Info kg.RegInfo := PWideChar(eUserInfo.Text); // Key expiration info kg.UseKeyExpiration := cbExpirationDate.Checked; kg.ExpirationYear := YearOf(DateTimePicker1.DateTime); kg.ExpirationMonth := MonthOf(DateTimePicker1.DateTime); kg.ExpirationDay := DayOf(DateTimePicker1.DateTime); // Register After date kg.UseRegisterAfter := cbRegisterAfter.Checked; if kg.UseRegisterAfter then begin kg.RegisterAfterYear := YearOf(dtpRegisterAfter.DateTime); kg.RegisterAfterMonth := MonthOf(dtpRegisterAfter.DateTime); kg.RegisterAfterDay := DayOf(dtpRegisterAfter.DateTime); end; // Register Before date kg.UseRegisterBefore := cbRegisterBefore.Checked; if kg.UseRegisterBefore then begin kg.RegisterBeforeYear := YearOf(dtpRegisterBefore.DateTime); kg.RegisterBeforeMonth := MonthOf(dtpRegisterBefore.DateTime); kg.RegisterBeforeDay := DayOf(dtpRegisterBefore.DateTime); end; // Country kg.UseCountyLimit := cbCountry.Checked; if kg.UseCountyLimit then begin kg.CountryCode := KEY_COUNTRIES[comCountries.ItemIndex].Code; end; // Executions kg.UseExecutionsLimit := cbExecutions.Checked; if kg.UseExecutionsLimit then begin kg.ExecutionsCount := StrToInt(eExecutions.Text); end; // Days kg.UseDaysLimit := cbDays.Checked; if kg.UseDaysLimit then begin kg.DaysCount := StrToInt(eDays.Text); end; // Runtime kg.UseRunTimeLimit := cbRuntime.Checked; if kg.UseRunTimeLimit then begin kg.RunTimeMinutes := StrToInt(eRuntime.Text); end; // Global time kg.UseGlobalTimeLimit := cbGlobalTime.Checked; if kg.UseGlobalTimeLimit then begin kg.GlobalTimeMinutes := StrToInt(eGlobalTime.Text); end; // Hardware ID kg.UseHardwareLocking := cbHardwareID.Checked; kg.HardwareID := PWideChar(eHardware.Text); // Crypt Sections kg.EncryptedSections[1] := cbSection1.Checked; kg.EncryptedSections[2] := cbSection2.Checked; kg.EncryptedSections[3] := cbSection3.Checked; kg.EncryptedSections[4] := cbSection4.Checked; kg.EncryptedSections[5] := cbSection5.Checked; kg.EncryptedSections[6] := cbSection6.Checked; kg.EncryptedSections[7] := cbSection7.Checked; kg.EncryptedSections[8] := cbSection8.Checked; kg.EncryptedSections[9] := cbSection9.Checked; kg.EncryptedSections[10] := cbSection10.Checked; kg.EncryptedSections[11] := cbSection11.Checked; kg.EncryptedSections[12] := cbSection12.Checked; kg.EncryptedSections[13] := cbSection13.Checked; kg.EncryptedSections[14] := cbSection14.Checked; kg.EncryptedSections[15] := cbSection15.Checked; kg.EncryptedSections[16] := cbSection16.Checked; // Generate reg. key dwResult := KG_GenerateRegistrationKeyFromProjectW('default.enigma', @kg); if dwResult = EP_NO_ERROR then begin mKey.Text := String(PWideChar(kg.Key)); end else begin case dwResult of EP_ERROR_UNKNOWN : mKey.Text := 'EP_ERROR_UNKNOWN '; EP_ERROR_KEYBUFFEREMPTY : mKey.Text := 'EP_ERROR_KEYBUFFEREMPTY '; EP_ERROR_KEYBUFFERISLESS : mKey.Text := 'EP_ERROR_KEYBUFFERISLESS '; EP_ERROR_REGINFOEMPTY : mKey.Text := 'EP_ERROR_REGINFOEMPTY '; EP_ERROR_REGINFOTOOLARGE : mKey.Text := 'EP_ERROR_REGINFOTOOLARGE '; EP_ERROR_PRIVATEKEYISNOTSET : mKey.Text := 'EP_ERROR_PRIVATEKEYISNOTSET '; EP_ERROR_PUBLICKEYISNOTSET : mKey.Text := 'EP_ERROR_PUBLICKEYISNOTSET '; EP_ERROR_PRIVATEKEYISINVALID : mKey.Text := 'EP_ERROR_PRIVATEKEYISINVALID '; EP_ERROR_PUBLICKEYISINVALID : mKey.Text := 'EP_ERROR_PUBLICKEYISINVALID '; EP_ERROR_KEYMODEISINVALID : mKey.Text := 'EP_ERROR_KEYMODEISINVALID '; EP_ERROR_KEYBASEISINVALID : mKey.Text := 'EP_ERROR_KEYBASEISINVALID '; EP_ERROR_CURRENTDATEISINVALID : mKey.Text := 'EP_ERROR_CURRENTDATEISINVALID '; EP_ERROR_EXPIRATIONDATEISINVALID : mKey.Text := 'EP_ERROR_EXPIRATIONDATEISINVALID'; EP_ERROR_KEYISINVALID : mKey.Text := 'EP_ERROR_KEYISINVALID '; EP_ERROR_HARDWAREID : mKey.Text := 'EP_ERROR_HARDWAREID '; EP_ERROR_HARDWAREBUFFEREMPTY : mKey.Text := 'EP_ERROR_HARDWAREBUFFEREMPTY '; EP_ERROR_HARDWAREIDINVALIDFORKEY : mKey.Text := 'EP_ERROR_HARDWAREIDINVALIDFORKEY'; EP_ERROR_PROJECTFILENOTFOUND : mKey.Text := 'EP_ERROR_PROJECTFILENOTFOUND '; EP_ERROR_INVALIDPROJECTFILE : mKey.Text := 'EP_ERROR_INVALIDPROJECTFILE '; EP_ERROR_EXECUTIONSNUMBERINVALID : mKey.Text := 'EP_ERROR_EXECUTIONSNUMBERINVALID'; EP_ERROR_DAYSNUMBERINVALID : mKey.Text := 'EP_ERROR_DAYSNUMBERINVALID '; EP_ERROR_COUNTRYCODEINVALID : mKey.Text := 'EP_ERROR_COUNTRYCODEINVALID '; EP_ERROR_RUNTIMEINVALID : mKey.Text := 'EP_ERROR_RUNTIMEINVALID '; EP_ERROR_GLOBALTIMEINVALID : mKey.Text := 'EP_ERROR_GLOBALTIMEINVALID '; EP_ERROR_INSTALLBEFOREINVALID : mKey.Text := 'EP_ERROR_INSTALLBEFOREINVALID '; EP_ERROR_INSTALLAFTERINVALID : mKey.Text := 'EP_ERROR_INSTALLAFTERINVALID '; else mKey.Text := 'Unknown error'; end; end; end;
void CKeygenDlg::OnBnClickedButtongenfp() { // TODO: Add your control notification handler code here // TODO: Add your control notification handler code here TKeyGenParamsW kp; wchar_t keybuffer[2048]; wchar_t tmp[255]; wchar_t username[255]; wchar_t hardwareid[255]; SYSTEMTIME lpDate; DWORD dwResult; // Clear params buffer memset(&kp, 0, sizeof(kp)); // Clear key buffer memset(&keybuffer, 0, sizeof(keybuffer)); kp.Key = (wchar_t*) keybuffer; kp.KeyLen = sizeof(keybuffer); // Fill User Info memset(&username, 0, sizeof(username)); GetDlgItemTextW(IDC_EDITNAME, (wchar_t*)&username, sizeof(username)); kp.RegInfo = (wchar_t*)&username; // Key expiration info if (IsDlgButtonChecked(IDC_CHECKEXPIRATION) != 0) { kp.UseKeyExpiration = true; SendDlgItemMessage(IDC_DTPEXPIRATION, DTM_GETSYSTEMTIME, GDT_VALID, (LPARAM)&lpDate); kp.ExpirationYear = lpDate.wYear; kp.ExpirationMonth = lpDate.wMonth; kp.ExpirationDay = lpDate.wDay; } // Register After if (IsDlgButtonChecked(IDC_CHECKREGAFTER) != 0) { kp.UseRegisterAfter = true; SendDlgItemMessage(IDC_DTPREGAFTER, DTM_GETSYSTEMTIME, GDT_VALID, (LPARAM)&lpDate); kp.RegisterAfterYear = lpDate.wYear; kp.RegisterAfterMonth = lpDate.wMonth; kp.RegisterAfterDay = lpDate.wDay; } // Register Before if (IsDlgButtonChecked(IDC_CHECKREGBEFORE) != 0) { kp.UseRegisterBefore = true; SendDlgItemMessage(IDC_DTPREGBEFORE, DTM_GETSYSTEMTIME, GDT_VALID, (LPARAM)&lpDate); kp.RegisterBeforeYear = lpDate.wYear; kp.RegisterBeforeMonth = lpDate.wMonth; kp.RegisterBeforeDay = lpDate.wDay; } // Executions if (IsDlgButtonChecked(IDC_CHECKEXECS) != 0) { kp.UseExecutionsLimit = true; memset(&tmp, 0, sizeof(tmp)); GetDlgItemTextW(IDC_EDITEXECS, (wchar_t*)&tmp, sizeof(tmp)); kp.ExecutionsCount = _wtoi((wchar_t*)&tmp); } // Days if (IsDlgButtonChecked(IDC_CHECKDAYS) != 0) { kp.UseDaysLimit = true; memset(&tmp, 0, sizeof(tmp)); GetDlgItemTextW(IDC_EDITDAYS, (wchar_t*)&tmp, sizeof(tmp)); kp.DaysCount = _wtoi((wchar_t*)&tmp); } // Run-time if (IsDlgButtonChecked(IDC_CHECKRTIME) != 0) { kp.UseRunTimeLimit = true; memset(&tmp, 0, sizeof(tmp)); GetDlgItemTextW(IDC_EDITRTIME, (wchar_t*)&tmp, sizeof(tmp)); kp.RunTimeMinutes = _wtoi((wchar_t*)&tmp); } // Global time if (IsDlgButtonChecked(IDC_CHECKGTIME) != 0) { kp.UseGlobalTimeLimit = true; memset(&tmp, 0, sizeof(tmp)); GetDlgItemTextW(IDC_EDITGTIME, (wchar_t*)&tmp, sizeof(tmp)); kp.GlobalTimeMinutes = _wtoi((wchar_t*)&tmp); } // Country Lock if (IsDlgButtonChecked(IDC_CHECKCOUNTRY) != 0) { kp.UseCountyLimit = true; kp.CountryCode = KEY_COUNTRIES[com_counties.GetCurSel()].Code; } // Hardware ID if (IsDlgButtonChecked(IDC_CHECKHD) != 0) { kp.UseHardwareLocking = true; memset(&hardwareid, 0, sizeof(hardwareid)); GetDlgItemTextW(IDC_EDITHD, (wchar_t*)&hardwareid, sizeof(hardwareid)); kp.HardwareID = (wchar_t*)&hardwareid; } // Crypt Sections if (IsDlgButtonChecked(IDC_CHECKS1) != 0) { kp.EncryptedSections[0] = true; } if (IsDlgButtonChecked(IDC_CHECKS2) != 0) { kp.EncryptedSections[1] = true; } if (IsDlgButtonChecked(IDC_CHECKS3) != 0) { kp.EncryptedSections[2] = true; } if (IsDlgButtonChecked(IDC_CHECKS4) != 0) { kp.EncryptedSections[3] = true; } if (IsDlgButtonChecked(IDC_CHECKS5) != 0) { kp.EncryptedSections[4] = true; } if (IsDlgButtonChecked(IDC_CHECKS6) != 0) { kp.EncryptedSections[5] = true; } if (IsDlgButtonChecked(IDC_CHECKS7) != 0) { kp.EncryptedSections[6] = true; } if (IsDlgButtonChecked(IDC_CHECKS8) != 0) { kp.EncryptedSections[7] = true; } if (IsDlgButtonChecked(IDC_CHECKS9) != 0) { kp.EncryptedSections[8] = true; } if (IsDlgButtonChecked(IDC_CHECKS10) != 0) { kp.EncryptedSections[9] = true; } if (IsDlgButtonChecked(IDC_CHECKS11) != 0) { kp.EncryptedSections[10] = true; } if (IsDlgButtonChecked(IDC_CHECKS12) != 0) { kp.EncryptedSections[11] = true; } if (IsDlgButtonChecked(IDC_CHECKS13) != 0) { kp.EncryptedSections[12] = true; } if (IsDlgButtonChecked(IDC_CHECKS14) != 0) { kp.EncryptedSections[13] = true; } if (IsDlgButtonChecked(IDC_CHECKS15) != 0) { kp.EncryptedSections[14] = true; } if (IsDlgButtonChecked(IDC_CHECKS16) != 0) { kp.EncryptedSections[15] = true; } kp.KeyWithHyphens = IsDlgButtonChecked(IDC_CHECKHYPHENS) != 0; // Generate reg. key dwResult = KG_GenerateRegistrationKeyFromProjectW(L"default.enigma", &kp); if (dwResult == EP_NO_ERROR) { SetDlgItemTextW(IDC_EDITKEY, kp.Key); } else { wchar_t* sError; switch (dwResult) { case EP_ERROR_UNKNOWN: sError = L"EP_ERROR_UNKNOWN"; break; case EP_ERROR_KEYBUFFEREMPTY: sError = L"EP_ERROR_KEYBUFFEREMPTY"; break; case EP_ERROR_KEYBUFFERISLESS: sError = L"EP_ERROR_KEYBUFFERISLESS"; break; case EP_ERROR_REGINFOEMPTY: sError = L"EP_ERROR_REGINFOEMPTY"; break; case EP_ERROR_REGINFOTOOLARGE: sError = L"EP_ERROR_REGINFOTOOLARGE"; break; case EP_ERROR_PRIVATEKEYISNOTSET: sError = L"EP_ERROR_PRIVATEKEYISNOTSET"; break; case EP_ERROR_PUBLICKEYISNOTSET: sError = L"EP_ERROR_PUBLICKEYISNOTSET"; break; case EP_ERROR_PRIVATEKEYISINVALID: sError = L"EP_ERROR_PRIVATEKEYISINVALID"; break; case EP_ERROR_PUBLICKEYISINVALID: sError = L"EP_ERROR_PUBLICKEYISINVALID"; break; case EP_ERROR_KEYMODEISINVALID: sError = L"EP_ERROR_KEYMODEISINVALID"; break; case EP_ERROR_KEYBASEISINVALID: sError = L"EP_ERROR_KEYBASEISINVALID"; break; case EP_ERROR_CURRENTDATEISINVALID: sError = L"EP_ERROR_CURRENTDATEISINVALID"; break; case EP_ERROR_EXPIRATIONDATEISINVALID: sError = L"EP_ERROR_EXPIRATIONDATEISINVALID"; break; case EP_ERROR_KEYISINVALID: sError = L"EP_ERROR_KEYISINVALID"; break; case EP_ERROR_HARDWAREID: sError = L"EP_ERROR_HARDWAREID"; break; case EP_ERROR_HARDWAREBUFFEREMPTY: sError = L"EP_ERROR_HARDWAREBUFFEREMPTY"; break; case EP_ERROR_HARDWAREIDINVALIDFORKEY: sError = L"EP_ERROR_HARDWAREIDINVALIDFORKEY"; break; case EP_ERROR_PROJECTFILENOTFOUND: sError = L"EP_ERROR_PROJECTFILENOTFOUND"; break; case EP_ERROR_INVALIDPROJECTFILE: sError = L"EP_ERROR_INVALIDPROJECTFILE"; break; case EP_ERROR_EXECUTIONSNUMBERINVALID: sError = L"EP_ERROR_EXECUTIONSNUMBERINVALID"; break; case EP_ERROR_DAYSNUMBERINVALID: sError = L"EP_ERROR_DAYSNUMBERINVALID"; break; case EP_ERROR_COUNTRYCODEINVALID: sError = L"EP_ERROR_COUNTRYCODEINVALID"; break; case EP_ERROR_RUNTIMEINVALID: sError = L"EP_ERROR_RUNTIMEINVALID"; break; case EP_ERROR_GLOBALTIMEINVALID: sError = L"EP_ERROR_GLOBALTIMEINVALID"; break; case EP_ERROR_INSTALLBEFOREINVALID: sError = L"EP_ERROR_INSTALLBEFOREINVALID"; break; case EP_ERROR_INSTALLAFTERINVALID: sError = L"EP_ERROR_INSTALLAFTERINVALID"; break; default: sError = L"Unknown error"; break; } SetDlgItemTextW(IDC_EDITKEY, sError); } }
private void btnGenerateFP_Click(object sender, EventArgs e) { tbKey.Clear(); if (tbUserInfo.Text == string.Empty) { MessageBox.Show("User info field is empty!"); return; } Enigma_KeyGen_IDE.TKeyGenParamsW kg = new Enigma_KeyGen_IDE.TKeyGenParamsW(); kg.KeyWithHyphens = cbHyphens.Checked; char[] keybuffer = new char[2048]; keybuffer.Initialize(); kg.Key = keybuffer.ToString(); kg.KeyLen = keybuffer.Length; kg.RegInfo = tbUserInfo.Text; kg.UseKeyExpiration = cbExpiration.Checked; if (kg.UseKeyExpiration) { kg.ExpirationYear = dtpExpiration.Value.Year; kg.ExpirationMonth = dtpExpiration.Value.Month; kg.ExpirationDay = dtpExpiration.Value.Day; } // Hardware ID kg.UseHardwareLocking = cbHardware.Checked; if (kg.UseHardwareLocking) { kg.HardwareID = tbHardware.Text; } // Register After kg.UseRegisterAfter = cbRegisterAfter.Checked; if (kg.UseRegisterAfter) { kg.RegisterAfterYear = dtpRegisterAfter.Value.Year; kg.RegisterAfterMonth = dtpRegisterAfter.Value.Month; kg.RegisterAfterDay = dtpRegisterAfter.Value.Day; } // Register Before kg.UseRegisterBefore = cbRegisterBefore.Checked; if (kg.UseRegisterBefore) { kg.RegisterBeforeYear = dtpRegisterBefore.Value.Year; kg.RegisterBeforeMonth = dtpRegisterBefore.Value.Month; kg.RegisterBeforeDay = dtpRegisterBefore.Value.Day; } // Executions kg.UseExecutionsLimit = cbExecutions.Checked; if (kg.UseExecutionsLimit) { kg.ExecutionsCount = (int)udExecutions.Value; } // Days kg.UseDaysLimit = cbDays.Checked; if (kg.UseDaysLimit) { kg.DaysCount = (int)udDays.Value; } // Runtime kg.UseRunTimeLimit = cbRuntime.Checked; if (kg.UseRunTimeLimit) { kg.RunTimeMinutes = (int)udRuntime.Value; } // Global Time kg.UseGlobalTimeLimit = cbGlobalTime.Checked; if (kg.UseGlobalTimeLimit) { kg.GlobalTimeMinutes = (int)udGlobalTime.Value; } // Country kg.UseCountyLimit = cbCountry.Checked; if (kg.UseCountyLimit) { Enigma_KeyGen_IDE ide = new Enigma_KeyGen_IDE(); kg.CountryCode = ide.KEY_COUNTRIES[comCountries.SelectedIndex].Code; } kg.EncryptedSections = new byte[Enigma_KeyGen_IDE.NUMBER_OF_CRYPTED_SECTIONS]; kg.EncryptedSections[0] = Convert.ToByte(cbSection1.Checked); kg.EncryptedSections[1] = Convert.ToByte(cbSection2.Checked); kg.EncryptedSections[2] = Convert.ToByte(cbSection3.Checked); kg.EncryptedSections[3] = Convert.ToByte(cbSection4.Checked); kg.EncryptedSections[4] = Convert.ToByte(cbSection5.Checked); kg.EncryptedSections[5] = Convert.ToByte(cbSection6.Checked); kg.EncryptedSections[6] = Convert.ToByte(cbSection7.Checked); kg.EncryptedSections[7] = Convert.ToByte(cbSection8.Checked); kg.EncryptedSections[8] = Convert.ToByte(cbSection9.Checked); kg.EncryptedSections[9] = Convert.ToByte(cbSection10.Checked); kg.EncryptedSections[10] = Convert.ToByte(cbSection11.Checked); kg.EncryptedSections[11] = Convert.ToByte(cbSection12.Checked); kg.EncryptedSections[12] = Convert.ToByte(cbSection13.Checked); kg.EncryptedSections[13] = Convert.ToByte(cbSection14.Checked); kg.EncryptedSections[14] = Convert.ToByte(cbSection15.Checked); kg.EncryptedSections[15] = Convert.ToByte(cbSection16.Checked); // Generate reg. key uint dwResult = Enigma_KeyGen_IDE.KG_GenerateRegistrationKeyFromProjectW("default.enigma", ref kg); if (dwResult == Enigma_KeyGen_IDE.EP_NO_ERROR) { tbKey.Text = kg.Key; } else { switch (dwResult) { case Enigma_KeyGen_IDE.EP_ERROR_UNKNOWN: tbKey.Text = "EP_ERROR_UNKNOWN"; break; case Enigma_KeyGen_IDE.EP_ERROR_KEYBUFFEREMPTY: tbKey.Text = "EP_ERROR_KEYBUFFEREMPTY"; break; case Enigma_KeyGen_IDE.EP_ERROR_KEYBUFFERISLESS: tbKey.Text = "EP_ERROR_KEYBUFFERISLESS"; break; case Enigma_KeyGen_IDE.EP_ERROR_REGINFOEMPTY: tbKey.Text = "EP_ERROR_REGINFOEMPTY"; break; case Enigma_KeyGen_IDE.EP_ERROR_REGINFOTOOLARGE: tbKey.Text = "EP_ERROR_REGINFOTOOLARGE"; break; case Enigma_KeyGen_IDE.EP_ERROR_PRIVATEKEYISNOTSET: tbKey.Text = "EP_ERROR_PRIVATEKEYISNOTSET"; break; case Enigma_KeyGen_IDE.EP_ERROR_PUBLICKEYISNOTSET: tbKey.Text = "EP_ERROR_PUBLICKEYISNOTSET"; break; case Enigma_KeyGen_IDE.EP_ERROR_PRIVATEKEYISINVALID: tbKey.Text = "EP_ERROR_PRIVATEKEYISINVALID"; break; case Enigma_KeyGen_IDE.EP_ERROR_PUBLICKEYISINVALID: tbKey.Text = "EP_ERROR_PUBLICKEYISINVALID"; break; case Enigma_KeyGen_IDE.EP_ERROR_KEYMODEISINVALID: tbKey.Text = "EP_ERROR_KEYMODEISINVALID"; break; case Enigma_KeyGen_IDE.EP_ERROR_KEYBASEISINVALID: tbKey.Text = "EP_ERROR_KEYBASEISINVALID"; break; case Enigma_KeyGen_IDE.EP_ERROR_CURRENTDATEISINVALID: tbKey.Text = "EP_ERROR_CURRENTDATEISINVALID"; break; case Enigma_KeyGen_IDE.EP_ERROR_EXPIRATIONDATEISINVALID: tbKey.Text = "EP_ERROR_EXPIRATIONDATEISINVALID"; break; case Enigma_KeyGen_IDE.EP_ERROR_KEYISINVALID: tbKey.Text = "EP_ERROR_KEYISINVALID"; break; case Enigma_KeyGen_IDE.EP_ERROR_HARDWAREID: tbKey.Text = "EP_ERROR_HARDWAREID"; break; case Enigma_KeyGen_IDE.EP_ERROR_HARDWAREBUFFEREMPTY: tbKey.Text = "EP_ERROR_HARDWAREBUFFEREMPTY"; break; case Enigma_KeyGen_IDE.EP_ERROR_HARDWAREIDINVALIDFORKEY: tbKey.Text = "EP_ERROR_HARDWAREIDINVALIDFORKEY"; break; case Enigma_KeyGen_IDE.EP_ERROR_PROJECTFILENOTFOUND: tbKey.Text = "EP_ERROR_PROJECTFILENOTFOUND"; break; case Enigma_KeyGen_IDE.EP_ERROR_INVALIDPROJECTFILE: tbKey.Text = "EP_ERROR_INVALIDPROJECTFILE"; break; case Enigma_KeyGen_IDE.EP_ERROR_EXECUTIONSNUMBERINVALID: tbKey.Text = "EP_ERROR_EXECUTIONSNUMBERINVALID"; break; case Enigma_KeyGen_IDE.EP_ERROR_DAYSNUMBERINVALID: tbKey.Text = "EP_ERROR_DAYSNUMBERINVALID"; break; case Enigma_KeyGen_IDE.EP_ERROR_COUNTRYCODEINVALID: tbKey.Text = "EP_ERROR_COUNTRYCODEINVALID"; break; case Enigma_KeyGen_IDE.EP_ERROR_RUNTIMEINVALID: tbKey.Text = "EP_ERROR_RUNTIMEINVALID"; break; case Enigma_KeyGen_IDE.EP_ERROR_GLOBALTIMEINVALID: tbKey.Text = "EP_ERROR_GLOBALTIMEINVALID"; break; case Enigma_KeyGen_IDE.EP_ERROR_INSTALLBEFOREINVALID: tbKey.Text = "EP_ERROR_INSTALLBEFOREINVALID"; break; case Enigma_KeyGen_IDE.EP_ERROR_INSTALLAFTERINVALID: tbKey.Text = "EP_ERROR_INSTALLAFTERINVALID"; break; default: tbKey.Text = "Unknown error"; break; } } } 在程序安装目录可查看函数更多实例,如 Examples\KeygenUnicode子文件夹。 |
The Enigma Protector in - China http://enigmaprotector.cn - India https://enigmaprotector.in
Copyright © 2004-2023, The Enigma Protector Developers Team. All rights reserved.