<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5040028188923603467</id><updated>2024-11-01T21:38:21.023+11:00</updated><category term="programming notes"/><category term="books"/><category term="system administration"/><title type='text'>Leon the programmer</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://leontheprogrammer.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5040028188923603467/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://leontheprogrammer.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>leontheprogrammer</name><uri>http://www.blogger.com/profile/04491520787424702567</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitM8C17ouQKnD9nahoSwBDS-27m8n258a2mKPsRkNwUWP0-fx3waFLantGIvDHo6kEeE79I1reyNQCiira3HhmhuN_j7yc6RLrcFKww8tnAPFmrXdSAQT93U4o4bVd4w/s220/handsinhand.jpeg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>6</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5040028188923603467.post-8288528031104322125</id><published>2010-05-18T15:14:00.010+10:00</published><updated>2010-05-18T21:10:26.552+10:00</updated><title type='text'>Disable autorun on USB drives in Windows</title><content type='html'>&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Nowaday most USB drives contain viruses, believe it or not. And usually these malware exploit the Autorun feature to spread from thumb drive to PC. Disable the autorun feature to prevent malware from spreading.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;There are three ways to disable autorun in Windows.&lt;/span&gt;&lt;/div&gt;&lt;ol&gt;&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;Group Policy Editor&lt;/span&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;Click &quot;Start&quot;-&amp;gt;&quot;Run&quot;, type in &quot;gpedit.msc&quot;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;Group Policy Editor is prompted, goes to &lt;quote&gt;&lt;br /&gt;
Computer Configuration-&gt;Administrative Templates-&gt;System&lt;/quote&gt;&lt;br /&gt;
, see screen shot &lt;img src=&quot;http://blogulate.com/wp-content/uploads/2007/12/1.jpg&quot; alt=&quot;Group Policy Editor&quot;/&gt; &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;On the right, scroll down to “Turn off Autoplay” and double click on it&lt;/li&gt;
&lt;li&gt;Set the radio button to Enabled, and change the “Turn off Autoplay on” to All Drives. See screen shot &lt;img src=&quot;http://blogulate.com/wp-content/uploads/2007/12/2.jpg&quot; alt=&quot;Turn off Autoplay&quot;/&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Registry method 1&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Go to &quot;Start&quot;-&gt;&quot;Run&quot;, type regedit&lt;/li&gt;
&lt;li&gt;In registry manager, browse to &quot;HKEY_CURRENT_USER\Software\Microsoft\Windows\ CurrentVersion\Policies\Explorer&quot;. If you have admin privilege, you can modify the same key in HKEY_LOCAL_MACHINE&lt;/li&gt;
&lt;li&gt;Modify the value of NoDriveTypeAutoRun to ff (hexadecimal)&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Registry method 2&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;This method requires users can access to modify registry in HKEY_LOCAL_MACHINE&lt;/li&gt;
&lt;li&gt;Bring up regedit and browse to &quot;HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\IniFileMapping\&quot;&lt;/li&gt;
&lt;li&gt;If key &quot;Autorun.inf&quot; doesn&#39;t exist, create it&lt;/li&gt;
&lt;li&gt;Create a string value &quot;@&quot; as &quot;@SYS:DoesNotExist&quot;&lt;/li&gt;
&lt;/ul&gt;&lt;/ol&gt;Download this reg file &lt;a href=&quot;http://cid-9025f1c06027ec25.skydrive.live.com/self.aspx/.Public/DisableAutorun.reg&quot;&gt;DisableAutorun.reg&lt;/a&gt; and double click to set the above registry trick.</content><link rel='replies' type='application/atom+xml' href='http://leontheprogrammer.blogspot.com/feeds/8288528031104322125/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5040028188923603467/8288528031104322125' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5040028188923603467/posts/default/8288528031104322125'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5040028188923603467/posts/default/8288528031104322125'/><link rel='alternate' type='text/html' href='http://leontheprogrammer.blogspot.com/2010/05/disable-autorun-on-usb-drives-in.html' title='Disable autorun on USB drives in Windows'/><author><name>leontheprogrammer</name><uri>http://www.blogger.com/profile/04491520787424702567</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitM8C17ouQKnD9nahoSwBDS-27m8n258a2mKPsRkNwUWP0-fx3waFLantGIvDHo6kEeE79I1reyNQCiira3HhmhuN_j7yc6RLrcFKww8tnAPFmrXdSAQT93U4o4bVd4w/s220/handsinhand.jpeg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5040028188923603467.post-4026542666397819100</id><published>2010-05-18T14:58:00.000+10:00</published><updated>2010-05-18T14:58:43.946+10:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="system administration"/><title type='text'>Windows logon takes a long time</title><content type='html'>I have encountered this problem when configuring new machines to join a domain. The problem occurs when you try to log on to a computer which just restarted after joining to a domain, then you click the drop down menu to change the logon domain, a dialog is prompted: “Please wait while the domain list is created” and it hangs on forever.&lt;br /&gt;
&lt;br /&gt;
To come out of the waiting loop, just press Ctrl-Alt-Del, select the desired domain, then the dialog is prompted again and press Ctrl-Alt-Del again to type in password to log in to that domain.&lt;br /&gt;
&lt;br /&gt;
Basically the problem is a DNS issue. If the DNS of the system is not pointing to the DNS Server which includes a record of the domain, then it hangs on and does nothing. This is usually the case if we specify the DNS server as public internet servers rather than our own internal domain DNS server. So to solve this problem, just logon with the local administrator account and change the DNS address to the one which specifiesthe domain in its records.</content><link rel='replies' type='application/atom+xml' href='http://leontheprogrammer.blogspot.com/feeds/4026542666397819100/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5040028188923603467/4026542666397819100' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5040028188923603467/posts/default/4026542666397819100'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5040028188923603467/posts/default/4026542666397819100'/><link rel='alternate' type='text/html' href='http://leontheprogrammer.blogspot.com/2010/05/windows-logon-takes-long-time.html' title='Windows logon takes a long time'/><author><name>leontheprogrammer</name><uri>http://www.blogger.com/profile/04491520787424702567</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitM8C17ouQKnD9nahoSwBDS-27m8n258a2mKPsRkNwUWP0-fx3waFLantGIvDHo6kEeE79I1reyNQCiira3HhmhuN_j7yc6RLrcFKww8tnAPFmrXdSAQT93U4o4bVd4w/s220/handsinhand.jpeg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5040028188923603467.post-5305773270368253552</id><published>2010-05-10T11:22:00.000+10:00</published><updated>2010-05-10T11:22:11.377+10:00</updated><title type='text'>how to minimize a c# .net windows application to system tray</title><content type='html'>&lt;div class=WordSection1&gt;&lt;p class=MsoNormal&gt;First you need to add a NotifyIcon (ie, object notifyicon1) to your form, set the default Visible property to be false.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;br /&gt;
&lt;p class=MsoNormal&gt;Add a Form_Resize event handler to the form.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;p class=MsoNormal&gt;private void Form_Resize1(object sender, System.EventArgs e)&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp; if(this.WindowState == FormWindowState.Minimized)&lt;br /&gt;
&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.Visible = false;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; notifyIcon1.Visible = true;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
}&lt;/p&gt;&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;&lt;p class=MsoNormal&gt;Then add an event handler to the NotifyIcon (usually double click) with this code:&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;&lt;p class=MsoNormal&gt;this.Visible = true;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;p class=MsoNormal&gt;notifyIcon1.Visible = false;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;&lt;p class=MsoNormal&gt;This article from Microsoft is also helpful: &lt;a href=&quot;http://code.msdn.microsoft.com/TheNotifyIconExample&quot;&gt;http://code.msdn.microsoft.com/TheNotifyIconExample&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;&lt;p class=MsoNormal&gt;Will talk about minimizing native win32 app into tray next time.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://leontheprogrammer.blogspot.com/feeds/5305773270368253552/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5040028188923603467/5305773270368253552' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5040028188923603467/posts/default/5305773270368253552'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5040028188923603467/posts/default/5305773270368253552'/><link rel='alternate' type='text/html' href='http://leontheprogrammer.blogspot.com/2010/05/how-to-minimize-c-net-windows.html' title='how to minimize a c# .net windows application to system tray'/><author><name>leontheprogrammer</name><uri>http://www.blogger.com/profile/04491520787424702567</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitM8C17ouQKnD9nahoSwBDS-27m8n258a2mKPsRkNwUWP0-fx3waFLantGIvDHo6kEeE79I1reyNQCiira3HhmhuN_j7yc6RLrcFKww8tnAPFmrXdSAQT93U4o4bVd4w/s220/handsinhand.jpeg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5040028188923603467.post-595695512855546892</id><published>2010-04-30T17:12:00.003+10:00</published><updated>2010-05-10T10:24:52.885+10:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="programming notes"/><title type='text'>How to convert cvs to svn</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; font-family: Arial, sans-serif; font-size: 12px;&quot;&gt;There are many posts available online about how to convert cvs to svn, however some steps seem to have been skipped. I did the conversion on Ubuntu, using the famous cvs2svn.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, sans-serif; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; font-size: 12px;&quot;&gt;If you have to convert the code in Windows, see this: &lt;a href=&quot;http://ruthklempel.wordpress.com/2008/04/22/migrating-cvs-to-svn-with-cvs2svn-basics-for-a-windows-user/&quot;&gt;convert cvs to svn using Cygwin&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;Here are some dummy steps:&lt;/p&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; font-family: Arial, sans-serif; font-size: 12px;&quot;&gt;1. Download and install cvs2svn, for more information (ie requirements, etc), see&amp;nbsp;&lt;a href=&quot;http://cvs2svn.tigris.org/cvs2svn.html&quot;&gt;http://cvs2svn.tigris.org/cvs2svn.html&lt;/a&gt;.&lt;br /&gt;
Ideally you shall have a unix/linux environment with Python, cvs, svn installed.&lt;br /&gt;
&lt;br /&gt;
2. install cvs, svn and svnserve&lt;br /&gt;
&lt;br /&gt;
3. Create a folder (namely CVS) at your desired location&lt;br /&gt;
&lt;br /&gt;
4. Set CVSROOT to this folder, you need to set with aboslute path. ie, export CVSROOT=/home/guest/CVS&lt;br /&gt;
&lt;br /&gt;
5. then run &quot;cvs init&quot;, now CVS has been set as a cvs repository, you will see a CVSROOT folder under CVS&lt;br /&gt;
&lt;br /&gt;
6. run &quot;cvs2svn --fallback-encoding=ansii -s SVN_PATH CVS&quot;, where SVN_PATH is the path for your SVN repository. &quot;--fallback-encoding=ansii&quot; is needed in case cvs2svn fails to convert the log messages into UTF8(default).&lt;br /&gt;
&lt;br /&gt;
7. go to SVN/conf, update svnserve.conf - uncomment out&lt;br /&gt;
# anon-access = read&lt;br /&gt;
# auth-access = write&lt;br /&gt;
# password-db = passwd&lt;br /&gt;
&lt;br /&gt;
update passwd, ie,&lt;br /&gt;
[users]&lt;br /&gt;
leon=theprogrammer&lt;br /&gt;
guest=1234&lt;br /&gt;
&lt;br /&gt;
DO NOT leave space in the name and password, otherwise your SVN clients may deny your credentials.&lt;br /&gt;
&lt;br /&gt;
8. start svnserve to the SVN repository. run &quot;svnserve -d -r SVN&quot;, where SVN is the path of your SVN repository.&lt;br /&gt;
&lt;br /&gt;
9. Point your svn client to&amp;nbsp;&lt;a href=&quot;svn://servername/SVN,&quot;&gt;svn://servername/SVN,&lt;/a&gt;&amp;nbsp;you shall be prompted to log in, then you shall see the repository.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; font-family: Arial, sans-serif; font-size: 12px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, sans-serif; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; font-size: 12px;&quot;&gt;This book might be helpful:&amp;nbsp;&lt;a href=&quot;http://www.amazon.com/Pragmatic-Guide-Subversion-Mike-Mason/dp/1934356611?ie=UTF8&amp;amp;tag=leontheprogra-20&amp;amp;link_code=btl&amp;amp;camp=213689&amp;amp;creative=392969&quot; target=&quot;_blank&quot;&gt;Pragmatic Guide to Subversion&lt;/a&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;http://www.assoc-amazon.com/e/ir?t=leontheprogra-20&amp;amp;l=btl&amp;amp;camp=213689&amp;amp;creative=392969&amp;amp;o=1&amp;amp;a=1934356611&quot; style=&quot;border: none !important; margin: 0px !important; padding: 0px !important;&quot; width=&quot;1&quot; /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://leontheprogrammer.blogspot.com/feeds/595695512855546892/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5040028188923603467/595695512855546892' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5040028188923603467/posts/default/595695512855546892'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5040028188923603467/posts/default/595695512855546892'/><link rel='alternate' type='text/html' href='http://leontheprogrammer.blogspot.com/2010/04/how-to-convert-cvs-to-svn.html' title='How to convert cvs to svn'/><author><name>leontheprogrammer</name><uri>http://www.blogger.com/profile/04491520787424702567</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitM8C17ouQKnD9nahoSwBDS-27m8n258a2mKPsRkNwUWP0-fx3waFLantGIvDHo6kEeE79I1reyNQCiira3HhmhuN_j7yc6RLrcFKww8tnAPFmrXdSAQT93U4o4bVd4w/s220/handsinhand.jpeg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5040028188923603467.post-6954958527974761342</id><published>2010-04-30T17:00:00.000+10:00</published><updated>2010-04-30T17:00:17.629+10:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="programming notes"/><title type='text'>ReadDirectoryChangesW returns ERROR_BAD_NET_RESP (error code 58)</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: verdana, tahoma, arial, sans-serif; font-size: 12px; line-height: 19px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 1.6em; margin-bottom: 0.7em; margin-left: 0px; margin-right: 0px; margin-top: 0.7em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;A recent project is about folder monitoring. The folder can be on a local hard drive or a network. We use the standard win32 api call: ReadDirectoryChangesW.&lt;/div&gt;&lt;div style=&quot;line-height: 1.6em; margin-bottom: 0.7em; margin-left: 0px; margin-right: 0px; margin-top: 0.7em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;The function works perfectly on a remote WinNT system but occasionally fails on mornitoring a folder in a remote Unix system. At the beginning we suspect if a correct (or high enough) version of samba is install on that Unix machine, but confirmation is positive. Besides the function call does not fail consistently, which really bothers us. However, the last error code from ReadDirectoryChangesW is always 58 – ERROR_BAD_NET_RESP (The specified server cannot perform the requested operation).&lt;/div&gt;&lt;div style=&quot;line-height: 1.6em; margin-bottom: 0.7em; margin-left: 0px; margin-right: 0px; margin-top: 0.7em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;I suspect it is an unsupported isssue, the latest Samba patch does not full support ReadDirectoryChangesW yet. There are few articles can be found from google, links:&lt;/div&gt;&lt;div style=&quot;line-height: 1.6em; margin-bottom: 0.7em; margin-left: 0px; margin-right: 0px; margin-top: 0.7em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;a href=&quot;http://lists.samba.org/archive/samba-technical/2003-July/030902.html&quot; style=&quot;border-bottom-color: rgb(153, 102, 51); border-bottom-style: dashed; border-bottom-width: 1px; color: #265e15; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;Problem: Watching Directories from WinNT+&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://social.msdn.microsoft.com/Forums/en-US/netfxbcl/thread/59ec6280-1bb4-43cc-a834-b58995c02760&quot; style=&quot;border-bottom-color: rgb(153, 102, 51); border-bottom-style: dashed; border-bottom-width: 1px; color: #265e15; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;FileSystemWatcher Running in Windows Server 2003&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 1.6em; margin-bottom: 0.7em; margin-left: 0px; margin-right: 0px; margin-top: 0.7em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;strong style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;The solution&lt;/strong&gt;&lt;br /&gt;
The loop to check ReadDirectoryChangesW does not break if last error is ERROR_BAD_NET_RESP, continue process directory changes if it fails. The interesting thing is the next ReadDirectoryChangesW call could succeed following previous failure. So eventually we capture the directory changes and process it approprietly.&lt;/div&gt;&lt;div style=&quot;line-height: 1.6em; margin-bottom: 0.7em; margin-left: 0px; margin-right: 0px; margin-top: 0.7em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;The ideal solution is a samba fully support ReadDirectoryChangesW&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://leontheprogrammer.blogspot.com/feeds/6954958527974761342/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5040028188923603467/6954958527974761342' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5040028188923603467/posts/default/6954958527974761342'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5040028188923603467/posts/default/6954958527974761342'/><link rel='alternate' type='text/html' href='http://leontheprogrammer.blogspot.com/2010/04/readdirectorychangesw-returns.html' title='ReadDirectoryChangesW returns ERROR_BAD_NET_RESP (error code 58)'/><author><name>leontheprogrammer</name><uri>http://www.blogger.com/profile/04491520787424702567</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitM8C17ouQKnD9nahoSwBDS-27m8n258a2mKPsRkNwUWP0-fx3waFLantGIvDHo6kEeE79I1reyNQCiira3HhmhuN_j7yc6RLrcFKww8tnAPFmrXdSAQT93U4o4bVd4w/s220/handsinhand.jpeg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5040028188923603467.post-4396673787208779751</id><published>2010-04-30T16:57:00.000+10:00</published><updated>2010-04-30T16:57:47.296+10:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="books"/><title type='text'>The power of habit</title><content type='html'>A friend of mine recommended this book &#39;The power of habit&#39; (习惯的力量). I love it, although the one I read is in Chinese. We act upon our habit in as much as 90% of time daily, if we can keep good habits, abandon bad ones, we will be surely moving forward to success sooner.&lt;br /&gt;
&lt;br /&gt;
An interesting book to read indeed, highly recommended.&amp;nbsp;&lt;a href=&quot;http://www.amazon.com/Power-Habit-Harnessing-Establish-Guarantee/dp/1410779955?ie=UTF8&amp;amp;tag=leontheprogra-20&amp;amp;link_code=btl&amp;amp;camp=213689&amp;amp;creative=392969&quot; target=&quot;_blank&quot;&gt;The Power of Habit: Harnessing the Power to Establish Routines that Guarantee Success in Business and in Life&lt;/a&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;1&quot; src=&quot;http://www.assoc-amazon.com/e/ir?t=leontheprogra-20&amp;amp;l=btl&amp;amp;camp=213689&amp;amp;creative=392969&amp;amp;o=1&amp;amp;a=1410779955&quot; style=&quot;border: none !important; margin: 0px !important; padding: 0px !important;&quot; width=&quot;1&quot; /&gt;</content><link rel='replies' type='application/atom+xml' href='http://leontheprogrammer.blogspot.com/feeds/4396673787208779751/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/5040028188923603467/4396673787208779751' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5040028188923603467/posts/default/4396673787208779751'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5040028188923603467/posts/default/4396673787208779751'/><link rel='alternate' type='text/html' href='http://leontheprogrammer.blogspot.com/2010/04/power-of-habit.html' title='The power of habit'/><author><name>leontheprogrammer</name><uri>http://www.blogger.com/profile/04491520787424702567</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitM8C17ouQKnD9nahoSwBDS-27m8n258a2mKPsRkNwUWP0-fx3waFLantGIvDHo6kEeE79I1reyNQCiira3HhmhuN_j7yc6RLrcFKww8tnAPFmrXdSAQT93U4o4bVd4w/s220/handsinhand.jpeg'/></author><thr:total>0</thr:total></entry></feed>