{"id":174,"date":"2007-08-08T11:44:13","date_gmt":"2007-08-08T11:44:13","guid":{"rendered":"https:\/\/driverentry.com.br\/en\/2007\/08\/08\/my-personal-gina\/"},"modified":"2026-07-27T02:53:58","modified_gmt":"2026-07-27T02:53:58","slug":"my-personal-gina","status":"publish","type":"post","link":"https:\/\/driverentry.com.br\/en\/2007\/08\/08\/my-personal-gina\/","title":{"rendered":"My Personal GINA"},"content":{"rendered":"<div style=\"text-align: right;\"><a href=\"https:\/\/driverentry.com.br\/2007\/08\/08\/personal-gina-tabajara\/\"><img loading=\"lazy\" decoding=\"async\" title=\"Em Portugu\u00eas\" src=\"https:\/\/driverentry.com.br\/en\/wp-content\/uploads\/2026\/07\/br.gif\" alt=\"\" width=\"21\" height=\"19\" \/><\/a><\/div>\n<p><img decoding=\"async\" style=\"float: right; margin: 0px 10px;\" src=\"https:\/\/driverentry.com.br\/en\/wp-content\/uploads\/2026\/07\/GinaGalvao.png\" border=\"0\" alt=\"\" \/><\/p>\n<p>Due to my returning classes to the university, my time to write posts has now subsided, and once again, you will have to put up a post that says nothing about drivers. In fact, I wrote this GINA sample while I was writing a post about drivers. My friends <a href=\"http:\/\/www.caloni.com.br\/blog\/\">Slug<\/a> and <a href=\"http:\/\/codebehind.wordpress.com\/\">Thiago<\/a> have told me I should just leave this post and write one which could be applied to Windows Vista, since GINAs have not longer been supported on Windows Vista. Then, I have ended up forgetting this code over here. Poor thing&#8230; Anyway, as I have thought the result was at least funny, I&#8217;ll leave this Stub GINA here (sources included), that allows us to change the title of the dialogs presented.<\/p>\n<h3>What is a Stub GINA?<\/h3>\n<p><img decoding=\"async\" style=\"float: right; margin: 0px 10px;\" src=\"https:\/\/driverentry.com.br\/en\/wp-content\/uploads\/2026\/07\/GinaW2K.png\" border=\"0\" alt=\"\" \/><\/p>\n<p>It would be even better to say what a GINA is. I have written a few things about this subject on the post that talks about <a href=\"https:\/\/driverentry.com.br\/en\/2006\/12\/23\/step-into-kernel-softice\/\">how to use SoftIce<\/a>, but in summary, GINA is the system component that implements the Graphical Interface for Network Authentication for users on the computer. Do you still want it more concise? It is the small screen for system logon. GINA is responsible for receiving the data that identifies a user and pass them to the components that can validate their password and generate the <em>token<\/em> with the user&#8217;s credentials. This token is used to create the session that the user is logging in and where your <em>desktop<\/em> will be created. GINA also implements the interface that makes the password changing, lockout and station shutdown. I will not detail all the steps here: everything is explained at the <a href=\"http:\/\/msdn2.microsoft.com\/en-us\/library\/aa380543.aspx\">Platform SDK<\/a>.<\/p>\n<p><img decoding=\"async\" style=\"float: right; margin: 0px 10px;\" src=\"https:\/\/driverentry.com.br\/en\/wp-content\/uploads\/2026\/07\/GinaWNT.png\" border=\"0\" alt=\"\" \/><\/p>\n<p>The original Windows GINA is implemented into a DLL named <strong>Msgina.dll<\/strong> that is into the <em>System32<\/em> directory. To implement a new GINA, you must create a new DLL and &#8220;tell&#8221; the system that this DLL will be the new GINA via registry key. However, creating a GINA is not that easy as it seems to be. I have developed some of it and let&#8217;s say  documentation could be better. GINA has many responsibilities and if you just want to supplement or change any of its default behavior, you should simply create a stub GINA. Stub GINA is a DLL that exports all the functions GINA should do, but it passes the calls to the original system GINA, thus, giving us the option to only change the desired features.<\/p>\n<h3>This is not a Tutorial<\/h3>\n<p>If you want to learn how to develop a stub GINA and need a starting point, then go to the Platform SDK Samples folder and use the example that can be found at <em>C:\\MSSDK\\Samples\\Security\\Gina\\GinaStub<\/em>. The project I&#8217;m leaving here performs some juggling to avoid too many repetitive codes and it also does not use the <strong>C\/C++ Run Time<\/strong>, so that, it can be compiled using <strong>Visual Studio 2005<\/strong> and still be able to run on a <strong>Windows NT 4.0<\/strong>.<\/p>\n<h3>Installing a GINA<\/h3>\n<p>To install a GINA, you must create a value called <strong>GinaDLL<\/strong> at the Winlogon registry key, as it is shown below. This value is queried by <em>Winlogon.exe<\/em> and, if this value does not exist, the default GINA is loaded, though. The <strong>GinaTitle<\/strong> value should contain the message that will appear at the dialog titles. Actually, this value has nothing to do with Windows: our stub GINA is the one that reads this value. From the source files, available for <em>download<\/em> at the end of this post, there is a script file that sets these registry keys to make your life easier.<\/p>\n<div style=\"text-align: center;\"><img decoding=\"async\" src=\"https:\/\/driverentry.com.br\/en\/wp-content\/uploads\/2026\/07\/RegGina.png\" alt=\"\" \/><\/div>\n<p>Make a copy of <strong>Gina.dll<\/strong> file to the <em>System32<\/em> directory. Make sure that everything is all right before rebooting the machine to make these changes take effect. If something is wrong and <em>Winlogon.exe<\/em> is not able to load the GINA, the window below appears before anything else.<\/p>\n<div style=\"text-align: center;\"><img decoding=\"async\" src=\"https:\/\/driverentry.com.br\/en\/wp-content\/uploads\/2026\/07\/NoGinaXP.png\" alt=\"\" \/><\/div>\n<p>This <em>MessageBox <\/em>design has improved greatly from Windows 2000. If the same problem happens on Windows NT 4.0, the following message would be displayed.<\/p>\n<div style=\"text-align: center;\"><img decoding=\"async\" src=\"https:\/\/driverentry.com.br\/en\/wp-content\/uploads\/2026\/07\/NoGinaNT.png\" alt=\"\" \/><\/div>\n<h3>Useful tips for GINA coders<\/h3>\n<p>Writing GINA is the opportunity for User-Mode developers generating their own blue screens. Your DLL is loaded by <strong>Winlogon.exe<\/strong>, and thus, it runs on its process address space. This means that if you have an unhandled exception, this will bring this process down. <em>Winlogon<\/em> is a critical process and it cannot be overthrown. In short, the blue screen is shown up.<\/p>\n<p>The next tip is kind of silly, but it&#8217;s worth being commented. During the process of developing a GINA, it is natural to have multiple <em>builds<\/em> and you will need to replace the GINA that is being used for the new one. You may have tried to override it, but as always, Winlogon.exe keeps it loaded and you cannot delete the current one. Like any DLL under these conditions, you can rename it while it is being used by a program. This lets you put a new version at the <em>System32<\/em> directory without having to delete the one which is currently running. When the system is restarted, Winlogon will pick up the new GINA and drop the old one.<\/p>\n<p>I hope you enjoyed the new toy. Now I need to continue that post.<br \/>\nHave fun!<\/p>\n<p class=\"download\"><a href=\"http:\/\/www.driverentry.com.br\/samples\/TitleGina.zip\">TitleGina.zip<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Due to my returning classes to the university, my time to write posts has now subsided, and once again, you will have to put up a post that says nothing about drivers. In fact, I wrote this GINA sample while I was writing a post about drivers. My friends Slug and Thiago have told me [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"pagelayer_contact_templates":[],"_pagelayer_content":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-174","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/driverentry.com.br\/en\/wp-json\/wp\/v2\/posts\/174","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/driverentry.com.br\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/driverentry.com.br\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/driverentry.com.br\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/driverentry.com.br\/en\/wp-json\/wp\/v2\/comments?post=174"}],"version-history":[{"count":2,"href":"https:\/\/driverentry.com.br\/en\/wp-json\/wp\/v2\/posts\/174\/revisions"}],"predecessor-version":[{"id":197,"href":"https:\/\/driverentry.com.br\/en\/wp-json\/wp\/v2\/posts\/174\/revisions\/197"}],"wp:attachment":[{"href":"https:\/\/driverentry.com.br\/en\/wp-json\/wp\/v2\/media?parent=174"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/driverentry.com.br\/en\/wp-json\/wp\/v2\/categories?post=174"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/driverentry.com.br\/en\/wp-json\/wp\/v2\/tags?post=174"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}