<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jochen Kalmbach's Blog</title>
	<atom:link href="http://blog.kalmbach-software.de/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.kalmbach-software.de</link>
	<description>Infos about Windows development and dotNET Framework</description>
	<lastBuildDate>Thu, 23 May 2013 12:18:07 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Improved &#8220;PreventSetUnhandledExceptionFilter&#8221;</title>
		<link>http://blog.kalmbach-software.de/2013/05/23/improvedpreventsetunhandledexceptionfilter/</link>
		<comments>http://blog.kalmbach-software.de/2013/05/23/improvedpreventsetunhandledexceptionfilter/#comments</comments>
		<pubDate>Thu, 23 May 2013 12:18:07 +0000</pubDate>
		<dc:creator>jkalmbach</dc:creator>
				<category><![CDATA[WinAPI]]></category>

		<guid isPermaLink="false">http://blog.kalmbach-software.de/?p=73</guid>
		<description><![CDATA[Starting with VS2005(VC8) it was not possible to handle all exceptions in process. I have discussed this in &#8220;SetUnhandledExceptionFilter&#8221; and VC8 and in Unhandled exceptions in VC8 and above… for x86 and x64. It seemms that the code I posted had been used in many Projects to handle all exceptions and to write a minidump [...]]]></description>
				<content:encoded><![CDATA[<p>Starting with VS2005(VC8) it was not possible to handle all exceptions in process. I have discussed this in <a href="http://blog.kalmbachnet.de/?postid=75" target="_blank">&#8220;SetUnhandledExceptionFilter&#8221; and VC8</a> and in <a href="http://blog.kalmbach-software.de/2008/04/02/unhandled-exceptions-in-vc8-and-above-for-x86-and-x64/" target="_blank">Unhandled exceptions in VC8 and above… for x86 and x64</a>.</p>
<p>It seemms that the code I posted had been used in many Projects to handle all exceptions and to write a minidump in that case. Also someone has used it in a VB6 application and for this he needed to implement this function in a separate &#8220;CrashHandler.dll&#8221;. But now he got errors during the shutdown of the VB6 application. It seems that VB6 unloads the DLL before other DLLs and it seems that some other DLL is calling &#8220;SetUnhandledExceptionFilter&#8221; during shutown. This now leads to trouble, because the DLL is already unloaded.</p>
<p>Now I created a better and cleaner implementation for the &#8220;PreventSetUnhandledExceptionFilter&#8221; function, which also works in any situation, even if the DLL was unloaded <img src='http://blog.kalmbach-software.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<pre>static BOOL PreventSetUnhandledExceptionFilter()
{
  HMODULE hKernel32 = LoadLibrary(_T("kernel32.dll"));
  if (hKernel32 == NULL) return FALSE;
  void *pOrgEntry = GetProcAddress(hKernel32, "SetUnhandledExceptionFilter");
  if (pOrgEntry == NULL) return FALSE;

#ifdef _M_IX86
  // Code for x86:
  // 33 C0                xor         eax,eax  
  // C2 04 00             ret         4 
  unsigned char szExecute[] = { 0x33, 0xC0, 0xC2, 0x04, 0x00 };
#elif _M_X64
  // 33 C0                xor         eax,eax 
  // C3                   ret  
  unsigned char szExecute[] = { 0x33, 0xC0, 0xC3 };
#else
#error "The following code only works for x86 and x64!"
#endif

  SIZE_T bytesWritten = 0;
  BOOL bRet = WriteProcessMemory(GetCurrentProcess(),
    pOrgEntry, szExecute, sizeof(szExecute), &#038;bytesWritten);
  return bRet;
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.kalmbach-software.de/2013/05/23/improvedpreventsetunhandledexceptionfilter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gmail man ;)</title>
		<link>http://blog.kalmbach-software.de/2012/09/23/gmail-man/</link>
		<comments>http://blog.kalmbach-software.de/2012/09/23/gmail-man/#comments</comments>
		<pubDate>Sun, 23 Sep 2012 08:00:51 +0000</pubDate>
		<dc:creator>jkalmbach</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[WinAPI]]></category>

		<guid isPermaLink="false">http://blog.kalmbach-software.de/2012/09/23/gmail-man/</guid>
		<description><![CDATA[A woundfull video about gmail; a must see! http://youtu.be/TDbrX5U75dk]]></description>
				<content:encoded><![CDATA[<p>A woundfull video about gmail; a must see!<br />
<a href="http://youtu.be/TDbrX5U75dk">http://youtu.be/TDbrX5U75dk</a></p>
<p><iframe width="560" height="315" src="http://www.youtube.com/embed/TDbrX5U75dk" frameborder="0" allowfullscreen></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kalmbach-software.de/2012/09/23/gmail-man/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>ANN: Community Forums NNTP Bridge</title>
		<link>http://blog.kalmbach-software.de/2010/05/26/ann-community-forums-nntp-bridge/</link>
		<comments>http://blog.kalmbach-software.de/2010/05/26/ann-community-forums-nntp-bridge/#comments</comments>
		<pubDate>Wed, 26 May 2010 05:39:01 +0000</pubDate>
		<dc:creator>jkalmbach</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[WinAPI]]></category>

		<guid isPermaLink="false">http://blog.kalmbach-software.de/2010/05/26/ann-community-forums-nntp-bridge/</guid>
		<description><![CDATA[After looking deeper into the MSDN Forums Client and into an C# NNTP server, I decided to integrate both Ms-PL projects into a single project: Community Forums NNTP bridge The result is a single &#8220;Community Forums NNTP Bridge&#8221; which can replace the MS NNTP Bridge. It also integrates both web services (*social*, *answers*) into a [...]]]></description>
				<content:encoded><![CDATA[<p>After looking deeper into the <a href="http://msdnforumsclient.codeplex.com/">MSDN Forums Client</a> and into an <a href="http://spnews.codeplex.com/">C# NNTP server</a>, I decided to integrate both Ms-PL projects into a single project:</p>
<p><a href="http://communitybridge.codeplex.com/">Community Forums NNTP bridge</a></p>
<p>The result is a single &#8220;<a href="http://communitybridge.codeplex.com/">Community Forums NNTP Bridge</a>&#8221; which can replace the MS NNTP Bridge. It also integrates both web services (*social*, *answers*) into a single NNTP server; so the &#8220;feeling&#8221; is like before the split <img src='http://blog.kalmbach-software.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>If you are interested, you can take a look (with full source code) into the alternative:<br />
<a href="http://communitybridge.codeplex.com/">http://communitybridge.codeplex.com/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kalmbach-software.de/2010/05/26/ann-community-forums-nntp-bridge/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>LogSubstPol updated to VS2010</title>
		<link>http://blog.kalmbach-software.de/2010/05/01/logsubstpol-updated-to-vs2010/</link>
		<comments>http://blog.kalmbach-software.de/2010/05/01/logsubstpol-updated-to-vs2010/#comments</comments>
		<pubDate>Sat, 01 May 2010 19:31:49 +0000</pubDate>
		<dc:creator>jkalmbach</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[WinAPI]]></category>

		<guid isPermaLink="false">http://blog.kalmbach-software.de/2010/05/01/logsubstpol-updated-to-vs2010/</guid>
		<description><![CDATA[If you are using my $log$ substitution/keyword expansion for your source code with TFS, I have good news for your: I have upgradred my project to VS2010 The latest download can be found here: $log$ / Keyword Substitution / Expansion Check-In Policy (TFS &#8211; LogSubstPol)]]></description>
				<content:encoded><![CDATA[<p>If you are using my $log$ substitution/keyword expansion for your source code with TFS, I have good news for your: I have upgradred my project to VS2010 <img src='http://blog.kalmbach-software.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
The latest download can be found here:<br />
<a href="http://logsubstpol.codeplex.com/">$log$ / Keyword Substitution / Expansion Check-In Policy (TFS &#8211; LogSubstPol)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kalmbach-software.de/2010/05/01/logsubstpol-updated-to-vs2010/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Converting VC projects to VC2010: Warning MSB8012</title>
		<link>http://blog.kalmbach-software.de/2010/04/27/converting-vc-projects-to-vc2010-warning-msb8012/</link>
		<comments>http://blog.kalmbach-software.de/2010/04/27/converting-vc-projects-to-vc2010-warning-msb8012/#comments</comments>
		<pubDate>Tue, 27 Apr 2010 19:14:14 +0000</pubDate>
		<dc:creator>jkalmbach</dc:creator>
				<category><![CDATA[WinAPI]]></category>

		<guid isPermaLink="false">http://blog.kalmbach-software.de/2010/04/27/converting-vc-projects-to-vc2010-warning-msb8012/</guid>
		<description><![CDATA[If you convert a project from VC5/6/2002/2003/2005/2008 to VC2010, you will sometimes get an warning during the conversion (UpgradeLog.XML) and during the link phase os your build. This warning might look like: 1>...Microsoft.CppBuild.targets(990,5): warning MSB8012: TargetPath(...LeakFinder_VC9.exe) does not match the Linker's OutputFile property value (...LeakFinder.exe). This may cause your project to build incorrectly. To correct [...]]]></description>
				<content:encoded><![CDATA[<p>If you convert a project from VC5/6/2002/2003/2005/2008 to VC2010, you will sometimes get an warning during the conversion (UpgradeLog.XML) and during the link phase os your build. This warning might look like:</p>
<pre>1>...Microsoft.CppBuild.targets(990,5): warning MSB8012: 
  TargetPath(...LeakFinder_VC9.exe) does not match the Linker's OutputFile property value (...LeakFinder.exe). 
  This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).</pre>
<p>or</p>
<pre>1>...Microsoft.CppBuild.targets(992,5): warning MSB8012: 
  TargetName(LeakFinder_VC9) does not match the Linker's OutputFile property value (LeakFinder). 
  This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).</pre>
<p>The problem is, that the following two settings are not identical (Target Name, Target Extension):<br />
<a href="http://blog.kalmbachnet.de/files/VS2010TargetName.png"><img src="http://blog.kalmbachnet.de/files/VS2010TargetName.png" /></a></p>
<p>and (Output File):<br />
<a href="http://blog.kalmbachnet.de/files/VS2010OutputFile.png"><img src="http://blog.kalmbachnet.de/files/VS2010OutputFile.png" /></a></p>
<p>If you match those two, the warning will be gone <img src='http://blog.kalmbach-software.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>For example, if you have named your EXE in Debug-Builds: &#8220;MyAppd.exe&#8221; and in Release-Builds &#8220;MyApp.exe&#8221;, I suggest that your only change the &#8220;Target Name&#8221; in the General-Page to &#8220;MyAppd&#8221; (for Debug) and &#8220;MyApp&#8221; (Release) or ($(ProjectName) if it is the same name as the project).<br />
Then you must also change the &#8220;Linker | General | Output File&#8221; to the default setting: &#8220;<inherit from parent or project defaults>&#8221; or &#8220;$(OutDir)$(TargetName)$(TargetExt)&#8221;. This setting is <strong>always</strong> suggested!</p>
<p>If you want to change the output directory, you should the the &#8220;General | Output Directory&#8221; setting.</p>
<p>More info about this conversion problem can be found here:<br />
<a href="http://social.msdn.microsoft.com/Forums/en/vcprerelease/thread/3c03e730-6a0e-4ee4-a0d6-6a5c3ce4343c">Visual Studio 2010 &#8211; $(TargetName) macro</a><br />
<a href="http://blogs.msdn.com/vcblog/archive/2010/03/02/visual-studio-2010-c-project-upgrade-guide.aspx">Visual Studio 2010 C++ Project Upgrade Guide</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kalmbach-software.de/2010/04/27/converting-vc-projects-to-vc2010-warning-msb8012/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>OleView not found in VS2008 and VS2010</title>
		<link>http://blog.kalmbach-software.de/2010/04/22/oleview-not-found-in-vs208-and-vs2010/</link>
		<comments>http://blog.kalmbach-software.de/2010/04/22/oleview-not-found-in-vs208-and-vs2010/#comments</comments>
		<pubDate>Thu, 22 Apr 2010 08:27:22 +0000</pubDate>
		<dc:creator>jkalmbach</dc:creator>
				<category><![CDATA[WinAPI]]></category>

		<guid isPermaLink="false">http://blog.kalmbach-software.de/2010/04/22/oleview-not-found-in-vs208-and-vs2010/</guid>
		<description><![CDATA[If you have installed VS2008 and/or VS2010 (full), you will notice that OleView is not installed! The product team decided to remove this utility from the tools-folder. But you the source-code is still available! You can find it under C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\Samples\\1033\\VC2010Samples.zip Extract the files and build (the release version of) C++\\MFC\\ole\\oleview\\oleview.sln [...]]]></description>
				<content:encoded><![CDATA[<p>If you have installed VS2008 and/or VS2010 (full), you will notice that OleView is not installed!<br />
The product team decided to remove this utility from the tools-folder. </p>
<p>But you the source-code is still available! You can find it under </p>
<pre>C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\Samples\\1033\\VC2010Samples.zip</pre>
<p>Extract the files and build (the release version of) </p>
<pre>C++\\MFC\\ole\\oleview\\oleview.sln</pre>
<p>Then you have the two files: oleview.exe and iviewers.dll</p>
<p>Also, the same problem is with the OLE-Test Container (tstcon). This application can also be found in the samples.<br />
See also: <a href="http://blogs.msdn.com/vcblog/archive/2010/03/18/activex-test-container-application-is-still-available.aspx">ActiveX Test Container Application is Still Available</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kalmbach-software.de/2010/04/22/oleview-not-found-in-vs208-and-vs2010/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Supported runtime OS for VC2010</title>
		<link>http://blog.kalmbach-software.de/2010/04/22/supported-runtime-os-for-vc2010/</link>
		<comments>http://blog.kalmbach-software.de/2010/04/22/supported-runtime-os-for-vc2010/#comments</comments>
		<pubDate>Thu, 22 Apr 2010 08:20:56 +0000</pubDate>
		<dc:creator>jkalmbach</dc:creator>
				<category><![CDATA[WinAPI]]></category>

		<guid isPermaLink="false">http://blog.kalmbach-software.de/2010/04/22/supported-runtime-os-for-vc2010/</guid>
		<description><![CDATA[Here is now the offical statement for the supported runtime OS: Windows XP with SP2 and later Windows Server 2003 with SP1 and later Windows Vista RTM an later Windows Server 2008 RTM and later Windows 7 and later This restrictions comes from a security desicion to have a hard dependency on EncodePointer, which is [...]]]></description>
				<content:encoded><![CDATA[<p>Here is now the offical statement for the supported runtime OS:</p>
<ul>
<li>Windows XP with SP2 and later
<li>Windows Server 2003 with SP1 and later
<li>Windows Vista RTM an later
<li>Windows Server 2008 RTM and later
<li>Windows 7 and later
</ul>
<p>This restrictions comes from a security desicion to have a hard dependency on <a href="http://msdn.microsoft.com/en-us/library/bb432254">EncodePointer</a>, which is only available in the above OSes.</p>
<p>For more info see: <a href="http://msdn.microsoft.com/en-us/library/ws0swas0.aspx">Visual Studio 2010: Windows Platforms (CRT)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kalmbach-software.de/2010/04/22/supported-runtime-os-for-vc2010/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Default Keybindings for VS2010 (C++, C#, VB, F#)</title>
		<link>http://blog.kalmbach-software.de/2010/04/13/default-keybindings-for-vs2010-c-c-vb-f/</link>
		<comments>http://blog.kalmbach-software.de/2010/04/13/default-keybindings-for-vs2010-c-c-vb-f/#comments</comments>
		<pubDate>Tue, 13 Apr 2010 11:28:24 +0000</pubDate>
		<dc:creator>jkalmbach</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[WinAPI]]></category>

		<guid isPermaLink="false">http://blog.kalmbach-software.de/2010/04/13/default-keybindings-for-vs2010-c-c-vb-f/</guid>
		<description><![CDATA[You can download the VS2010 Default Keybinding Cards here: http://www.microsoft.com/downloads/details.aspx?FamilyID=92CED922-D505-457A-8C9C-84036160639F&#038;displaylang=en]]></description>
				<content:encoded><![CDATA[<p>You can download the VS2010 Default Keybinding Cards here:<br />
<a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=92CED922-D505-457A-8C9C-84036160639F&#038;displaylang=en">http://www.microsoft.com/downloads/details.aspx?FamilyID=92CED922-D505-457A-8C9C-84036160639F&#038;displaylang=en</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kalmbach-software.de/2010/04/13/default-keybindings-for-vs2010-c-c-vb-f/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Better sos.dll for debugging in WinDbg available!</title>
		<link>http://blog.kalmbach-software.de/2010/03/30/better-sosdll-for-debugging-in-windbg-available/</link>
		<comments>http://blog.kalmbach-software.de/2010/03/30/better-sosdll-for-debugging-in-windbg-available/#comments</comments>
		<pubDate>Tue, 30 Mar 2010 12:46:56 +0000</pubDate>
		<dc:creator>jkalmbach</dc:creator>
				<category><![CDATA[.NET]]></category>

		<guid isPermaLink="false">http://blog.kalmbach-software.de/2010/03/30/better-sosdll-for-debugging-in-windbg-available/</guid>
		<description><![CDATA[Finally MS release a *better* sos.dll extension for WinDbg (psscor2.dll), which has many more features. One of my favorite feature is &#8220;displaying callstacks with line infos&#8221;! Also it has a good &#8220;!Analysis&#8221; command for dump-files. The output of &#8220;!Help&#8221; is: ------------------------------------------------------------------------------- PSSCOR is a debugger extension DLL designed to aid in the debugging of managed [...]]]></description>
				<content:encoded><![CDATA[<p>Finally MS release <a href="http://blogs.msdn.com/tom/archive/2010/03/29/new-debugger-extension-for-net-psscor2-released.aspx">a *better* sos.dll extension</a> for WinDbg (<a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=5c068e9f-ebfe-48a5-8b2f-0ad6ab454ad4&#038;displayLang=en">psscor2.dll</a>), which has many more features. One of my favorite feature is &#8220;displaying callstacks with line infos&#8221;!</p>
<p>Also it has a good &#8220;!Analysis&#8221; command for <a href="http://blog.kalmbach-software.de/2008/12/13/writing-minidumps-in-c/">dump-files</a>.</p>
<p>The output of &#8220;!Help&#8221; is:</p>
<pre>-------------------------------------------------------------------------------
PSSCOR is a debugger extension DLL designed to aid in the debugging of managed
programs. Functions are listed by category, then roughly in order of
importance. Shortcut names for popular functions are listed in parenthesis.
Type "!help <functionname>" for detailed info on that function. 

Object Inspection                  Examining code and stacks
-----------------------------      -----------------------------
DumpObj (do)                       Threads
DumpArray (da)                     CLRStack
DumpStackObjects (dso)             IP2MD
DumpAllExceptions (dae)            BPMD
DumpHeap                           U
DumpVC                             DumpStack
GCRoot                             EEStack
ObjSize                            GCInfo
FinalizeQueue                      EHInfo
PrintException (pe)                COMState
TraverseHeap
DumpField (df)
DumpDynamicAssemblies (dda)
GCRef
DumpColumnNames (dcn)
DumpRequestQueues
DumpUMService

Examining CLR data structures      Diagnostic Utilities
-----------------------------      -----------------------------
DumpDomain                         VerifyHeap
EEHeap                             DumpLog
Name2EE                            FindAppDomain
SyncBlk                            SaveModule
DumpThreadConfig (dtc)             SaveAllModules (sam)
DumpMT                             GCHandles
DumpClass                          GCHandleLeaks
DumpMD                             VMMap
Token2EE                           VMStat
EEVersion                          ProcInfo 
DumpModule                         StopOnException (soe)
ThreadPool                         MinidumpMode 
DumpHttpRuntime                    FindDebugTrue
DumpIL                             FindDebugModules
PrintDateTime                      Analysis
DumpDataTables                     CLRUsage
DumpAssembly                       CheckCurrentException (cce)
RCWCleanupList                     CurrentExceptionName (cen)
PrintIPAddress                     VerifyObj
DumpHttpContext                    HeapStat
ASPXPages                          GCWhere
DumpASPNETCache (dac)              ListNearObj (lno)
DumpSig
DumpMethodSig                      Other
DumpRuntimeTypes                   -----------------------------
ConvertVTDateToDate (cvtdd)        FAQ
ConvertTicksToDate (ctd)
DumpRequestTable
DumpHistoryTable
DumpBuckets
GetWorkItems
DumpXmlDocument (dxd)
DumpCollection (dc)

Examining the GC history
-----------------------------
HistInit
HistStats
HistRoot
HistObj
HistObjFind
HistClear
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.kalmbach-software.de/2010/03/30/better-sosdll-for-debugging-in-windbg-available/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Feedback for VC++ for the version AFTER VS2010</title>
		<link>http://blog.kalmbach-software.de/2010/03/22/feedback-for-vc-for-the-version-after-vs2010/</link>
		<comments>http://blog.kalmbach-software.de/2010/03/22/feedback-for-vc-for-the-version-after-vs2010/#comments</comments>
		<pubDate>Mon, 22 Mar 2010 21:36:40 +0000</pubDate>
		<dc:creator>jkalmbach</dc:creator>
				<category><![CDATA[WinAPI]]></category>

		<guid isPermaLink="false">http://blog.kalmbach-software.de/2010/03/22/feedback-for-vc-for-the-version-after-vs2010/</guid>
		<description><![CDATA[If you want to give feedback for VC++ for the next version of VS (after VS2010), you can fill out the VC++ product team survey: http://blogs.msdn.com/vcblog/archive/2010/03/22/vc-developer-survey.aspx]]></description>
				<content:encoded><![CDATA[<p>If you want to give feedback for VC++ for the next version of VS (after VS2010), you can fill out the VC++ product team survey:<br />
<a href="http://blogs.msdn.com/vcblog/archive/2010/03/22/vc-developer-survey.aspx">http://blogs.msdn.com/vcblog/archive/2010/03/22/vc-developer-survey.aspx</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kalmbach-software.de/2010/03/22/feedback-for-vc-for-the-version-after-vs2010/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Major bug in the new dbghelp.dll</title>
		<link>http://blog.kalmbach-software.de/2010/03/02/major-bug-in-the-new-dbghelpdll/</link>
		<comments>http://blog.kalmbach-software.de/2010/03/02/major-bug-in-the-new-dbghelpdll/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 21:06:41 +0000</pubDate>
		<dc:creator>jkalmbach</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[WinAPI]]></category>

		<guid isPermaLink="false">http://blog.kalmbach-software.de/2010/03/02/major-bug-in-the-new-dbghelpdll/</guid>
		<description><![CDATA[The latest dbghelp.dll (version 6.12.2.633), which can be downloaded via the newest WDK, seems to have a major bug regarding the function SymGetModuleInfo64 (which is used in almost every project, if you want to display module-infos). A user reported this bug in the WinDbg newsgroup. I now build a small repro-code, which shows the problem. [...]]]></description>
				<content:encoded><![CDATA[<p>The latest dbghelp.dll (version 6.12.2.633), which <a href="http://blog.kalmbach-software.de/2010/02/27/debugging-tools-for-windows-is-now-part-of-the-wdk/">can be downloaded via the newest WDK</a>, seems to have a major bug regarding the function <a href="http://msdn.microsoft.com/en-us/library/ms681336">SymGetModuleInfo64</a> (which is used in almost every project, if you want to display module-infos).</p>
<p>A <a href="http://groups.google.de/group/microsoft.public.windbg/msg/996d73fb239624a0">user reported this bug in the WinDbg newsgroup</a>.</p>
<p>I now build a small repro-code, which shows the problem. You can download the code here: <a href="http://blog.kalmbachnet.de/files/dbghelp_bug_6.12.2.633.zip">dbghelp_bug_6.12.2.633.zip</a></p>
<p>The problem is, that the size of the struct &#8220;IMAGEHLP_MODULE64&#8243; has changed. They added two DWORDs at the end (the struct has now a size of 0&#215;690 bytes). This is normally not a problem because the struct has a &#8220;SizeOfStruct&#8221; member, which must be set, prior to calling the &#8220;SymGetModuleInfo64&#8243; function.</p>
<p>But the new version does not support the older version of the struct with a <a href="http://msdn.microsoft.com/en-us/library/ms680193(VS.85).aspx">size of 0&#215;688 bytes</a>, which is commonly used because this was the last version since 2003!!! It only supports the older versions from 2002 and before.</p>
<p>So I hope that this major bug will soon get fixed&#8230; but after the WinDbg-Release seems to be coupled to the WDK-release, we can wait until next year&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kalmbach-software.de/2010/03/02/major-bug-in-the-new-dbghelpdll/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Forums NntpBridge and DateTime</title>
		<link>http://blog.kalmbach-software.de/2010/03/02/forums-nntpbridge-an-datetime/</link>
		<comments>http://blog.kalmbach-software.de/2010/03/02/forums-nntpbridge-an-datetime/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 18:26:20 +0000</pubDate>
		<dc:creator>jkalmbach</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[WinAPI]]></category>

		<guid isPermaLink="false">http://blog.kalmbach-software.de/2010/03/02/forums-nntpbridge-an-datetime/</guid>
		<description><![CDATA[There is a &#8220;research&#8221; project to access the msdn-web forums via a nntp-bridge. The offical version is &#8220;V1&#8243;&#8230; but I must say, that it is still Beta1 For example, there is a bug with the DateTime-Format, which uses the current system locale&#8230; This bug was reported severaly months ago, and nothing happend&#8230; In january and [...]]]></description>
				<content:encoded><![CDATA[<p>There is a &#8220;research&#8221; project to access the msdn-web forums via a <a href="http://connect.microsoft.com/site/sitehome.aspx?SiteID=927">nntp-bridge</a>. The offical version is &#8220;V1&#8243;&#8230; but I must say, that it is still Beta1 <img src='http://blog.kalmbach-software.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>For example, there is a bug with the DateTime-Format, which uses the current system locale&#8230; This bug was reported severaly months ago, and nothing  happend&#8230; In january and february it was not a problem, because &#8220;Jan&#8221; and &#8220;Feb&#8221; are the same in english and german&#8230; but in &#8220;März&#8221; the NntpBridge started to report all postings with &#8220;01.01.1970 01:00&#8243;&#8230; because it will report the date as &#8220;Mrz&#8221; instead of &#8220;Mar&#8221;&#8230; which is somehow bad&#8230;</p>
<p>So I decided to make a quick fix for this behavior. You just need to add the <a href="http://msdn.microsoft.com/en-us/library/system.globalization.cultureinfo.invariantculture.aspx">System.Globalization.CultureInfo.InvariantCulture</a> as parameter to the <a href="http://msdn.microsoft.com/en-us/library/8tfzyc64.aspx">ToString</a> method.</p>
<p>Here are the steps, how you can fix this by yourself:</p>
<ol>
<li>Locale the directory of the Nntp-Bridge (normally &#8220;C:\Program Files (x86)\Microsoft Community Tools\Microsoft Forums NNTP Bridge&#8221;</li>
<li>Copy the file &#8220;nntp.dll&#8221; to &#8220;nntp_org.dll&#8221; so you have the original version saved
<li>Copy &#8220;nntp.dll&#8221; into a temporary directory like &#8220;c:\temp\nntp_fix&#8221;
<li>Open a &#8220;Visual Studio 2005/2008 Command Prompt (x86)&#8221;
<li>Go to the temporary directory (cd /D c:\temp\nntp_fix)
<li>Disassemble the nntp.dll
<pre>ildasm nntp.dll /out=nntp.il</pre>
<li>Now you need to change the content of the nntp.il file
<li>Find the method &#8220;GetMessageFormat&#8221; and change it from
<pre>.method public hidebysig static string  GetMessageFormat(valuetype [mscorlib]System.DateTime dateTime) cil managed
{
  // Code size       28 (0x1c)
  .maxstack  8
  IL_0000:  ldstr      "{0} {1}"
  IL_0005:  ldarga.s   dateTime
  IL_0007:  ldstr      "ddd, d MMM yyyy HH:mm:ss"
  IL_000c:  call       instance string [mscorlib]System.DateTime::ToString(string)
  IL_0011:  ldsfld     string Nntp.NntpTimeUtility::GmtTimeZoneOffset
  IL_0016:  call       string [mscorlib]System.String::Format(string,
                                                              object,
                                                              object)
  IL_001b:  ret
} // end of method NntpTimeUtility::GetMessageFormat
</pre>
<p>to</p>
<pre>.method public hidebysig static string  GetMessageFormat(valuetype [mscorlib]System.DateTime dateTime) cil managed
{
  // Code size       33 (0x21)
  .maxstack  8
  IL_0000:  ldstr      "{0} {1}"
  IL_0005:  ldarga.s   dateTime
  IL_0007:  ldstr      "ddd, d MMM yyyy HH:mm:ss"
  IL_000c:  call       class [mscorlib]System.Globalization.CultureInfo [mscorlib]System.Globalization.CultureInfo::get_InvariantCulture()
  IL_0011:  call       instance string [mscorlib]System.DateTime::ToString(string,
                                                                           class [mscorlib]System.IFormatProvider)
  IL_0016:  ldsfld     string Nntp.NntpTimeUtility::GmtTimeZoneOffset
  IL_001b:  call       string [mscorlib]System.String::Format(string,
                                                              object,
                                                              object)
  IL_0020:  ret
} // end of method NntpTimeUtility::GetMessageFormat
</pre>
<li>Then compile the nntp.dll again (and delete the original dll before compiling (del nntp.dll)):
<pre>ilasm /dll nntp.il /resource=nntp.res</pre>
<li>Now you can copy the patched nntp.dll into the original directory (be sure, the application is not running).
</ol>
<p>Now it looks better:<br />
<img src="http://blog.kalmbachnet.de/files/nntpbridge-hotfix01.png" alt="" /><br />
That&#8217;s all! Happy NntpBridging <img src='http://blog.kalmbach-software.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kalmbach-software.de/2010/03/02/forums-nntpbridge-an-datetime/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Debugging Tools for Windows is now part of the WDK</title>
		<link>http://blog.kalmbach-software.de/2010/02/27/debugging-tools-for-windows-is-now-part-of-the-wdk/</link>
		<comments>http://blog.kalmbach-software.de/2010/02/27/debugging-tools-for-windows-is-now-part-of-the-wdk/#comments</comments>
		<pubDate>Sat, 27 Feb 2010 08:17:48 +0000</pubDate>
		<dc:creator>jkalmbach</dc:creator>
				<category><![CDATA[WinAPI]]></category>

		<guid isPermaLink="false">http://blog.kalmbach-software.de/2010/02/27/debugging-tools-for-windows-is-now-part-of-the-wdk/</guid>
		<description><![CDATA[Yesterday a new release of &#8220;Debugging Tools For Windows&#8221; was released. Until now, it was possible to download the package as a single download of about 17 MB in size. Starting with the new release, it seems that the Debugging Tools For Windows is now integrated in the WDK which means to download a 620 [...]]]></description>
				<content:encoded><![CDATA[<p>Yesterday a new release of &#8220;<a href="http://www.microsoft.com/whdc/devtools/debugging/installx86.mspx">Debugging Tools For Windows</a>&#8221; was released. Until now, it was possible to download the package as a single download of about 17 MB in size.</p>
<p>Starting with the new release, it seems that the Debugging Tools For Windows is now integrated in the WDK which means to download a <a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&#038;FamilyID=36a2630f-5d56-43b5-b996-7633f2ec14ff">620 MB file</a>.</p>
<p>Also it seems so, that the WDK does not install the Debugging Tools For Windows, it just installs a link to the setup&#8230;<br />
So the question is: Why not provide the setup as a separate download as in previous version?</p>
<p>Here is a quote from the <a href="http://www.microsoft.com/whdc/devtools/debugging/installx86.mspx#a">Debugging Tools For Windows download page</a>:</p>
<blockquote><p>This current version of Debugging Tools for Windows is available as part of the Windows Driver Kit (WDK). To download the WDK and install Debugging Tools for Windows:<br />
1. Download and install the WDK.<br />
2. Find the debugging tools link for Windows x86 version on the screen that appears and click to install the debuggers to a location of your choice.<br />
3. After the installation is complete, you can find the debugger shortcuts by clicking Start, pointing to All Programs, and then pointing to Debugging Tools for Windows.</p></blockquote>
<p>Conclusion: We will never understand marketing&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kalmbach-software.de/2010/02/27/debugging-tools-for-windows-is-now-part-of-the-wdk/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The Shim Database</title>
		<link>http://blog.kalmbach-software.de/2010/02/22/the-shim-database/</link>
		<comments>http://blog.kalmbach-software.de/2010/02/22/the-shim-database/#comments</comments>
		<pubDate>Mon, 22 Feb 2010 09:58:19 +0000</pubDate>
		<dc:creator>jkalmbach</dc:creator>
				<category><![CDATA[WinAPI]]></category>

		<guid isPermaLink="false">http://blog.kalmbach-software.de/2010/02/22/the-shim-database/</guid>
		<description><![CDATA[The Shim database is a mystic area inside windows&#8230; For example it will display an UAC (admin) prompt if your application-name contains the word &#8220;*instal*&#8221;. You can display all available shims with the Application Compatibility Administrator by using the /x command line switch. Also there is a tool from Heath Steward which dumps the database [...]]]></description>
				<content:encoded><![CDATA[<p>The Shim database is a mystic area inside windows&#8230; For example it will display an UAC (admin) prompt if your application-name contains the word &#8220;*instal*&#8221;.<br />
You can display all available shims with the Application Compatibility Administrator by using the /x command line switch.<br />
Also there is a tool from <a href="http://blogs.msdn.com/heaths/pages/sdb2xml.aspx">Heath Steward</a> which dumps the database into an XML file.<br />
Of course, he failed to prvide the source-code of his sample project.<br />
Also, <a href="http://www.alex-ionescu.com/?p=40">Alex Ionescu</a> wrote a small dump tool, but also has never published it&#8230;</p>
<p>So I decided to dig into this almost not documented world and write a small Shim-Dumper and Exe-matching tool (whitch source code <img src='http://blog.kalmbach-software.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  ).</p>
<pre>
Shim Database Tool (sdb) v1.0
Copyright (C) 2010 Jochen Kalmbach

Usage:  sdb.exe [-noids] [-match] [PathToShimDatabse] [PathToFileName]
 -noids  Will prevent the output of the TagIds
 -match  Will match the provided file with the installed databases
         and displays the activated shims
         In this case 'PathToFileName' is required

NOTE: If no shim database path is provided,
      the default database will be used.
</pre>
<p>You can use it either for dumping the shimdatabase like:</p>
<pre>sdb.exe &gt;ShimDatabase.xml</pre>
<p>This will redirect the output to an xml-file and will look something like:</p>
<pre lang="xml">
  <EXE typ="LIST">
   <NAME typ="STRINGREF">setup32.exe</NAME>
   <APP_NAME typ="STRINGREF">WordPerfect Office 2000</APP_NAME>
   <VENDOR typ="STRINGREF">Corel</VENDOR>
   <EXE_ID typ="BINARY" len="0x10" guid="BC47CDF2-14B4-3040-B4E7B72C01DF2482" />
   <APP_ID typ="BINARY" len="0x10" guid="0FB56022-BF5C-7445-A5CCA93B5C443E6A" />
   <MATCH_MODE typ="WORD" />
   <MATCHING_FILE typ="LIST">
    <NAME typ="STRINGREF">*</NAME>
    <COMPANY_NAME typ="STRINGREF">Corel Corporation</COMPANY_NAME>
    <PRODUCT_NAME typ="STRINGREF">Corel Setup Wizard</PRODUCT_NAME>
   </MATCHING_FILE>
   <MATCHING_FILE typ="LIST">
    <NAME typ="STRINGREF">programs\wpwin9.exe</NAME>
    <COMPANY_NAME typ="STRINGREF">Corel Corporation Limited</COMPANY_NAME>
    <PRODUCT_NAME typ="STRINGREF">WordPerfect&#174; 9</PRODUCT_NAME>
   </MATCHING_FILE>
   <MATCHING_FILE typ="LIST">
    <NAME typ="STRINGREF">appman\tools\cset90.exe</NAME>
   </MATCHING_FILE>
   <SHIM_REF typ="LIST">
    <NAME typ="STRINGREF">WinXPSP1VersionLie</NAME>
    <SHIM_TAGID typ="DWORD">0x284e0</SHIM_TAGID>
    <INEXCLUDE typ="LIST">
     <INCLUDE typ="NULL" />
     <MODULE typ="STRINGREF">$</MODULE>
    </INEXCLUDE>
    <INEXCLUDE typ="LIST">
     <MODULE typ="STRINGREF">*</MODULE>
    </INEXCLUDE>
   </SHIM_REF>
  </EXE>
</pre>
<p>(be aware: the current Win7 database is about 17 MB!)</p>
<p>You also can use this tool to find out, if an application has a shim applied:</p>
<pre>C:>sdb -match MyInstaller.exe
Shim found for file: MyInstaller.exe
Flags: 0x0:
Exe-Shim: 0x35472, Flags: 0x0:
Layer-Flags: 0x0:
Shim-Database: 11111111-1111-1111-1111111111111111</pre>
<p>Currently it just displays the TagId of the Shim. You can use this to search the xml-file for the corresponding id.</p>
<p>Have fun, using this tool <img src='http://blog.kalmbach-software.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>The project (VS2008) can be found here:<br />
<a href="http://blog.kalmbachnet.de/files/sdb_v1.zip">http://blog.kalmbachnet.de/files/sdb_v1.zip</a><br />
It will compile for x86 and x64.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kalmbach-software.de/2010/02/22/the-shim-database/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The mystic variable &#8220;$I&#8221; during for each</title>
		<link>http://blog.kalmbach-software.de/2009/12/30/the-mystic-variable-i-during-for-each/</link>
		<comments>http://blog.kalmbach-software.de/2009/12/30/the-mystic-variable-i-during-for-each/#comments</comments>
		<pubDate>Wed, 30 Dec 2009 10:53:40 +0000</pubDate>
		<dc:creator>jkalmbach</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[WinAPI]]></category>

		<guid isPermaLink="false">http://blog.kalmbach-software.de/2009/12/30/the-mystic-variable-i-during-for-each/</guid>
		<description><![CDATA[A poster in the german C/C++ forum asked if there is an index available while using a for each loop. He accidently saw in the debug-window a variable called &#8220;$I&#8221;. And indeed: There is a &#8220;hidden&#8221; variable &#8220;$I&#8221; which can be used inside the for each loop. This variable is the number of the loop-iteration. [...]]]></description>
				<content:encoded><![CDATA[<p>A poster in the german <a href="http://www.c-plusplus.de/forum/">C/C++ forum</a> <a href="http://www.c-plusplus.de/forum/viewtopic-var-t-is-257480.html">asked</a> if there is an index available while using a <a href="http://msdn.microsoft.com/en-us/library/ms177202">for each</a> loop. He accidently saw in the debug-window a variable called &#8220;$I&#8221;.<br />
And indeed: There is a &#8220;hidden&#8221; variable &#8220;$I&#8221; which can be used inside the <a href="http://msdn.microsoft.com/en-us/library/ms177202">for each</a> loop. This variable is the number of the loop-iteration.</p>
<p>Here is a simple example:</p>
<pre lang="CPP">int main()
{
  array<int> ^MyArray = { 100, 200, 300, 400 };
  for each( int v in MyArray )
  {
    System::Console::WriteLine(v.ToString() + " " + $I);
  }
  return 0;
}</pre>
<p>As you can see, it uses a variable &#8220;$I&#8221; which was never decalred!<br />
And it will output the following:</p>
<pre>100 0
200 1
300 2
400 3</pre>
<p>If you debug a normal <a href="http://msdn.microsoft.com/en-us/library/ms177202">for each</a> loop and take a look in the &#8220;local-watch-window&#8221;, you will see the following variables, while you are inside the <a href="http://msdn.microsoft.com/en-us/library/ms177202">for each</a> loop:<br />
<img src="http://blog.kalmbachnet.de/files/variable_I1.png" /></p>
<p>You can see two &#8220;hidden&#8221; variables &#8220;$I&#8221; and &#8220;$S1&#8243;. And if you step through the loop, you will see that the &#8220;$I&#8221; variable is incremented for each iteration. &#8220;$S1&#8243; is a reference to the array.</p>
<p>If you dig further into this issue, you will find out, that <a href="http://msdn.microsoft.com/en-us/library/ms177202">for each</a> and the normal &#8220;for&#8221; loop will result in the <strong>identical</strong> IL code! This is also true for C#!<br />
See also:<br />
<a href="http://www.codeproject.com/KB/cs/foreach.aspx">FOREACH Vs. FOR (C#)</a><br />
<a href="http://blogs.msdn.com/kevin_ransom/archive/2004/04/19/116072.aspx">To foreach or not to foreach that is the question.</a></p>
<p>As we can see, the &#8220;$I&#8221; variable is just a side-effect of the <a href="http://msdn.microsoft.com/en-us/library/ms177202">for each</a> loop. It is a compiler generated variable which is used to transform the &#8220;for each&#8221; into a normal for-loop!</p>
<p>Of course, this is only true in special cases like <a href="http://msdn.microsoft.com/en-us/library/ts4c4dw6.aspx">arrays</a>.<br />
If you have a list which only implements the &#8220;IEnumerable&#8221; interface and is not an array (like &#8220;System::Collections::Generic::List&#8221;), then the mistic variable &#8220;$I&#8221; is gone, because now the compiler uses the &#8220;IEnumerable&#8221; interface to gbuild a &#8220;real&#8221; &#8220;for each&#8221; loop:<br />
<img src="http://blog.kalmbachnet.de/files/variable_I2.png" /></p>
<p>In this case &#8220;$I&#8221; is gone but &#8220;$S1&#8243; is still there. And &#8220;S1&#8243; is the enumerator of the list (in this case </p>
<pre lang="CPP">System::Collections::Generic::List::Enumerator<int></pre>
<p>).</p>
<p>The conclusion is:<br />
Do not rely on the compiler generated variable &#8220;$I&#8221;, and do not use &#8220;for each&#8221; if you need a index-variable, just use a normal for loop.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kalmbach-software.de/2009/12/30/the-mystic-variable-i-during-for-each/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrade to VC20xx: Problems with Exception Handling</title>
		<link>http://blog.kalmbach-software.de/2009/11/13/upgrade-to-vc20xx-problems-with-exception-handling/</link>
		<comments>http://blog.kalmbach-software.de/2009/11/13/upgrade-to-vc20xx-problems-with-exception-handling/#comments</comments>
		<pubDate>Fri, 13 Nov 2009 12:03:56 +0000</pubDate>
		<dc:creator>jkalmbach</dc:creator>
				<category><![CDATA[WinAPI]]></category>

		<guid isPermaLink="false">http://blog.kalmbach-software.de/2009/11/13/upgrade-to-vc20xx-problems-with-exception-handling/</guid>
		<description><![CDATA[If you upgrade from VC6 to VC2008, then your project will automatically converted to the new format. As a side-effect, it will also default to the new exception handling which breaks compatibilty to VC6. Therefor this post In VC6, by default the &#8220;/EHa&#8221; exception model ist activ. In VC200x and later, by default, the &#8220;/EHsc&#8221; [...]]]></description>
				<content:encoded><![CDATA[<p>If you upgrade from VC6 to VC2008, then your project will automatically converted to the new format.<br />
As a side-effect, it will also default to the new exception handling which breaks compatibilty to VC6.</p>
<p>Therefor this post <img src='http://blog.kalmbach-software.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>In VC6, by default the &#8220;<a href="http://msdn.microsoft.com/en-us/library/1deeycx5">/EHa</a>&#8221; exception model ist activ.<br />
In VC200x and later, by default, the &#8220;<a href="http://msdn.microsoft.com/en-us/library/1deeycx5">/EHsc</a>&#8221; exception model is active. This means that if you did not explicit specify the &#8220;<a href="http://msdn.microsoft.com/en-us/library/1deeycx5">/EHa</a>&#8221; model, you will now automatically use the &#8220;<a href="http://msdn.microsoft.com/en-us/library/1deeycx5">/EHsc</a>&#8221; model, which only catches C++ exceptions!</p>
<p>For example, the following code will work as expected and will crash in VS2008:</p>
<pre lang="CPP">
#include <stdio.h>
#include <tchar.h>

int _tmain()
{
  try
  {
    printf("Now doing an AV...\n");
    char *c = NULL;
    strcpy(c, "Hello");
    printf(c);
  }
  catch(...)
  {
    printf("Catched....");
  }
}
</pre>
<p>So be aware, that if you rely on asynchonus exceptions, you need to switch the expetion model in the C/C++ project settings under &#8220;<strong>Code generation | Enabled C++ Exceptions: Yes with SEH Exceptions (/EHa)</strong>&#8220;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kalmbach-software.de/2009/11/13/upgrade-to-vc20xx-problems-with-exception-handling/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>StackWalker moved to CodePlex</title>
		<link>http://blog.kalmbach-software.de/2009/11/01/stackwalker-moved-to-codeplex/</link>
		<comments>http://blog.kalmbach-software.de/2009/11/01/stackwalker-moved-to-codeplex/#comments</comments>
		<pubDate>Sun, 01 Nov 2009 22:37:23 +0000</pubDate>
		<dc:creator>jkalmbach</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[WinAPI]]></category>

		<guid isPermaLink="false">http://blog.kalmbach-software.de/2009/11/01/stackwalker-moved-to-codeplex/</guid>
		<description><![CDATA[If you have ever published an article on CodeProject, you will see that maintanance an ariticle is practicale impossible. In the last several years, I improved the source-code of my &#8220;StackWalker&#8221; article outside of codeproject, but this also leads to confusion&#8230; So today I moved at least the source code to codeplex: http://stackwalker.codeplex.com/]]></description>
				<content:encoded><![CDATA[<p>If you have ever published an article on CodeProject, you will see that maintanance an ariticle is practicale impossible. In the last several years, I improved the source-code of my <a href="http://www.codeproject.com/KB/threads/StackWalker.aspx">&#8220;StackWalker&#8221; article</a> outside of codeproject, but this also leads to confusion&#8230;</p>
<p>So today I moved at least the source code to codeplex:<br />
<a href="http://stackwalker.codeplex.com/">http://stackwalker.codeplex.com/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kalmbach-software.de/2009/11/01/stackwalker-moved-to-codeplex/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>$log$ substitution check-in policy published</title>
		<link>http://blog.kalmbach-software.de/2009/08/08/log-substitution-check-in-policy-published/</link>
		<comments>http://blog.kalmbach-software.de/2009/08/08/log-substitution-check-in-policy-published/#comments</comments>
		<pubDate>Sat, 08 Aug 2009 12:47:50 +0000</pubDate>
		<dc:creator>jkalmbach</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[WinAPI]]></category>

		<guid isPermaLink="false">http://blog.kalmbach-software.de/2009/08/08/log-substitution-check-in-policy-published/</guid>
		<description><![CDATA[Today I published my first release of the LogSubstPol on CodePlex. It automatically embeddeds the comment from the check-in dialog into your source code. Please feel free to post some comments in the discussion section. See also my last post: TFS: Automatically insert Check-In comments into source-code]]></description>
				<content:encoded><![CDATA[<p>Today I published my first release of the <a href="http://logsubstpol.codeplex.com/">LogSubstPol</a> on <a href="http://logsubstpol.codeplex.com/">CodePlex</a>.</p>
<p>It automatically embeddeds the comment from the check-in dialog into your source code.</p>
<p>Please feel free to post some comments in the <a href="http://logsubstpol.codeplex.com/Thread/List.aspx">discussion</a> section.</p>
<p>See also my last post:<br />
<a href="http://blog.kalmbach-software.de/2009/07/24/tfs-automatically-insert-check-in-comments-into-source-code/">TFS: Automatically insert Check-In comments into source-code</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kalmbach-software.de/2009/08/08/log-substitution-check-in-policy-published/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>TFS: Automatically insert Check-In comments into source-code</title>
		<link>http://blog.kalmbach-software.de/2009/07/24/tfs-automatically-insert-check-in-comments-into-source-code/</link>
		<comments>http://blog.kalmbach-software.de/2009/07/24/tfs-automatically-insert-check-in-comments-into-source-code/#comments</comments>
		<pubDate>Fri, 24 Jul 2009 11:13:23 +0000</pubDate>
		<dc:creator>jkalmbach</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[WinAPI]]></category>

		<guid isPermaLink="false">http://blog.kalmbach-software.de/2009/07/24/tfs-automatically-insert-check-in-comments-into-source-code/</guid>
		<description><![CDATA[TFS is in most cases very wonderfull. But if you have projects, which will also be used &#8220;outside&#8221; of the TFS environment (for example in an other subsidary without TFS access), then it has one disadvantage: The comments for every check-in is only stored in the TFS version history. While this is enough, if you [...]]]></description>
				<content:encoded><![CDATA[<p>TFS is in most cases very wonderfull. But if you have projects, which will also be used &#8220;outside&#8221; of the TFS environment (for example in an other subsidary without TFS access), then it has one disadvantage:<br />
The comments for every check-in is only stored in the TFS version history.</p>
<p>While this is enough, if you always have access to the TFS. But if you work without TFS, then it would be helpfull if these comments are also included in the source-file (like in the old days, when we were using cvs (a feature called <a href="http://www.ie.gnu.org/software/cvs/manual/html_chapter/cvs_17.html">keyword-substitution</a>)</p>
<p>I searched the web for any plugin for TFS which has almost the same features&#8230; but could not find any plugin&#8230;.</p>
<p>So I wrote my own plugin, which at least puts the check-in comments into the source-file.<br />
You just need to install this plugin and activate it in the &#8220;Check-In policy&#8221;.</p>
<p>Then your source-file will contai the comment, after you checked it in:</p>
<pre lang="text">
/*
 * $log$
 * 
 * Comment: And another test
 *          with a multiline
 *          comment...
 * User: xyz
 * DateTime: 2009-07-23 22:05:24
 * Change: edit
 * 
 * Comment: This is an test
 * User: xyz
 * DateTime: 2009-07-23 21:01:22
 * Change: add, edit
 *
 */
</pre>
<p>I can also customize (like templates) the position and contents of the comments&#8230;</p>
<p>If you are interested in this plugin-in, please let me know&#8230;</p>
<p>Just a small addition: Here is a post about &#8220;keyword expansion&#8221; and TFS; and possible side-effects:<br />
<a href="http://blogs.msdn.com/buckh/archive/2007/07/07/keyword-expansion-in-tfs.aspx">http://blogs.msdn.com/buckh/archive/2007/07/07/keyword-expansion-in-tfs.aspx</a></p>
<p><strong>EDIT: 2009-08-08:</strong><br />
Today I published my first release of the <a href="http://logsubstpol.codeplex.com/">LogSubstPol</a> on <a href="http://logsubstpol.codeplex.com/">CodePlex</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kalmbach-software.de/2009/07/24/tfs-automatically-insert-check-in-comments-into-source-code/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Custom installer without warning dialog&#8230; (TrustedInstaller.exe)</title>
		<link>http://blog.kalmbach-software.de/2009/06/09/custom-installer-without-warning-dialog-trustedinstallerexe/</link>
		<comments>http://blog.kalmbach-software.de/2009/06/09/custom-installer-without-warning-dialog-trustedinstallerexe/#comments</comments>
		<pubDate>Tue, 09 Jun 2009 19:55:36 +0000</pubDate>
		<dc:creator>jkalmbach</dc:creator>
				<category><![CDATA[WinAPI]]></category>

		<guid isPermaLink="false">http://blog.kalmbach-software.de/2009/06/09/custom-installer-without-warning-dialog-trustedinstallerexe/</guid>
		<description><![CDATA[If you start an custom install program which is not digital signed, then Vista and later (at least Win7RC1) warns you, that your installer is not digital signed and &#8220;do you really wnt to do that&#8221;&#8230; This feature is implemented with an shim (in a separate article I will explain shims later). In short it [...]]]></description>
				<content:encoded><![CDATA[<p>If you start an custom install program which is not digital signed, then Vista and later (at least Win7RC1) warns you, that your installer is not digital signed and &#8220;do you really wnt to do that&#8221;&#8230;</p>
<p>This feature is implemented with an shim (in a separate article I will explain shims later).<br />
In short it works like: if an application is started, it checks the shim-database (in general %SYSTEMROOT%\AppPath\sysmain.sdb) if this application matches specific conditions.</p>
<p>For &#8220;Installer detection&#8221;, there are several conditons. Here is a list, what is checked (Vista and Win7RC1):</p>
<ul>
<li>Productname contains &#8220;*instal*&#8221; or &#8220;*setup*&#8221; or &#8220;*update*&#8221;</li>
<li>Companyname contains &#8220;*instal*&#8221; or &#8220;*setup*&#8221; or &#8220;*update*&#8221;</li>
<li>Internalname contains &#8220;*instal*&#8221; and app is <i>not</i> named &#8220;TrustedInstaller.exe&#8221;</li>
<li>Originalfilename contains &#8220;*instal*&#8221; and app is <i>not</i> named &#8220;TrustedInstaller.exe&#8221;</li>
<li>Filedescription contains &#8220;*instal*&#8221; and app is <i>not</i> named &#8220;TrustedInstaller.exe&#8221;</li>
<li>Filename contains &#8220;*instal*&#8221; and is <i>not</i> named &#8220;TrustedInstaller.exe&#8221;</li>
<li>Exportname contains &#8220;setup.exe&#8221; or &#8220;install.exe&#8221; or &#8220;stub32&#8243; or &#8220;stub32.exe&#8221; or &#8220;signstub.exe&#8221;</li>
<li>Filename contains &#8220;*patch*&#8221; or &#8220;*setup*&#8221; or &#8220;*uninst*&#8221; or &#8220;*update*&#8221; or &#8220;lhaca*.exe&#8221;</li>
<li>Filedescription contains &#8220;*instal*&#8221; or &#8220;*setup*&#8221; or &#8220;*update*&#8221; or &#8220;*uninst*&#8221;</li>
<li>Originalfilename contains &#8220;*setup*&#8221; or &#8220;*update*&#8221;</li>
<li>Originalfilename contains &#8220;*setup*&#8221; or &#8220;*update*&#8221;</li>
</ul>
<p>What is the conclusion: If you want to prevent the message box, just name your installer &#8220;TrustedInstaller.exe&#8221; <img src='http://blog.kalmbach-software.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>You can simple test this by renaming any EXE to &#8220;abc<strong>instal</strong>def.exe&#8221; and try to execute it <img src='http://blog.kalmbach-software.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  and the rename it to &#8220;TrustedInstaller.exe&#8221; <img src='http://blog.kalmbach-software.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>On the other hand: <strong>Never name your app anything of the above!</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kalmbach-software.de/2009/06/09/custom-installer-without-warning-dialog-trustedinstallerexe/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
