Introduction
There are so many articles on Vista Logo certification. But I think I have something more to write about it. Here, I have provided a DLL that covers almost everything from the implementation point of view related to Vista Logo certification. The package contains: libvl.zip, the DLL source, libvl.dll-Document.zip, the document for how to use, HelloLogoC#.rar, the example using the DLL in C#, and HelloLogoC++.zip, an example for using the DLL in C++. Please follow the document to learn to use this DLL.
Background
We know there are 32 test cases in Vista Logo. To obtain the Vista Logo certification, the application has to pass all the test cases. Don't worry, it is not so hard to get the logo. The application only needs to implement the following test cases: TC1, TC2, TC3, TC8, TC9, TC30, TC31, and TC32. The remaining test cases are related to the installer. Actually, you need to implement only TC1, TC8, TC9, and TC30 by code. This DLL will cover this for you. This code has already been tested and implemented.
Using the code
Please follow the document for better understanding. Only two method needs to be called from the DLL: isSuccess(…)
and isRestartMessage (…)
. Here I will only show how to use the DLL in a C# application.
[DllImport("libvl.dll", CharSet = CharSet.Auto)]
public static extern int isSuccess( string aExeName,
string aWndText,
string aCmdLine,
bool aSupportConcurrentUser,
bool aSupportRemoteDesktop);
[DllImport("libvl.dll", CharSet = CharSet.Auto)]
static void Main(string[] argv)
{
try
{
if (!File.Exists("Libvl.dll"))
{
MessageBox.Show("The following Libvl.dll is missing " +
"please reinstall the application");
return;
}
runMain(argv);
}
catch (Exception ex)
{
throw;
}
}
static void runMain(string[] argv)
{
String lStrWndTxt = "HelloLogo";
if (isSuccess("HelloLogo.exe",lStrWndTxt,
"CommandLine",false,true) != 0)
return;
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new HelloLogo());
}
[DllImport("libvl.dll", CharSet = CharSet.Auto)]
public static extern int isRestartMessage(int aMessage, IntPtr lParam);
protected override void WndProc(ref Message m)
{
base.WndProc(ref m);
if (isRestartMessage(m.Msg, m.LParam) > -1)
{
if (this.InvokeRequired)
this.BeginInvoke(new MethodInvoker(this.saveState));
else
this.saveState();
}
}
private void saveState()
{
Process.GetCurrentProcess().Kill();
return;
}
History
No updates done yet.