<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://msmvps.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Martin Zugec blog : Compatibility</title><link>http://msmvps.com/blogs/martinzugec/archive/tags/Compatibility/default.aspx</link><description>Tags: Compatibility</description><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP2 (Build: 40407.4157)</generator><item><title>Map external drive to local folder</title><link>http://msmvps.com/blogs/martinzugec/archive/2008/03/30/map-external-drive-to-local-folder.aspx</link><pubDate>Sun, 30 Mar 2008 13:17:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1561999</guid><dc:creator>martin</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/martinzugec/rsscomments.aspx?PostID=1561999</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/martinzugec/commentapi.aspx?PostID=1561999</wfw:comment><comments>http://msmvps.com/blogs/martinzugec/archive/2008/03/30/map-external-drive-to-local-folder.aspx#comments</comments><description>&lt;p&gt;As mentioned before, I bought new desktop - and with new computer, there comes usually new challenges. &lt;/p&gt;
&lt;p&gt;My new PC have built-in card reader - but as you know, if you have card reader with NO media inside, it will still occupy your drive letters and this can be quite confusing. Specially because I am using external USB drive and I am used that it is mapped to drive E: on my laptop - on desktop it is drive J: &lt;/p&gt;
&lt;p&gt;&lt;a href="http://msmvps.com/blogs/martinzugec/WindowsLiveWriter/Mapexternaldrivetolocalfolder_C8F4/image_2.png"&gt;&lt;img style="BORDER-RIGHT:0px;BORDER-TOP:0px;BORDER-LEFT:0px;BORDER-BOTTOM:0px;" height="127" alt="image" src="http://msmvps.com/blogs/martinzugec/WindowsLiveWriter/Mapexternaldrivetolocalfolder_C8F4/image_thumb.png" width="244" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;So I decided to use some less known functionality of Windows - to map disks to local folders instead of drive letters. To achieve that, you have to follow these steps:&lt;/p&gt;
&lt;p&gt;1.) Create some local folders - I created C:\Links (which is my storage of symlinks shortcuts) and there I created folder ExternalHDD&lt;/p&gt;
&lt;p&gt;2.) Right click on Computer and select Manage&lt;/p&gt;
&lt;p&gt;3.) Select Disk Management&lt;/p&gt;
&lt;p&gt;4.) Right click on selected disk, select Change Drive Letters and Paths&lt;/p&gt;
&lt;p&gt;5.) Remove current drive letter:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://msmvps.com/blogs/martinzugec/WindowsLiveWriter/Mapexternaldrivetolocalfolder_C8F4/image_4.png"&gt;&lt;img style="BORDER-RIGHT:0px;BORDER-TOP:0px;BORDER-LEFT:0px;BORDER-BOTTOM:0px;" height="162" alt="image" src="http://msmvps.com/blogs/martinzugec/WindowsLiveWriter/Mapexternaldrivetolocalfolder_C8F4/image_thumb_1.png" width="244" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;6.) Click on Add. Instead of specifying new drive letter select &amp;quot;Mount in the following empty NTFS folder&amp;quot; and specify folder you created in step 1:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://msmvps.com/blogs/martinzugec/WindowsLiveWriter/Mapexternaldrivetolocalfolder_C8F4/image_8.png"&gt;&lt;img style="BORDER-RIGHT:0px;BORDER-TOP:0px;BORDER-LEFT:0px;BORDER-BOTTOM:0px;" height="122" alt="image" src="http://msmvps.com/blogs/martinzugec/WindowsLiveWriter/Mapexternaldrivetolocalfolder_C8F4/image_thumb_3.png" width="244" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;7.) Click OK&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Now you can check that your external HDD is no longer available through drive letter, but it is instead mapped to your local drive :) &lt;/p&gt;
&lt;p&gt;I also created C:\Links\CardReaders - and I am mapping all my (empty) card readers as folders (so SD will be SD, MMC will be MMC etc...) to better organize my stuff:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://msmvps.com/blogs/martinzugec/WindowsLiveWriter/Mapexternaldrivetolocalfolder_C8F4/image_10.png"&gt;&lt;img style="BORDER-RIGHT:0px;BORDER-TOP:0px;BORDER-LEFT:0px;BORDER-BOTTOM:0px;" height="143" alt="image" src="http://msmvps.com/blogs/martinzugec/WindowsLiveWriter/Mapexternaldrivetolocalfolder_C8F4/image_thumb_4.png" width="126" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;So here is after all my final picture from Computer:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://msmvps.com/blogs/martinzugec/WindowsLiveWriter/Mapexternaldrivetolocalfolder_C8F4/image_12.png"&gt;&lt;img style="BORDER-RIGHT:0px;BORDER-TOP:0px;BORDER-LEFT:0px;BORDER-BOTTOM:0px;" height="182" alt="image" src="http://msmvps.com/blogs/martinzugec/WindowsLiveWriter/Mapexternaldrivetolocalfolder_C8F4/image_thumb_5.png" width="244" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;I really like to use symlinks to organize my data and to make them easily accessible. Microsoft is also using symlinks - and this is one of examples where you can run into hidden implementation of symlinks.&lt;/p&gt;
&lt;p&gt;UPDATE: Forgot to mention - it is NOT Windows Vista specific feature, it definitely works on Windows XP and probably on Windows 2000 (I am using this feature for looooooong time)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1561999" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/martinzugec/archive/tags/Compatibility/default.aspx">Compatibility</category><category domain="http://msmvps.com/blogs/martinzugec/archive/tags/Productivity/default.aspx">Productivity</category><category domain="http://msmvps.com/blogs/martinzugec/archive/tags/Tips_2600_amp_3B00_Tricks/default.aspx">Tips&amp;amp;Tricks</category></item><item><title>How to detect if library requires registration II.</title><link>http://msmvps.com/blogs/martinzugec/archive/2008/03/10/how-to-detect-if-library-requires-registration-ii.aspx</link><pubDate>Mon, 10 Mar 2008 10:08:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1538887</guid><dc:creator>martin</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/martinzugec/rsscomments.aspx?PostID=1538887</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/martinzugec/commentapi.aspx?PostID=1538887</wfw:comment><comments>http://msmvps.com/blogs/martinzugec/archive/2008/03/10/how-to-detect-if-library-requires-registration-ii.aspx#comments</comments><description>&lt;p&gt;As you maybe noticed, I released small utility that allows you to detect all libraries (dlls or ocxs) that requires registration using RegSvr32 and can potentially lead to DLL hell (and are very dangerous in SBC environments, specially with strong NTFS security)... &lt;/p&gt;
&lt;p&gt;&amp;nbsp;In this utility I am using LoadLibraryA API to load library and then try to detect existance of DLLRegisterServer function. Problem is that this API is too &amp;quot;intelligent&amp;quot; - it is not really silent and sometimes it will popup some message box like &amp;quot;This application has failed to start because xxx.dll was not found. Re-installing the application may fix this problem.&amp;quot;. LoadLibrary requires also all dependent libraries to be loaded successfully and that is why such messages are returned.&lt;/p&gt;
&lt;p&gt;Because there is nothing I can do about this error and COMDetector is command line tool that should be used for parsing, I decided I must found another way how to detect such files. Another approach was to detect OLESelfRegister. After some investingation I found that this is present as part of the Version information, so I tried to have a look through normal GUI and voila - to my surprise this information is really there :)&lt;/p&gt;
&lt;p&gt;&lt;a href="http://msmvps.com/blogs/martinzugec/WindowsLiveWriter/OLESelfRegsiter.PNG"&gt;&lt;img src="http://msmvps.com/blogs/martinzugec/WindowsLiveWriter/OLESelfRegsiter.PNG" border="0" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So (if you want to do it quickly) easiest way how to detect if DLL\OCX requires registration is to right-click on such file, select Properties, Version and locate OLESelfRegister - if it is there, you must register such component (or generate manifest as I wrote in another article).&lt;/p&gt;
&lt;p&gt;Right now I am rewriting COMDetector to implement this new scan technique, I am also adding switch for recursive scanning. If you want to request any additional functionality, just let me know.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1538887" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/martinzugec/archive/tags/Other/default.aspx">Other</category><category domain="http://msmvps.com/blogs/martinzugec/archive/tags/Compatibility/default.aspx">Compatibility</category><category domain="http://msmvps.com/blogs/martinzugec/archive/tags/Tips_2600_amp_3B00_Tricks/default.aspx">Tips&amp;amp;Tricks</category></item><item><title>System.OutOfMemory and random errors</title><link>http://msmvps.com/blogs/martinzugec/archive/2008/02/28/system-outofmemory-and-random-errors.aspx</link><pubDate>Thu, 28 Feb 2008 15:40:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1527073</guid><dc:creator>martin</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/martinzugec/rsscomments.aspx?PostID=1527073</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/martinzugec/commentapi.aspx?PostID=1527073</wfw:comment><comments>http://msmvps.com/blogs/martinzugec/archive/2008/02/28/system-outofmemory-and-random-errors.aspx#comments</comments><description>&lt;p&gt;One of my (read &amp;quot;created by me&amp;quot;) programs suddenly stopped working - to my surprise, for everyone else everything was working flawlessly - except me... &lt;/p&gt;
&lt;p&gt;&amp;nbsp;It was giving me range of random errors (most common was System.OutOfMemory), even when I run it through debugger, it was crashing on random lines with really strange errors (psadi.dll was not found...)... That was really strange. And it was really strange that all other .NET applications were working fine. Most of the time System.OutOfMemory was throwing when reading 5 text files (all of them contained 1 line of text) - come on, we are not in middle age, modern computer should be able to handle it ;)&lt;/p&gt;
&lt;p&gt;For all my applications (and many of my project) I really love to use Subversion - if you dont know it, drop me line and I will write some details about it.. I decided to revert to older version of application. &lt;/p&gt;
&lt;p&gt;Because I also wanted to keep my current version, I saved file under different file name - and tadaaa - it was working flawlessly again. Then I tried to rename also my latest version - and now it was running smoothly. So I checked HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options - this is the key where all debuggers etc are hooking to application processes (including my tool Hook Application)...&lt;/p&gt;
&lt;p&gt;&amp;nbsp;To my surprise MyApp.exe contained tons of subkeys with strange names like DangerousAPIs, Locks etc... I tried to rename this registry key - and application was working.. &lt;/p&gt;
&lt;p&gt;After small investigation I traced the root of problem to Application Verifier - and then I remembered that this week I had presentation where I showed also AppVerif - and I was presenting on my program.&lt;/p&gt;
&lt;p&gt;To make long story short - if your application works after you rename main exe, check Image File Execution Options registry key and maybe it will help you.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1527073" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/martinzugec/archive/tags/Development/default.aspx">Development</category><category domain="http://msmvps.com/blogs/martinzugec/archive/tags/Compatibility/default.aspx">Compatibility</category></item><item><title>New utility to detect COM objects</title><link>http://msmvps.com/blogs/martinzugec/archive/2008/02/17/new-utility-to-detect-com-objects.aspx</link><pubDate>Sun, 17 Feb 2008 00:30:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1515145</guid><dc:creator>martin</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/martinzugec/rsscomments.aspx?PostID=1515145</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/martinzugec/commentapi.aspx?PostID=1515145</wfw:comment><comments>http://msmvps.com/blogs/martinzugec/archive/2008/02/17/new-utility-to-detect-com-objects.aspx#comments</comments><description>&lt;p&gt;If you are deployment specialist or responsible for deploying applications AND keeping computers running afterwards, I think you agree that you always want to know what will installer do - therefore you prefer to use copy and paste installations...&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Even if that is not applicable and you are like me, you rather build your own script to copy folders\files and register some libraries instead of using some installer (or maybe you are not and I am really, really strange ;)).&lt;/p&gt;
&lt;p&gt;&amp;nbsp;If you do so, then you probably encountered situation when you can see tens or hundres of DLLs in one folder and you are not sure which are static and which requires registration through regsvr32. Or you can run into situation when application suddenly stopped working and you are almost sure that it is due missing registration of one file. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;I run few times into this situation - and I decided to write small utility that is able to detect libraries that requires registrations... It is called COM Detector ;)&lt;/p&gt;
&lt;p&gt;It is really easy to use it - just specify file or folder as input parameter and it will show you if file\files are COM objects (and requires registration prior to use) or they are not. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;This is output when scanning System32 folder (only few lines to show you):&lt;/p&gt;
&lt;p&gt;bios4.rom:Not DLL or OCX file&lt;br /&gt;bitsprx2.dll:COM&lt;br /&gt;bitsprx3.dll:COM&lt;br /&gt;blackbox.dll:COM&lt;br /&gt;blastcln.exe:Normal library&lt;br /&gt;bootcfg.exe:Normal library&lt;br /&gt;bootok.exe:Normal library&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;You can see that bisprx2.dll, bitsprx3.dll and blackbox.dll are COM-based so you must register them in order to be able to use them.&lt;/p&gt;
&lt;p&gt;To simplify parsing, delimiter is &amp;quot;:&amp;quot; - this is selected due to fact that you can`t use &amp;quot;:&amp;quot; in file\folder name because it is used for &lt;a class="" title="alternative data streams" href="http://msmvps.com/blogs/martinzugec/archive/2005/11/08/74862.aspx" target="_blank"&gt;alternative data streams.&amp;nbsp;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;There are two optional switches available, /Debug and /SkipNoCOM. /Debug is used for debugging and is not really important, when you specify /SkipNoCOM, only COM objects will be displayed.&lt;/p&gt;
&lt;p&gt;Also known bug - if you encounter message box like &amp;quot;The application or DLL&amp;nbsp;&amp;lt;File&amp;gt; is not a valid Windows image. Please check this against your installation diskette.&amp;quot;, just ignore it - it is displayed by API and (so far) there is nothing I can do about it.&lt;br /&gt;&lt;/p&gt;&lt;iframe style="BORDER-RIGHT:#dde5e9 1px solid;PADDING-RIGHT:0px;BORDER-TOP:#dde5e9 1px solid;PADDING-LEFT:0px;PADDING-BOTTOM:0px;MARGIN:3px;BORDER-LEFT:#dde5e9 1px solid;WIDTH:240px;PADDING-TOP:0px;BORDER-BOTTOM:#dde5e9 1px solid;HEIGHT:66px;BACKGROUND-COLOR:#ffffff;" src="http://cid-6f6355ee6be5160e.skydrive.live.com/embedrowdetail.aspx/MyProjects/COMDetector.exe" frameborder="0" scrolling="no"&gt;&lt;/iframe&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1515145" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/martinzugec/archive/tags/Utilities/default.aspx">Utilities</category><category domain="http://msmvps.com/blogs/martinzugec/archive/tags/Compatibility/default.aspx">Compatibility</category></item><item><title>FileMon, RegMon... What about LibMon?</title><link>http://msmvps.com/blogs/martinzugec/archive/2008/02/15/filemon-regmon-what-about-libmon.aspx</link><pubDate>Fri, 15 Feb 2008 10:43:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1515104</guid><dc:creator>martin</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/martinzugec/rsscomments.aspx?PostID=1515104</wfw:commentRss><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/martinzugec/commentapi.aspx?PostID=1515104</wfw:comment><comments>http://msmvps.com/blogs/martinzugec/archive/2008/02/15/filemon-regmon-what-about-libmon.aspx#comments</comments><description>&lt;p&gt;Recently I wrote small article about DLL Hell problem (&lt;a href="http://msmvps.com/blogs/martinzugec/archive/2007/11/11/dll-help-is-there-any-solution.aspx"&gt;http://msmvps.com/blogs/martinzugec/archive/2007/11/11/dll-help-is-there-any-solution.aspx&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;Maybe you were also experiencing similar problems and you tried to use some tools to troubleshoot - best choice is usually FileMon\RegMon (or ProcMon), but usually they wont really help when working with libraries. This is specially case with legacy Visual Basic 6.0 applications, that just crashes with general error (Library not found).&lt;/p&gt;
&lt;p&gt;&amp;nbsp;And maybe you also encountered tool called Dependency Walker (&lt;a href="http://www.dependencywalker.com/"&gt;www.dependencywalker.com&lt;/a&gt;) from Microsoft. This is quick summary from website:&lt;/p&gt;
&lt;p&gt;&amp;quot;Dependency Walker is a free utility that scans any 32-bit or 64-bit Windows module (exe, dll, ocx, sys, etc.) and builds a hierarchical tree diagram of all dependent modules.&amp;quot;&lt;/p&gt;
&lt;p&gt;Maybe you also tried this utility - just to find out that it is quite useless, because most libraries (99%) are loaded dynamically and are not listed in tree view (usually you only see base system libraries):&lt;/p&gt;
&lt;p&gt;&lt;a href="http://msmvps.com/blogs/martinzugec/WindowsLiveWriter/DependencyWalker.PNG"&gt;&lt;img src="http://msmvps.com/blogs/martinzugec/WindowsLiveWriter/DependencyWalker.PNG" border="0" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Just by accident I found that new (silently released) version contains also functionality called Profiling (dont ask me why they choose such meaningless name instead of Monitoring or any other option). &lt;/p&gt;
&lt;p&gt;This option allows you to run program and detect dependencies automatically (Profile -&amp;gt; Start Profiling). Of course output is much more detailed now:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://msmvps.com/blogs/martinzugec/WindowsLiveWriter/ProfiledDependencyWalker.PNG"&gt;&lt;img src="http://msmvps.com/blogs/martinzugec/WindowsLiveWriter/ProfiledDependencyWalker.PNG" border="0" alt="" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Also attached log file can be extremely useful when troubleshooting:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;b&gt;&lt;font color="#ff0000" size="1"&gt;LoadLibraryExW(&amp;quot;C:\Apps\Opera 9\Microsoft.Windows.Common-Controls.DLL&amp;quot;, 0x00000000, LOAD_LIBRARY_AS_DATAFILE) returned NULL. Error: The system cannot find the file specified (2).&lt;/p&gt;&lt;/b&gt;&lt;/font&gt;
&lt;p&gt;in above example, application I used was downloaded from ThinDownload - obviously during packaging they forget something, because I dont have C:\Apps. &lt;br /&gt;I already used this tool few times and it can be extremely useful. For example when I noticed that one library is always returning something like &lt;b&gt;&lt;font color="#ff0000" size="1"&gt;Error: The specified procedure could not be found (127).&lt;/b&gt;&lt;/font&gt;, I knew that problem is not caused by missing library, but due to version mismatch. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1515104" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/martinzugec/archive/tags/Utilities/default.aspx">Utilities</category><category domain="http://msmvps.com/blogs/martinzugec/archive/tags/Compatibility/default.aspx">Compatibility</category></item></channel></rss>