checking in all the old panacean stuff
This commit is contained in:
930
sFTPlugins/Register/IntelliProtector.cs
Normal file
930
sFTPlugins/Register/IntelliProtector.cs
Normal file
@@ -0,0 +1,930 @@
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright 2010. IntelliProtector.com
|
||||
// Web site: http://intelliprotector.com
|
||||
// Version: v2.5
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
|
||||
namespace netprotector.api
|
||||
{
|
||||
internal delegate void dVoid_NoParams();
|
||||
internal delegate void dVoid_BoolParam(out bool b1);
|
||||
internal delegate void dVoid_IntParam(out int i1);
|
||||
internal delegate void dVoid_2IntParam(out int i1, int i2);
|
||||
internal delegate void dVoid_5IntParams(out int i1, out int i2, out int i3, out int i4, out int i5);
|
||||
internal delegate void dVoid_StringBuilderParam([MarshalAs(UnmanagedType.LPWStr)] StringBuilder s1, int iMaxLength);
|
||||
internal delegate void dBool_StringParam(out bool res, [MarshalAs(UnmanagedType.LPWStr)]String s1, int iMaxLength);
|
||||
internal delegate void dBool_StringOnlyParam(out bool res, [MarshalAs(UnmanagedType.LPWStr)]String s1);
|
||||
internal delegate void dBool_StringStringParam(out bool res, [MarshalAs(UnmanagedType.LPWStr)]String s1, [MarshalAs(UnmanagedType.LPWStr)]String s2);
|
||||
}
|
||||
|
||||
namespace IntelliProtectorService.attributes
|
||||
{
|
||||
internal class Encrypt : Attribute { }
|
||||
internal class GetBuyNowLinkAttribute : Attribute { }
|
||||
internal class IsSoftwareProtectedAttribute : Attribute { }
|
||||
internal class IsSoftwareRegisteredAttribute : Attribute { }
|
||||
internal class GetTrialDaysCountAttribute : Attribute { }
|
||||
internal class GetTrialUnitsCountAttribute : Attribute { }
|
||||
internal class GetTrialDaysLeftCountAttribute : Attribute { }
|
||||
internal class GetTrialUnitsLeftCountAttribute : Attribute { }
|
||||
internal class GetTrialLaunchesCountAttribute : Attribute { }
|
||||
internal class GetTrialLaunchesLeftCountAttribute : Attribute { }
|
||||
internal class ShowRegistrationWindowAttribute : Attribute { }
|
||||
internal class IsTrialElapsedAttribute : Attribute { }
|
||||
internal class GetRenewalPurchaseLinkAttribute : Attribute { }
|
||||
internal class GetLicenseTypeAttribute : Attribute { }
|
||||
internal class GetLicenseExpirationDaysCountAttribute : Attribute { }
|
||||
internal class GetLicenseExpirationDaysLeftCountAttribute : Attribute { }
|
||||
internal class GetSupportExpirationDaysCountAttribute : Attribute { }
|
||||
internal class GetSupportExpirationDaysLeftCountAttribute : Attribute { }
|
||||
internal class GetCurrentProductVersionAttribute : Attribute { }
|
||||
internal class GetCustomerNameAttribute : Attribute { }
|
||||
internal class GetCustomerEMailAttribute : Attribute { }
|
||||
internal class GetLicenseCodeAttribute : Attribute { }
|
||||
internal class RegisterSoftwareAttribute : Attribute { }
|
||||
internal class RenewLicenseCodeAttribute : Attribute { }
|
||||
internal class GetCurrentActivationDateAttribute : Attribute { }
|
||||
internal class GetCurrentRegistrationDateAttribute : Attribute { }
|
||||
internal class GetFirstRegistrationDateAttribute : Attribute { }
|
||||
internal class GetOrderDateAttribute : Attribute { }
|
||||
internal class GetLicenseExpirationDateAttribute : Attribute { }
|
||||
internal class GetProtectionDateAttribute : Attribute { }
|
||||
internal class GetSupportExpirationDateAttribute : Attribute { }
|
||||
internal class GetSupportExpirationProductVersionAttribute : Attribute { }
|
||||
internal class GetIntelliProtectorVersionAttribute : Attribute { }
|
||||
internal class CreateRegistrationRequestCertificateAttribute : Attribute { }
|
||||
internal class UseRegistrationResponseCertificateAttribute : Attribute { }
|
||||
internal class SystemFunction1Attribute : Attribute { }
|
||||
}
|
||||
|
||||
namespace IntelliProtectorService
|
||||
{
|
||||
internal class IntelliProtector
|
||||
{
|
||||
public static double Version_2_5()
|
||||
{
|
||||
return 2.5f;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
public static bool IsInDebugMode()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
public enum enUnitDimension
|
||||
{
|
||||
eudMinutes,
|
||||
eudHours,
|
||||
eudDays,
|
||||
eudWeeks,
|
||||
eudMonths
|
||||
};
|
||||
|
||||
private class Init32
|
||||
{
|
||||
[DllImport("JitHookCore.dll", CallingConvention = CallingConvention.Cdecl, EntryPoint = "Init")]
|
||||
public static extern void Init();
|
||||
};
|
||||
|
||||
private class Init64
|
||||
{
|
||||
[DllImport("JitHookCoreX64.dll", CallingConvention = CallingConvention.Cdecl, EntryPoint = "Init")]
|
||||
public static extern void Init();
|
||||
};
|
||||
|
||||
public static bool Init()
|
||||
{
|
||||
try
|
||||
{
|
||||
bool tryLoadX64 = false;
|
||||
try
|
||||
{
|
||||
Init32.Init();
|
||||
}
|
||||
catch (BadImageFormatException)
|
||||
{
|
||||
tryLoadX64 = true;
|
||||
}
|
||||
|
||||
if (tryLoadX64)
|
||||
{
|
||||
try
|
||||
{
|
||||
Init64.Init();
|
||||
}
|
||||
catch (BadImageFormatException)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
catch (System.Exception)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
#region GetBuyNowLink
|
||||
[attributes.GetBuyNowLinkAttribute]
|
||||
public static String GetBuyNowLink()
|
||||
{
|
||||
UInt64 address = 0;
|
||||
int ciMinLength = 0;
|
||||
int ciMaxLength = 1024;
|
||||
StringBuilder rValue = new StringBuilder(ciMaxLength);
|
||||
object[] obj = new object[] { rValue, ciMaxLength - ciMinLength };
|
||||
Type tp = typeof(netprotector.api.dVoid_StringBuilderParam);
|
||||
|
||||
GetBuyNowLinkTest(address, obj, tp);
|
||||
return rValue.ToString();
|
||||
}
|
||||
[attributes.Encrypt]
|
||||
protected static void GetBuyNowLinkTest(UInt64 address, object[] obj, Type delegateType)
|
||||
{
|
||||
if (obj[0].GetType() != typeof(StringBuilder))
|
||||
return;
|
||||
|
||||
string strLink = "";
|
||||
if ((int)obj[1] >= strLink.Length)
|
||||
((StringBuilder)obj[0]).Append(strLink);
|
||||
}
|
||||
#endregion
|
||||
#region IsSoftwareProtected
|
||||
[attributes.IsSoftwareProtected]
|
||||
public static bool IsSoftwareProtected()
|
||||
{
|
||||
UInt64 address = 0;
|
||||
object[] obj = new object[] { false };
|
||||
Type tp = typeof(netprotector.api.dVoid_BoolParam);
|
||||
|
||||
IsSoftwareProtectedTest(address, obj, tp);
|
||||
return (bool)obj[0];
|
||||
}
|
||||
|
||||
[attributes.Encrypt]
|
||||
protected static void IsSoftwareProtectedTest(UInt64 address, object[] obj, Type delegateType)
|
||||
{
|
||||
if (obj[0].GetType() != typeof(bool))
|
||||
return;
|
||||
|
||||
obj[0] = false;
|
||||
}
|
||||
#endregion
|
||||
#region IsSoftwareRegistered
|
||||
[attributes.IsSoftwareRegistered]
|
||||
public static bool IsSoftwareRegistered()
|
||||
{
|
||||
UInt64 address = 0;
|
||||
object[] obj = new object[] { false };
|
||||
Type tp = typeof(netprotector.api.dVoid_BoolParam);
|
||||
|
||||
IsSoftwareRegisteredTest(address, obj, tp);
|
||||
return (bool)obj[0];
|
||||
}
|
||||
|
||||
[attributes.Encrypt]
|
||||
protected static void IsSoftwareRegisteredTest(UInt64 address, object[] obj, Type delegateType)
|
||||
{
|
||||
if (obj[0].GetType() != typeof(bool))
|
||||
return;
|
||||
|
||||
obj[0] = false;
|
||||
}
|
||||
#endregion
|
||||
#region GetTrialDaysCount
|
||||
[attributes.GetTrialDaysCount]
|
||||
public static int GetTrialDaysCount()
|
||||
{
|
||||
UInt64 address = 0;
|
||||
object[] obj = new object[] { (int)0 };
|
||||
Type tp = typeof(netprotector.api.dVoid_IntParam);
|
||||
|
||||
GetTrialDaysCountTest(address, obj, tp);
|
||||
return (int)obj[0];
|
||||
}
|
||||
|
||||
[attributes.Encrypt]
|
||||
protected static void GetTrialDaysCountTest(UInt64 address, object[] obj, Type delegateType)
|
||||
{
|
||||
if (obj[0].GetType() != typeof(int))
|
||||
return;
|
||||
|
||||
obj[0] = -1;
|
||||
}
|
||||
#endregion
|
||||
#region GetTrialUnitsCount
|
||||
[attributes.GetTrialUnitsCount]
|
||||
public static int GetTrialUnitsCount(int dimensions)
|
||||
{
|
||||
UInt64 address = 0;
|
||||
object[] obj = new object[] { (int)0, dimensions };
|
||||
Type tp = typeof(netprotector.api.dVoid_2IntParam);
|
||||
GetTrialUnitsCountTest(address, obj, tp);
|
||||
return (int)obj[0];
|
||||
}
|
||||
[attributes.Encrypt]
|
||||
public static void GetTrialUnitsCountTest(UInt64 address, object[] obj, Type delegateType)
|
||||
{
|
||||
if (obj[0].GetType() != typeof(int) && obj[1].GetType() != typeof(int))
|
||||
return;
|
||||
|
||||
obj[0] = -1;
|
||||
}
|
||||
#endregion
|
||||
#region GetTrialDaysLeftCount
|
||||
[attributes.GetTrialDaysLeftCount]
|
||||
public static int GetTrialDaysLeftCount()
|
||||
{
|
||||
UInt64 address = 0;
|
||||
object[] obj = new object[] { (int)0 };
|
||||
Type tp = typeof(netprotector.api.dVoid_IntParam);
|
||||
GetTrialDaysLeftCountTest(address, obj, tp);
|
||||
return (int)obj[0];
|
||||
}
|
||||
[attributes.Encrypt]
|
||||
public static void GetTrialDaysLeftCountTest(UInt64 address, object[] obj, Type delegateType)
|
||||
{
|
||||
if (obj[0].GetType() != typeof(int))
|
||||
return;
|
||||
|
||||
obj[0] = -1;
|
||||
}
|
||||
#endregion
|
||||
#region GetTrialUnitsLeftCount
|
||||
[attributes.GetTrialUnitsLeftCount]
|
||||
public static int GetTrialUnitsLeftCount(int dimension)
|
||||
{
|
||||
UInt64 address = 0;
|
||||
object[] obj = new object[] { (int)0, dimension };
|
||||
Type tp = typeof(netprotector.api.dVoid_2IntParam);
|
||||
GetTrialUnitsLeftCountTest(address, obj, tp);
|
||||
return (int)obj[0];
|
||||
}
|
||||
[attributes.Encrypt]
|
||||
public static void GetTrialUnitsLeftCountTest(UInt64 address, object[] obj, Type delegateType)
|
||||
{
|
||||
if (obj[0].GetType() != typeof(int) && obj[1].GetType() != typeof(int))
|
||||
return;
|
||||
|
||||
obj[0] = -1;
|
||||
}
|
||||
#endregion
|
||||
#region GetTrialLaunchesCount
|
||||
[attributes.GetTrialLaunchesCount]
|
||||
public static int GetTrialLaunchesCount()
|
||||
{
|
||||
UInt64 address = 0;
|
||||
object[] obj = new object[] { (int)0 };
|
||||
Type tp = typeof(netprotector.api.dVoid_IntParam);
|
||||
GetTrialLaunchesCountTest(address, obj, tp);
|
||||
return (int)obj[0];
|
||||
}
|
||||
[attributes.Encrypt]
|
||||
public static void GetTrialLaunchesCountTest(UInt64 address, object[] obj, Type delegateType)
|
||||
{
|
||||
if (obj[0].GetType() != typeof(int))
|
||||
return;
|
||||
|
||||
obj[0] = -1;
|
||||
}
|
||||
#endregion
|
||||
#region GetTrialLaunchesLeftCount
|
||||
[attributes.GetTrialLaunchesLeftCount]
|
||||
public static int GetTrialLaunchesLeftCount()
|
||||
{
|
||||
UInt64 address = 0;
|
||||
object[] obj = new object[] { (int)0 };
|
||||
Type tp = typeof(netprotector.api.dVoid_IntParam);
|
||||
GetTrialLaunchesLeftCountTest(address, obj, tp);
|
||||
return (int)obj[0];
|
||||
}
|
||||
[attributes.Encrypt]
|
||||
public static void GetTrialLaunchesLeftCountTest(UInt64 address, object[] obj, Type delegateType)
|
||||
{
|
||||
if (obj[0].GetType() != typeof(int))
|
||||
return;
|
||||
|
||||
obj[0] = -1;
|
||||
}
|
||||
#endregion
|
||||
#region ShowRegistrationWindow
|
||||
[attributes.ShowRegistrationWindow]
|
||||
public static void ShowRegistrationWindow()
|
||||
{
|
||||
UInt64 address = 0;
|
||||
Type tp = typeof(netprotector.api.dVoid_NoParams);
|
||||
ShowRegistrationWindowTest(address, null, tp);
|
||||
}
|
||||
[attributes.Encrypt]
|
||||
public static void ShowRegistrationWindowTest(UInt64 address, object[] obj, Type delegateType)
|
||||
{
|
||||
}
|
||||
#endregion
|
||||
#region IsTrialElapsed
|
||||
[attributes.IsTrialElapsed]
|
||||
public static bool IsTrialElapsed()
|
||||
{
|
||||
UInt64 address = 0;
|
||||
object[] obj = new object[] { false };
|
||||
Type tp = typeof(netprotector.api.dVoid_BoolParam);
|
||||
|
||||
IsTrialElapsedTest(address, obj, tp);
|
||||
return (bool)obj[0];
|
||||
}
|
||||
|
||||
[attributes.Encrypt]
|
||||
protected static void IsTrialElapsedTest(UInt64 address, object[] obj, Type delegateType)
|
||||
{
|
||||
if (obj[0].GetType() != typeof(bool))
|
||||
return;
|
||||
|
||||
obj[0] = false;
|
||||
}
|
||||
#endregion
|
||||
#region GetRenewalPurchaseLink
|
||||
[attributes.GetRenewalPurchaseLink]
|
||||
public static String GetRenewalPurchaseLink()
|
||||
{
|
||||
UInt64 address = 0;
|
||||
int ciMinLength = 0;
|
||||
int ciMaxLength = 1024;
|
||||
StringBuilder rValue = new StringBuilder(ciMaxLength);
|
||||
object[] obj = new object[] { rValue, ciMaxLength - ciMinLength };
|
||||
Type tp = typeof(netprotector.api.dVoid_StringBuilderParam);
|
||||
|
||||
GetRenewalPurchaseLinkTest(address, obj, tp);
|
||||
return rValue.ToString();
|
||||
}
|
||||
[attributes.Encrypt]
|
||||
protected static void GetRenewalPurchaseLinkTest(UInt64 address, object[] obj, Type delegateType)
|
||||
{
|
||||
if (obj[0].GetType() != typeof(StringBuilder))
|
||||
return;
|
||||
|
||||
string strLink = "";
|
||||
if ((int)obj[1] >= strLink.Length)
|
||||
((StringBuilder)obj[0]).Append(strLink);
|
||||
}
|
||||
#endregion
|
||||
#region GetLicenseType
|
||||
[attributes.GetLicenseType]
|
||||
public static int GetLicenseType()
|
||||
{
|
||||
UInt64 address = 0;
|
||||
object[] obj = new object[] { (int)0 };
|
||||
Type tp = typeof(netprotector.api.dVoid_IntParam);
|
||||
GetLicenseTypeTest(address, obj, tp);
|
||||
return (int)obj[0];
|
||||
}
|
||||
[attributes.Encrypt]
|
||||
public static void GetLicenseTypeTest(UInt64 address, object[] obj, Type delegateType)
|
||||
{
|
||||
if (obj[0].GetType() != typeof(int))
|
||||
return;
|
||||
|
||||
obj[0] = -1;
|
||||
}
|
||||
#endregion
|
||||
#region GetLicenseExpirationDaysCount
|
||||
[attributes.GetLicenseExpirationDaysCount]
|
||||
public static int GetLicenseExpirationDaysCount()
|
||||
{
|
||||
UInt64 address = 0;
|
||||
object[] obj = new object[] { (int)0 };
|
||||
Type tp = typeof(netprotector.api.dVoid_IntParam);
|
||||
GetLicenseExpirationDaysCountTest(address, obj, tp);
|
||||
return (int)obj[0];
|
||||
}
|
||||
[attributes.Encrypt]
|
||||
public static void GetLicenseExpirationDaysCountTest(UInt64 address, object[] obj, Type delegateType)
|
||||
{
|
||||
if (obj[0].GetType() != typeof(int))
|
||||
return;
|
||||
|
||||
obj[0] = -1;
|
||||
}
|
||||
#endregion
|
||||
#region GetLicenseExpirationDaysLeftCount
|
||||
[attributes.GetLicenseExpirationDaysLeftCount]
|
||||
public static int GetLicenseExpirationDaysLeftCount()
|
||||
{
|
||||
UInt64 address = 0;
|
||||
object[] obj = new object[] { (int)0 };
|
||||
Type tp = typeof(netprotector.api.dVoid_IntParam);
|
||||
GetLicenseExpirationDaysLeftTest(address, obj, tp);
|
||||
return (int)obj[0];
|
||||
}
|
||||
[attributes.Encrypt]
|
||||
public static void GetLicenseExpirationDaysLeftTest(UInt64 address, object[] obj, Type delegateType)
|
||||
{
|
||||
if (obj[0].GetType() != typeof(int))
|
||||
return;
|
||||
|
||||
obj[0] = -1;
|
||||
}
|
||||
#endregion
|
||||
#region GetSupportExpirationDaysCount
|
||||
[attributes.GetSupportExpirationDaysCount]
|
||||
public static int GetSupportExpirationDaysCount()
|
||||
{
|
||||
UInt64 address = 0;
|
||||
object[] obj = new object[] { (int)0 };
|
||||
Type tp = typeof(netprotector.api.dVoid_IntParam);
|
||||
GetSupportExpirationDaysCountTest(address, obj, tp);
|
||||
return (int)obj[0];
|
||||
}
|
||||
[attributes.Encrypt]
|
||||
public static void GetSupportExpirationDaysCountTest(UInt64 address, object[] obj, Type delegateType)
|
||||
{
|
||||
if (obj[0].GetType() != typeof(int))
|
||||
return;
|
||||
|
||||
obj[0] = -1;
|
||||
}
|
||||
#endregion
|
||||
#region GetSupportExpirationDaysLeftCount
|
||||
[attributes.GetSupportExpirationDaysLeftCount]
|
||||
public static int GetSupportExpirationDaysLeftCount()
|
||||
{
|
||||
UInt64 address = 0;
|
||||
object[] obj = new object[] { (int)0 };
|
||||
Type tp = typeof(netprotector.api.dVoid_IntParam);
|
||||
GetSupportExpirationDaysLeftCountTest(address, obj, tp);
|
||||
return (int)obj[0];
|
||||
}
|
||||
[attributes.Encrypt]
|
||||
public static void GetSupportExpirationDaysLeftCountTest(UInt64 address, object[] obj, Type delegateType)
|
||||
{
|
||||
if (obj[0].GetType() != typeof(int))
|
||||
return;
|
||||
|
||||
obj[0] = -1;
|
||||
}
|
||||
#endregion
|
||||
#region GetCurrentProductVersion
|
||||
[attributes.GetCurrentProductVersion]
|
||||
public static String GetCurrentProductVersion()
|
||||
{
|
||||
UInt64 address = 0;
|
||||
int ciMinLength = 0;
|
||||
int ciMaxLength = 1024;
|
||||
StringBuilder rValue = new StringBuilder(ciMaxLength);
|
||||
object[] obj = new object[] { rValue, ciMaxLength - ciMinLength };
|
||||
Type tp = typeof(netprotector.api.dVoid_StringBuilderParam);
|
||||
|
||||
GetCurrentProductVersionTest(address, obj, tp);
|
||||
return rValue.ToString();
|
||||
}
|
||||
[attributes.Encrypt]
|
||||
protected static void GetCurrentProductVersionTest(UInt64 address, object[] obj, Type delegateType)
|
||||
{
|
||||
if (obj[0].GetType() != typeof(StringBuilder))
|
||||
return;
|
||||
|
||||
string strLink = "";
|
||||
if ((int)obj[1] >= strLink.Length)
|
||||
((StringBuilder)obj[0]).Append(strLink);
|
||||
}
|
||||
#endregion
|
||||
#region GetCustomerName
|
||||
[attributes.GetCustomerName]
|
||||
public static String GetCustomerName()
|
||||
{
|
||||
UInt64 address = 0;
|
||||
int ciMinLength = 0;
|
||||
int ciMaxLength = 1024;
|
||||
StringBuilder rValue = new StringBuilder(ciMaxLength);
|
||||
object[] obj = new object[] { rValue, ciMaxLength - ciMinLength };
|
||||
Type tp = typeof(netprotector.api.dVoid_StringBuilderParam);
|
||||
|
||||
GetCustomerNameTest(address, obj, tp);
|
||||
return rValue.ToString();
|
||||
}
|
||||
[attributes.Encrypt]
|
||||
protected static void GetCustomerNameTest(UInt64 address, object[] obj, Type delegateType)
|
||||
{
|
||||
if (obj[0].GetType() != typeof(StringBuilder))
|
||||
return;
|
||||
|
||||
string strLink = "";
|
||||
if ((int)obj[1] >= strLink.Length)
|
||||
((StringBuilder)obj[0]).Append(strLink);
|
||||
}
|
||||
#endregion
|
||||
#region GetCustomerEMail
|
||||
[attributes.GetCustomerEMail]
|
||||
public static String GetCustomerEMail()
|
||||
{
|
||||
UInt64 address = 0;
|
||||
int ciMinLength = 0;
|
||||
int ciMaxLength = 1024;
|
||||
StringBuilder rValue = new StringBuilder(ciMaxLength);
|
||||
object[] obj = new object[] { rValue, ciMaxLength - ciMinLength };
|
||||
Type tp = typeof(netprotector.api.dVoid_StringBuilderParam);
|
||||
|
||||
GetCustomerEMailTest(address, obj, tp);
|
||||
return rValue.ToString();
|
||||
}
|
||||
[attributes.Encrypt]
|
||||
protected static void GetCustomerEMailTest(UInt64 address, object[] obj, Type delegateType)
|
||||
{
|
||||
if (obj[0].GetType() != typeof(StringBuilder))
|
||||
return;
|
||||
|
||||
string strLink = "";
|
||||
if ((int)obj[1] >= strLink.Length)
|
||||
((StringBuilder)obj[0]).Append(strLink);
|
||||
}
|
||||
#endregion
|
||||
#region GetLicenseCode
|
||||
[attributes.GetLicenseCode]
|
||||
public static String GetLicenseCode()
|
||||
{
|
||||
UInt64 address = 0;
|
||||
int ciMinLength = 0;
|
||||
int ciMaxLength = 1024;
|
||||
StringBuilder rValue = new StringBuilder(ciMaxLength);
|
||||
object[] obj = new object[] { rValue, ciMaxLength - ciMinLength };
|
||||
Type tp = typeof(netprotector.api.dVoid_StringBuilderParam);
|
||||
|
||||
GetLicenseCodeTest(address, obj, tp);
|
||||
return rValue.ToString();
|
||||
}
|
||||
[attributes.Encrypt]
|
||||
protected static void GetLicenseCodeTest(UInt64 address, object[] obj, Type delegateType)
|
||||
{
|
||||
if (obj[0].GetType() != typeof(StringBuilder))
|
||||
return;
|
||||
|
||||
string strLink = "";
|
||||
if ((int)obj[1] >= strLink.Length)
|
||||
((StringBuilder)obj[0]).Append(strLink);
|
||||
}
|
||||
#endregion
|
||||
#region RegisterSoftware
|
||||
[attributes.RegisterSoftware]
|
||||
public static bool RegisterSoftware(string licenseKey)
|
||||
{
|
||||
UInt64 address = 0;
|
||||
bool res = false;
|
||||
object[] obj = new object[] { res, licenseKey, licenseKey.Length };
|
||||
Type tp = typeof(netprotector.api.dBool_StringParam);
|
||||
|
||||
RegisterSoftwareTest(address, obj, tp);
|
||||
return (bool)obj[0];
|
||||
}
|
||||
[attributes.Encrypt]
|
||||
protected static void RegisterSoftwareTest(UInt64 address, object[] obj, Type delegateType)
|
||||
{
|
||||
obj[0] = false;
|
||||
}
|
||||
#endregion
|
||||
#region RenewLicenseCode
|
||||
[attributes.RenewLicenseCode]
|
||||
public static bool RenewLicenseCode(string renewalCode)
|
||||
{
|
||||
UInt64 address = 0;
|
||||
object[] obj = new object[] { false, renewalCode, renewalCode.Length };
|
||||
Type tp = typeof(netprotector.api.dBool_StringParam);
|
||||
|
||||
RenewLicenseCodeTest(address, obj, tp);
|
||||
return (bool)obj[0];
|
||||
}
|
||||
[attributes.Encrypt]
|
||||
protected static void RenewLicenseCodeTest(UInt64 address, object[] obj, Type delegateType)
|
||||
{
|
||||
obj[0] = false;
|
||||
}
|
||||
#endregion
|
||||
#region GetCurrentActivationDate
|
||||
[attributes.GetCurrentActivationDate]
|
||||
public static DateTime GetCurrentActivationDate()
|
||||
{
|
||||
UInt64 address = 0;
|
||||
object[] obj = new object[] { 0, 0, 0, 0, 0 };
|
||||
Type tp = typeof(netprotector.api.dVoid_5IntParams);
|
||||
|
||||
GetCurrentActivationDateTest(address, obj, tp);
|
||||
if ((int)obj[0] < 0)
|
||||
return DateTime.MinValue;
|
||||
|
||||
return new DateTime((int)obj[0], (int)obj[1], (int)obj[2], (int)obj[3], (int)obj[4], 0);
|
||||
}
|
||||
[attributes.Encrypt]
|
||||
protected static void GetCurrentActivationDateTest(UInt64 address, object[] obj, Type delegateType)
|
||||
{
|
||||
if (obj[0].GetType() != typeof(int) ||
|
||||
obj[1].GetType() != typeof(int) ||
|
||||
obj[2].GetType() != typeof(int) ||
|
||||
obj[3].GetType() != typeof(int) ||
|
||||
obj[4].GetType() != typeof(int))
|
||||
{
|
||||
return;
|
||||
}
|
||||
obj[0] = -1;
|
||||
obj[1] = -1;
|
||||
obj[2] = -1;
|
||||
obj[3] = -1;
|
||||
obj[4] = -1;
|
||||
}
|
||||
#endregion
|
||||
#region GetCurrentRegistrationDate
|
||||
[attributes.GetCurrentRegistrationDate]
|
||||
public static DateTime GetCurrentRegistrationDate()
|
||||
{
|
||||
UInt64 address = 0;
|
||||
object[] obj = new object[] { 0, 0, 0, 0, 0 };
|
||||
Type tp = typeof(netprotector.api.dVoid_5IntParams);
|
||||
|
||||
GetCurrentRegistrationDateTest(address, obj, tp);
|
||||
if ((int)obj[0] < 0)
|
||||
return DateTime.MinValue;
|
||||
|
||||
return new DateTime((int)obj[0], (int)obj[1], (int)obj[2], (int)obj[3], (int)obj[4], 0);
|
||||
}
|
||||
[attributes.Encrypt]
|
||||
protected static void GetCurrentRegistrationDateTest(UInt64 address, object[] obj, Type delegateType)
|
||||
{
|
||||
if (obj[0].GetType() != typeof(int) ||
|
||||
obj[1].GetType() != typeof(int) ||
|
||||
obj[2].GetType() != typeof(int) ||
|
||||
obj[3].GetType() != typeof(int) ||
|
||||
obj[4].GetType() != typeof(int))
|
||||
{
|
||||
return;
|
||||
}
|
||||
obj[0] = -1;
|
||||
obj[1] = -1;
|
||||
obj[2] = -1;
|
||||
obj[3] = -1;
|
||||
obj[4] = -1;
|
||||
}
|
||||
#endregion
|
||||
#region GetFirstRegistrationDate
|
||||
[attributes.GetFirstRegistrationDate]
|
||||
public static DateTime GetFirstRegistrationDate()
|
||||
{
|
||||
UInt64 address = 0;
|
||||
object[] obj = new object[] { 0, 0, 0, 0, 0 };
|
||||
Type tp = typeof(netprotector.api.dVoid_5IntParams);
|
||||
|
||||
GetFirstRegistrationDateTest(address, obj, tp);
|
||||
if ((int)obj[0] < 0)
|
||||
return DateTime.MinValue;
|
||||
|
||||
return new DateTime((int)obj[0], (int)obj[1], (int)obj[2], (int)obj[3], (int)obj[4], 0);
|
||||
}
|
||||
[attributes.Encrypt]
|
||||
protected static void GetFirstRegistrationDateTest(UInt64 address, object[] obj, Type delegateType)
|
||||
{
|
||||
if (obj[0].GetType() != typeof(int) ||
|
||||
obj[1].GetType() != typeof(int) ||
|
||||
obj[2].GetType() != typeof(int) ||
|
||||
obj[3].GetType() != typeof(int) ||
|
||||
obj[4].GetType() != typeof(int))
|
||||
{
|
||||
return;
|
||||
}
|
||||
obj[0] = -1;
|
||||
obj[1] = -1;
|
||||
obj[2] = -1;
|
||||
obj[3] = -1;
|
||||
obj[4] = -1;
|
||||
}
|
||||
#endregion
|
||||
#region GetOrderDate
|
||||
[attributes.GetOrderDate]
|
||||
public static DateTime GetOrderDate()
|
||||
{
|
||||
UInt64 address = 0;
|
||||
object[] obj = new object[] { 0, 0, 0, 0, 0 };
|
||||
Type tp = typeof(netprotector.api.dVoid_5IntParams);
|
||||
|
||||
GetOrderDateTest(address, obj, tp);
|
||||
if ((int)obj[0] < 0)
|
||||
return DateTime.MinValue;
|
||||
|
||||
return new DateTime((int)obj[0], (int)obj[1], (int)obj[2], (int)obj[3], (int)obj[4], 0);
|
||||
}
|
||||
[attributes.Encrypt]
|
||||
protected static void GetOrderDateTest(UInt64 address, object[] obj, Type delegateType)
|
||||
{
|
||||
if (obj[0].GetType() != typeof(int) ||
|
||||
obj[1].GetType() != typeof(int) ||
|
||||
obj[2].GetType() != typeof(int) ||
|
||||
obj[3].GetType() != typeof(int) ||
|
||||
obj[4].GetType() != typeof(int))
|
||||
{
|
||||
return;
|
||||
}
|
||||
obj[0] = -1;
|
||||
obj[1] = -1;
|
||||
obj[2] = -1;
|
||||
obj[3] = -1;
|
||||
obj[4] = -1;
|
||||
}
|
||||
#endregion
|
||||
#region GetLicenseExpirationDate
|
||||
[attributes.GetLicenseExpirationDate]
|
||||
public static DateTime GetLicenseExpirationDate()
|
||||
{
|
||||
UInt64 address = 0;
|
||||
object[] obj = new object[] { 0, 0, 0, 0, 0 };
|
||||
Type tp = typeof(netprotector.api.dVoid_5IntParams);
|
||||
|
||||
GetLicenseExpirationDateTest(address, obj, tp);
|
||||
if ((int)obj[0] < 0)
|
||||
return DateTime.MinValue;
|
||||
|
||||
return new DateTime((int)obj[0], (int)obj[1], (int)obj[2], (int)obj[3], (int)obj[4], 0);
|
||||
}
|
||||
[attributes.Encrypt]
|
||||
protected static void GetLicenseExpirationDateTest(UInt64 address, object[] obj, Type delegateType)
|
||||
{
|
||||
if (obj[0].GetType() != typeof(int) ||
|
||||
obj[1].GetType() != typeof(int) ||
|
||||
obj[2].GetType() != typeof(int) ||
|
||||
obj[3].GetType() != typeof(int) ||
|
||||
obj[4].GetType() != typeof(int))
|
||||
{
|
||||
return;
|
||||
}
|
||||
obj[0] = -1;
|
||||
obj[1] = -1;
|
||||
obj[2] = -1;
|
||||
obj[3] = -1;
|
||||
obj[4] = -1;
|
||||
}
|
||||
#endregion
|
||||
#region GetProtectionDate
|
||||
[attributes.GetProtectionDate]
|
||||
public static DateTime GetProtectionDate()
|
||||
{
|
||||
UInt64 address = 0;
|
||||
object[] obj = new object[] { 0, 0, 0, 0, 0 };
|
||||
Type tp = typeof(netprotector.api.dVoid_5IntParams);
|
||||
|
||||
GetProtectionDateTest(address, obj, tp);
|
||||
if ((int)obj[0] < 0)
|
||||
return DateTime.MinValue;
|
||||
|
||||
return new DateTime((int)obj[0], (int)obj[1], (int)obj[2], (int)obj[3], (int)obj[4], 0);
|
||||
}
|
||||
[attributes.Encrypt]
|
||||
protected static void GetProtectionDateTest(UInt64 address, object[] obj, Type delegateType)
|
||||
{
|
||||
if (obj[0].GetType() != typeof(int) ||
|
||||
obj[1].GetType() != typeof(int) ||
|
||||
obj[2].GetType() != typeof(int) ||
|
||||
obj[3].GetType() != typeof(int) ||
|
||||
obj[4].GetType() != typeof(int))
|
||||
{
|
||||
return;
|
||||
}
|
||||
obj[0] = -1;
|
||||
obj[1] = -1;
|
||||
obj[2] = -1;
|
||||
obj[3] = -1;
|
||||
obj[4] = -1;
|
||||
}
|
||||
#endregion
|
||||
#region GetSupportExpirationDate
|
||||
[attributes.GetSupportExpirationDate]
|
||||
public static DateTime GetSupportExpirationDate()
|
||||
{
|
||||
UInt64 address = 0;
|
||||
object[] obj = new object[] { 0, 0, 0, 0, 0 };
|
||||
Type tp = typeof(netprotector.api.dVoid_5IntParams);
|
||||
|
||||
GetSupportExpirationDateTest(address, obj, tp);
|
||||
if ((int)obj[0] < 0)
|
||||
return DateTime.MinValue;
|
||||
|
||||
return new DateTime((int)obj[0], (int)obj[1], (int)obj[2], (int)obj[3], (int)obj[4], 0);
|
||||
}
|
||||
[attributes.Encrypt]
|
||||
protected static void GetSupportExpirationDateTest(UInt64 address, object[] obj, Type delegateType)
|
||||
{
|
||||
if (obj[0].GetType() != typeof(int) ||
|
||||
obj[1].GetType() != typeof(int) ||
|
||||
obj[2].GetType() != typeof(int) ||
|
||||
obj[3].GetType() != typeof(int) ||
|
||||
obj[4].GetType() != typeof(int))
|
||||
{
|
||||
return;
|
||||
}
|
||||
obj[0] = -1;
|
||||
obj[1] = -1;
|
||||
obj[2] = -1;
|
||||
obj[3] = -1;
|
||||
obj[4] = -1;
|
||||
}
|
||||
#endregion
|
||||
#region GetSupportExpirationProductVersion
|
||||
[attributes.GetSupportExpirationProductVersion]
|
||||
public static String GetSupportExpirationProductVersion()
|
||||
{
|
||||
UInt64 address = 0;
|
||||
int ciMinLength = 0;
|
||||
int ciMaxLength = 1024;
|
||||
StringBuilder rValue = new StringBuilder(ciMaxLength);
|
||||
object[] obj = new object[] { rValue, ciMaxLength - ciMinLength };
|
||||
Type tp = typeof(netprotector.api.dVoid_StringBuilderParam);
|
||||
|
||||
GetSupportExpirationProductVersionTest(address, obj, tp);
|
||||
return rValue.ToString();
|
||||
}
|
||||
[attributes.Encrypt]
|
||||
protected static void GetSupportExpirationProductVersionTest(UInt64 address, object[] obj, Type delegateType)
|
||||
{
|
||||
if (obj[0].GetType() != typeof(StringBuilder))
|
||||
return;
|
||||
|
||||
string strLink = "";
|
||||
if ((int)obj[1] >= strLink.Length)
|
||||
((StringBuilder)obj[0]).Append(strLink);
|
||||
}
|
||||
#endregion
|
||||
#region GetIntelliProtectorVersion
|
||||
[attributes.GetIntelliProtectorVersion]
|
||||
public static String GetIntelliProtectorVersion()
|
||||
{
|
||||
UInt64 address = 0;
|
||||
int ciMinLength = 0;
|
||||
int ciMaxLength = 1024;
|
||||
StringBuilder rValue = new StringBuilder(ciMaxLength);
|
||||
object[] obj = new object[] { rValue, ciMaxLength - ciMinLength };
|
||||
Type tp = typeof(netprotector.api.dVoid_StringBuilderParam);
|
||||
|
||||
GetIntelliProtectorVersionTest(address, obj, tp);
|
||||
return rValue.ToString();
|
||||
}
|
||||
[attributes.Encrypt]
|
||||
protected static void GetIntelliProtectorVersionTest(UInt64 address, object[] obj, Type delegateType)
|
||||
{
|
||||
if (obj[0].GetType() != typeof(StringBuilder))
|
||||
return;
|
||||
|
||||
string strLink = "";
|
||||
if ((int)obj[1] >= strLink.Length)
|
||||
((StringBuilder)obj[0]).Append(strLink);
|
||||
}
|
||||
#endregion
|
||||
#region CreateRegistrationRequestCertificate
|
||||
[attributes.CreateRegistrationRequestCertificate]
|
||||
public static bool CreateRegistrationRequestCertificate(string path, string licenseCode)
|
||||
{
|
||||
UInt64 address = 0;
|
||||
bool res = false;
|
||||
object[] obj = new object[] { res, path, licenseCode };
|
||||
Type tp = typeof(netprotector.api.dBool_StringStringParam);
|
||||
|
||||
CreateRegistrationRequestCertificateTest(address, obj, tp);
|
||||
return (bool)obj[0];
|
||||
}
|
||||
[attributes.Encrypt]
|
||||
protected static void CreateRegistrationRequestCertificateTest(UInt64 address, object[] obj, Type delegateType)
|
||||
{
|
||||
obj[0] = true;
|
||||
}
|
||||
#endregion
|
||||
#region UseRegistrationResponseCertificate
|
||||
[attributes.UseRegistrationResponseCertificate]
|
||||
public static bool UseRegistrationResponseCertificate(string path)
|
||||
{
|
||||
UInt64 address = 0;
|
||||
bool res = false;
|
||||
object[] obj = new object[] { res, path };
|
||||
Type tp = typeof(netprotector.api.dBool_StringOnlyParam);
|
||||
|
||||
UseRegistrationResponseCertificateTest(address, obj, tp);
|
||||
return (bool)obj[0];
|
||||
}
|
||||
[attributes.Encrypt]
|
||||
protected static void UseRegistrationResponseCertificateTest(UInt64 address, object[] obj, Type delegateType)
|
||||
{
|
||||
obj[0] = true;
|
||||
}
|
||||
#endregion
|
||||
#region SystemFunction1
|
||||
[attributes.SystemFunction1]
|
||||
protected static void SystemFunction1(UInt64 address, object[] parameters, Type delegateType)
|
||||
{
|
||||
Delegate delegateFunc = Marshal.GetDelegateForFunctionPointer((IntPtr)address, delegateType);
|
||||
delegateFunc.DynamicInvoke(parameters);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
30
sFTPlugins/Register/Program.cs
Normal file
30
sFTPlugins/Register/Program.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using IntelliProtectorService;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Register
|
||||
{
|
||||
static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
|
||||
if (!IntelliProtector.Init())
|
||||
throw new Exception("IntelliProtector Failed to Initialize");
|
||||
|
||||
//if (!IntelliProtector.Init())
|
||||
// Application.Run(new Register());
|
||||
}
|
||||
}
|
||||
}
|
||||
36
sFTPlugins/Register/Properties/AssemblyInfo.cs
Normal file
36
sFTPlugins/Register/Properties/AssemblyInfo.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("Register")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Panacean Technologies, LLC")]
|
||||
[assembly: AssemblyProduct("Register")]
|
||||
[assembly: AssemblyCopyright("Copyright © Panacean Technologies 2011")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("51df0402-3102-48e9-a572-4d8d26e50387")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
63
sFTPlugins/Register/Properties/Resources.Designer.cs
generated
Normal file
63
sFTPlugins/Register/Properties/Resources.Designer.cs
generated
Normal file
@@ -0,0 +1,63 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.225
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Register.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Register.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
117
sFTPlugins/Register/Properties/Resources.resx
Normal file
117
sFTPlugins/Register/Properties/Resources.resx
Normal file
@@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
26
sFTPlugins/Register/Properties/Settings.Designer.cs
generated
Normal file
26
sFTPlugins/Register/Properties/Settings.Designer.cs
generated
Normal file
@@ -0,0 +1,26 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.225
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Register.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
7
sFTPlugins/Register/Properties/Settings.settings
Normal file
7
sFTPlugins/Register/Properties/Settings.settings
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
||||
47
sFTPlugins/Register/Register.Designer.cs
generated
Normal file
47
sFTPlugins/Register/Register.Designer.cs
generated
Normal file
@@ -0,0 +1,47 @@
|
||||
namespace Register
|
||||
{
|
||||
partial class Register
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// Form1
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(455, 291);
|
||||
this.Name = "Form1";
|
||||
this.Text = "Form1";
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
18
sFTPlugins/Register/Register.cs
Normal file
18
sFTPlugins/Register/Register.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Register
|
||||
{
|
||||
public partial class Register : Form
|
||||
{
|
||||
public Register()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
95
sFTPlugins/Register/Register.csproj
Normal file
95
sFTPlugins/Register/Register.csproj
Normal file
@@ -0,0 +1,95 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{A72A61E3-5C00-41EC-9372-148D879945FC}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Register</RootNamespace>
|
||||
<AssemblyName>Register</AssemblyName>
|
||||
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
|
||||
<TargetFrameworkProfile>
|
||||
</TargetFrameworkProfile>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<SccProjectName>SAK</SccProjectName>
|
||||
<SccLocalPath>SAK</SccLocalPath>
|
||||
<SccAuxPath>SAK</SccAuxPath>
|
||||
<SccProvider>SAK</SccProvider>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\Target\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>..\Target\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="IntelliProtector.cs" />
|
||||
<Compile Include="Register.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Register.Designer.cs">
|
||||
<DependentUpon>Register.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<EmbeddedResource Include="Register.resx">
|
||||
<DependentUpon>Register.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<None Include="app.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
10
sFTPlugins/Register/Register.csproj.vspscc
Normal file
10
sFTPlugins/Register/Register.csproj.vspscc
Normal file
@@ -0,0 +1,10 @@
|
||||
""
|
||||
{
|
||||
"FILE_VERSION" = "9237"
|
||||
"ENLISTMENT_CHOICE" = "NEVER"
|
||||
"PROJECT_FILE_RELATIVE_PATH" = ""
|
||||
"NUMBER_OF_EXCLUDED_FILES" = "0"
|
||||
"ORIGINAL_PROJECT_FILE_PATH" = ""
|
||||
"NUMBER_OF_NESTED_PROJECTS" = "0"
|
||||
"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER"
|
||||
}
|
||||
120
sFTPlugins/Register/Register.resx
Normal file
120
sFTPlugins/Register/Register.resx
Normal file
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
3
sFTPlugins/Register/app.config
Normal file
3
sFTPlugins/Register/app.config
Normal file
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0"?>
|
||||
<configuration>
|
||||
<startup><supportedRuntime version="v2.0.50727"/></startup></configuration>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
sFTPlugins/Register/obj/x86/Release/Register.Register.resources
Normal file
BIN
sFTPlugins/Register/obj/x86/Release/Register.Register.resources
Normal file
Binary file not shown.
@@ -0,0 +1,10 @@
|
||||
C:\_ROOT_\PanaceanTech\sFTPlugins\Target\Release\Register.exe
|
||||
C:\_ROOT_\PanaceanTech\sFTPlugins\Target\Release\Register.pdb
|
||||
C:\_ROOT_\PanaceanTech\sFTPlugins\Register\obj\x86\Release\ResolveAssemblyReference.cache
|
||||
C:\_ROOT_\PanaceanTech\sFTPlugins\Register\obj\x86\Release\Register.Register.resources
|
||||
C:\_ROOT_\PanaceanTech\sFTPlugins\Register\obj\x86\Release\Register.Properties.Resources.resources
|
||||
C:\_ROOT_\PanaceanTech\sFTPlugins\Register\obj\x86\Release\Register.exe
|
||||
C:\_ROOT_\PanaceanTech\sFTPlugins\Register\obj\x86\Release\Register.pdb
|
||||
C:\_ROOT_\PanaceanTech\sFTPlugins\Register\obj\x86\Release\ResGen.read.1.tlog
|
||||
C:\_ROOT_\PanaceanTech\sFTPlugins\Register\obj\x86\Release\ResGen.write.1.tlog
|
||||
C:\_ROOT_\PanaceanTech\sFTPlugins\Target\Release\Register.exe.config
|
||||
BIN
sFTPlugins/Register/obj/x86/Release/Register.exe
Normal file
BIN
sFTPlugins/Register/obj/x86/Release/Register.exe
Normal file
Binary file not shown.
BIN
sFTPlugins/Register/obj/x86/Release/Register.pdb
Normal file
BIN
sFTPlugins/Register/obj/x86/Release/Register.pdb
Normal file
Binary file not shown.
BIN
sFTPlugins/Register/obj/x86/Release/ResGen.read.1.tlog
Normal file
BIN
sFTPlugins/Register/obj/x86/Release/ResGen.read.1.tlog
Normal file
Binary file not shown.
BIN
sFTPlugins/Register/obj/x86/Release/ResGen.write.1.tlog
Normal file
BIN
sFTPlugins/Register/obj/x86/Release/ResGen.write.1.tlog
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user