<?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>Marius Bancila's Blog &#187; Windows</title>
	<atom:link href="http://mariusbancila.ro/blog/category/it/windows/feed/" rel="self" type="application/rss+xml" />
	<link>http://mariusbancila.ro/blog</link>
	<description>Sharing my opinions and ideas!</description>
	<lastBuildDate>Fri, 06 Apr 2012 13:45:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Letter from a concerned developer</title>
		<link>http://mariusbancila.ro/blog/2012/02/26/letter-from-a-concerned-developer/</link>
		<comments>http://mariusbancila.ro/blog/2012/02/26/letter-from-a-concerned-developer/#comments</comments>
		<pubDate>Sun, 26 Feb 2012 18:03:47 +0000</pubDate>
		<dc:creator>Marius Bancila</dc:creator>
				<category><![CDATA[CTPs & Betas]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[beta]]></category>
		<category><![CDATA[Chrome]]></category>
		<category><![CDATA[UI]]></category>
		<category><![CDATA[VisualStudio]]></category>
		<category><![CDATA[VS11]]></category>

		<guid isPermaLink="false">http://mariusbancila.ro/blog/?p=1194</guid>
		<description><![CDATA[Dear Microsoft, I have recently read the two blog posts about the new &#8220;developer experience&#8221; with Visual Studio 11 (part 1 and part 2). I don&#8217;t have the IDE yet (since the beta will be made available on February 29), but from the blog posts I see that you once again changed the look and [...]]]></description>
			<content:encoded><![CDATA[<p>Dear Microsoft,</p>
<p>I have recently read the two blog posts about the new &#8220;developer experience&#8221; with Visual Studio 11 (<a href="http://blogs.msdn.com/b/visualstudio/archive/2012/02/23/introducing-the-new-developer-experience.aspx" target="_blank">part 1</a> and <a href="http://blogs.msdn.com/b/visualstudio/archive/2012/02/24/introducing-the-new-developer-experience-part2.aspx" target="_blank">part 2</a>). I don&#8217;t have the IDE yet (since the beta will be made available on February 29), but from the blog posts I see that you once again changed the look and feel. Why do you have to do this all the time? Can&#8217;t you sell a new version without redesigning the UI? We don&#8217;t get used well with a version and you change the game again. And like it wasn&#8217;t bad enough to do such a big changed, you decided to go with a chrome theme. This is what I call &#8220;Windows disabled&#8221;; you can&#8217;t get a good feeling of what is enabled and what is not. Everything is in tones of gray and confusing.</p>
<p><a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-29-92-metablogapi/2248.dev11lightcolourtheme_5F00_0BC702C8.png"><img title="Visual Studio 11 with Chrome theme" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-29-92-metablogapi/2248.dev11lightcolourtheme_5F00_0BC702C8.png" alt="" height="400" /></a></p>
<p>Why do you have to invest all that time in redesigning the UI with each release? Why don&#8217;t you focus on making the current UI more responsible (for instance VS2010 takes 1 minute on my machines to start) and less buggy? Why don&#8217;t you invest that time in building features that make our lives easier? Like providing multiple windows for search results (not just two) or supporting auto completion (like it was in all versions until VS2010) in the folder selection fields in the New Project dialog?</p>
<p>So dear Microsoft, please</p>
<ol>
<li>make it possible for us to change the Chrome theme to the old colored theme</li>
<li>don&#8217;t change the UI with each version</li>
</ol>
<p style="text-align: right;">Sincerely,<br />
A concerned developer</p>
<p>PS: I still can&#8217;t get out of my mind the horror or scrolling with the mouse on Windows 8 maybe 5 screens of colorful tiles to get to the app that I want to launch. Awful! As it stands I see big failures on the horizon.</p>
]]></content:encoded>
			<wfw:commentRss>http://mariusbancila.ro/blog/2012/02/26/letter-from-a-concerned-developer/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WinRT and winmd Files</title>
		<link>http://mariusbancila.ro/blog/2011/10/30/winrt-and-winmd-files/</link>
		<comments>http://mariusbancila.ro/blog/2011/10/30/winrt-and-winmd-files/#comments</comments>
		<pubDate>Sun, 30 Oct 2011 19:15:40 +0000</pubDate>
		<dc:creator>Marius Bancila</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[CTPs & Betas]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[WinRT]]></category>
		<category><![CDATA[C++/CX]]></category>
		<category><![CDATA[ildasm]]></category>
		<category><![CDATA[managed]]></category>
		<category><![CDATA[native]]></category>
		<category><![CDATA[win8]]></category>
		<category><![CDATA[winmd]]></category>
		<category><![CDATA[winrt]]></category>

		<guid isPermaLink="false">http://mariusbancila.ro/blog/?p=1162</guid>
		<description><![CDATA[If you tried the Win8 Developer Preview and built WinRT components (native or managed) you noticed the .winmd files. The name stands for Windows Meta Data and the format of these files is the same used by the .NET framework for the CLI, i.e. ECMA-335. That means you can actually read these files with a [...]]]></description>
			<content:encoded><![CDATA[<p>If you tried the Win8 Developer Preview and built WinRT components (native or managed) you noticed the <strong>.winmd</strong> files. The name stands for Windows Meta Data and the format of these files is the same used by the .NET framework for the CLI, i.e. <a href="http://www.ecma-international.org/publications/standards/Ecma-335.htm">ECMA-335</a>. That means you can actually read these files with a tool such as ILDASM or Reflector, or of course, through .NET Reflection.</p>
<p>If you look in C:\Windows\System32\WinMetadata folder you&#8217;ll find the WinMD files for the Windows Runtime. You can browse the content of these files with one of the aforementioned disassemblers.<br />
<img alt="" src="/blog/wp-content/uploads/2011/10/winmetadatafolder.png" title="WinMetadata folder" class="alignnone" width="856" height="601" /></p>
<p>Here are two dummy WinRT components, one developed in C++/CX and one in C#.</p>
<table>
<tr>
<td>Native WinRT component in C++/CX</td>
<td>Managed WinRT component in C#</td>
</tr>
<tr valign="top">
<td>
<pre class="cpp" name="code">
namespace WinRTNativeComponent
{
    public ref class MyWinRTComponent sealed
    {
        int _id;
		String^ _name;

    public:
		MyWinRTComponent () {}
		~MyWinRTComponent () {}

        property int Id
        {
            int get() { return _id; }
            void set(int value) { _id = value; }
        }

		property String^ Name
		{
			String^ get() {return _name;}
			void set(String^ value) { _name= value; }
		}

        bool Update(int id, String^ name)
		{
			{
				if(_id == id)
				{
					_name = name;
					return true;
				}

				return false;
			}
		}
    };
}
</pre>
</td>
<td>
<pre class="csharp" name="code">
namespace WinRTManagedComponent
{
    public sealed class MyWinRTComponent
    {
        public int Id { get; set; }
        public string Name { get; set; }

        bool Update(int id, string name)
        {
            if (Id == id)
            {
                Name = name;
                return true;
            }

            return false;
        }
    }
}
</pre>
</td>
</tr>
</table>
<p>In the case of the native component, the output includes a DLL and a WINMD file (and of course a PDB file). In the case of the managed component, the output is either a DLL only or a WINMD only (plus the associated PDB file), depending on the Output type as defined in the project properties. If the type is <strong>Class Library</strong> the output is a DLL; this is enough if your component is supposed to be consumed from a managed language. However, if the component should be consumed from C++/CX or Javascript, then the project type must be set to <strong>WinMD File</strong>. In this case the DLL is replaced by a WinMD file, that contains, at least in the current version, both the matadata (as implied by the name) and the implementation.</p>
<table>
<tr>
<td>Native WinRT component in C++/CX</td>
<td>Managed WinRT component in C#</td>
</tr>
<tr valign="top">
<td><img alt="" src="/blog/wp-content/uploads/2011/10/winmdnative.png" title="WinMD for native component" class="alignnone" width="419" height="600" /></td>
<td><img alt="" src="/blog/wp-content/uploads/2011/10/winmdmanaged.png" title="WinMD for managed component" class="alignnone" width="419" height="600" /></td>
</tr>
</table>
<p>It should be possible to use reflection with winmd files. However, the reflection capabilities of .NET 4.5 in this developer preview seem to be very limited. The only available Load method in the Assembly class is</p>
<pre class="csharp" name="code">
public static Assembly Load(AssemblyName assemblyRef);
</pre>
<p>Trying to load the winmd file fails with a FailLoadException with the message &#8220;Could not load file or assembly &#8216;Winmdreflection, ContentType=WindowsRuntime&#8217; or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0&#215;80131515)&#8221;.</p>
<pre class="csharp" name="code">
try
{
    var assembly = Assembly.Load(
        new AssemblyName()
        {
            Name = "WinRTManagedComponent",
            ContentType = AssemblyContentType.WindowsRuntime
        });
}
catch (Exception ex)
{
}
</pre>
<p>It is possible though to read information for the types described in an winmd file in native code using the  <a href="http://msdn.microsoft.com/en-us/library/ms230172.aspx">IMetaDataImport</a>/<a href="http://msdn.microsoft.com/en-us/library/ms232953.aspx">IMetaDataImport2</a> COM interfaces. You can find an example <a href="http://social.msdn.microsoft.com/Forums/en-AU/winappswithnativecode/thread/211ef583-db11-4e55-926b-6d9ab53dbdb4">here</a>. But this has the drawback that you have to instantiate an object first and then query for its type information.</p>
<p>To use a Windows Runtime component in a Metro application (managed or native) you have to add a reference to it. That is pretty straight forward. In the following example I&#8217;m adding a reference in a C++ Metro application to the two WinRT components, one native and one managed, shown earlier. To do this, you can go to the project&#8217;s property page and open the Common Properties > Frameworks and References page, or use the References command from the project&#8217;s context menu which opens that page directly. You can add a reference to a project from the same solution, to a Windows component or you can browse for the winmd file.<br />
<img alt="" src="/blog/wp-content/uploads/2011/10/winmdreference.png" title="Adding a references to an winmd file" class="alignnone" width="800" height="556" /></p>
<p>Having done that you can instantiate the WinRT components.</p>
<pre class="cpp" name="code">
auto obj1 = ref new WinRTManagedComponent::MyWinRTComponent();
obj1->Id = 1;
obj1->Name = L"marius";

auto obj2 = ref new WinRTNativeComponent::MyWinRTComponent();
obj2->Id = 1;
obj2->Name = L"marius";
</pre>
]]></content:encoded>
			<wfw:commentRss>http://mariusbancila.ro/blog/2011/10/30/winrt-and-winmd-files/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Windows Runtime</title>
		<link>http://mariusbancila.ro/blog/2011/09/15/windows-runtime/</link>
		<comments>http://mariusbancila.ro/blog/2011/09/15/windows-runtime/#comments</comments>
		<pubDate>Thu, 15 Sep 2011 20:54:16 +0000</pubDate>
		<dc:creator>Marius Bancila</dc:creator>
				<category><![CDATA[64bit]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[COM]]></category>
		<category><![CDATA[CTPs & Betas]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Windows Programming]]></category>
		<category><![CDATA[WinRT]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[metro]]></category>
		<category><![CDATA[MSDN]]></category>
		<category><![CDATA[runtime]]></category>
		<category><![CDATA[win32]]></category>
		<category><![CDATA[winrt]]></category>

		<guid isPermaLink="false">http://mariusbancila.ro/blog/?p=1116</guid>
		<description><![CDATA[Windows Runtime, or shortly WinRT, is a new runtime (siting on top of the Windows kernel) that allows developers to write Metro style applications for Windows 8, using a variety of languages including C/C++, C#, VB.NET or JavaScript/HTML5. Microsoft has started rolling out information about Windows 8 and the new runtime at BUILD. WinRT is [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://msdn.microsoft.com/en-us/library/windows/apps/br211377%28v=VS.85%29.aspx">Windows Runtime</a>, or shortly WinRT, is a new runtime (siting on top of the Windows kernel) that allows developers to write Metro style applications for Windows 8, using a variety of languages including C/C++, C#, VB.NET or JavaScript/HTML5. Microsoft has started rolling out information about Windows 8 and the new runtime at <a href="http://www.buildwindows.com/">BUILD</a>.</p>
<div class="wp-caption alignnone" style="width: 643px"><img alt="" src="http://i.zdnet.com/blogs/archslide.png" title="Windows 8" width="633" height="427" /><p class="wp-caption-text">(source www.zdnet.com)</p></div>
<p>WinRT is a native layer (written in C++ and being COM-based) that is intended as a replacement, or alternative, to Win32, and enables development of &#8220;immersive&#8221; applications, using the Metro style. Its API is object oriented and can be consumed both from native or managed languages, as well as JavaScript. At the same time the old Win32 applications will continue to run just as before and you can still (and most certainly will) develop Win32 applications.</p>
<p>Microsoft has created a new language called C++ Component Extension, or simply C++/CX. While the syntax is very similar to C++/CLI, the language is not managed, it&#8217;s still native. WinRT components built in C++/CX do not compile to managed code, but to 100% native code. A good news for C++ developers is that they can use XAML now to build the UI for immersive applications. However, this is not available for classical, Win32 applications.</p>
<p>You can get a glimpse of the new system and the tools by downloading and installing the <a href="http://msdn.microsoft.com/en-us/windows/apps/br229516">Windows Developer Preview with tools</a>, that includes the following:</p>
<ul>
<li>64-bit Windows Developer Preview</li>
<li>Windows SDK for Metro style apps</li>
<li>Microsoft Visual Studio 11 Express for Windows Developer Preview</li>
<li>Microsoft Expression Blend 5 Developer Preview</li>
<li>28 Metro style apps including the BUILD Conference app</li>
</ul>
<p>Notice this is a pre-beta release and you might encounter various problems.</p>
<p>Before you start here are several additional articles that you might want to read:</p>
<ul>
<li><a href="http://www.infoq.com/news/2011/09/WinRT-API">WinRT: An Object Orientated Replacement for Win32</a></li>
<li><a href="http://www.infoq.com/news/2011/09/C-Component-Extensions">C++ Component Extensions: The New Face of COM</a></li>
<li><a href="http://www.infoq.com/news/2011/09/DotNet-On-WinRT">C# and Visual Basic on the WinRT API</a></li>
<li><a href="http://msdn.microsoft.com/en-us/library/windows/apps/hh441569%28v=VS.85%29.aspx">Creating Windows Runtime Components in C++</a></li>
<li><a href="http://msdn.microsoft.com/en-us/library/windows/apps/hh441589%28v=VS.85%29.aspx">Tutorial: Creating and using extension SDKs</a></li>
<li><a href="http://channel9.msdn.com/Events/BUILD/BUILD2011/TOOL-532T">Using the Windows Runtime from C++</a></li>
</ul>
<p>There are also several <a href="http://social.msdn.microsoft.com/Forums/en-US/category/windowsapps">new forums</a> available on MSDN forums for developing Metro style applications, which you can use for addressing technical questions. Hopefully thee will be answers from Microsoft people working in this area.</p>
]]></content:encoded>
			<wfw:commentRss>http://mariusbancila.ro/blog/2011/09/15/windows-runtime/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>32-bit and 64-bit COM Servers</title>
		<link>http://mariusbancila.ro/blog/2010/11/04/32-bit-and-64-bit-com-servers/</link>
		<comments>http://mariusbancila.ro/blog/2010/11/04/32-bit-and-64-bit-com-servers/#comments</comments>
		<pubDate>Thu, 04 Nov 2010 13:59:23 +0000</pubDate>
		<dc:creator>Marius Bancila</dc:creator>
				<category><![CDATA[64bit]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[COM]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[registry]]></category>
		<category><![CDATA[x64]]></category>

		<guid isPermaLink="false">http://mariusbancila.ro/blog/?p=775</guid>
		<description><![CDATA[It is possible to register both 32-bit and 64-bit versions of the same COM server on 64-bit machine. This leads to several questions such as how are they registered and which one of the two is used. I will try to answer them below. But first, let&#8217;s start with an example. Example Let&#8217;s say we [...]]]></description>
			<content:encoded><![CDATA[<p>It is possible to register both 32-bit and 64-bit versions of the same COM server on 64-bit machine. This leads to several questions such as how are they registered and which one of the two is used. I will try to answer them below. But first, let&#8217;s start with an example.</p>
<p><strong>Example</strong><br />
Let&#8217;s say we have the a simple COM local server called COM3264Server.exe. There is just one interface called ICoCOM3264Server. Here is the IDL file:</p>
<pre name="code" class="cpp">
[
	object,
	uuid(733C70A7-F7EC-4C15-85D2-5CDB14F4110B),
	dual,
	nonextensible,
	pointer_default(unique)
]
interface ICoCOM3264Server : IDispatch{
   [id(1), helpstring("Says hello")] HRESULT SayHello(void);
};
[
	uuid(2F25FC66-2380-42FD-8476-8B5917FB1BF1),
	version(1.0),
]
library COM3264ServerLib
{
	importlib("stdole2.tlb");
	[
		uuid(9268A299-E817-4C5D-8627-C2582B66F16D)
	]
	coclass CoCOM3264Server
	{
		[default] interface ICoCOM3264Server;
	};
};
</pre>
<p>The implementation of the method SayHello() is straight forward; it just displays a message box with a text that varies between the two architectures, x64 and x86.</p>
<pre name="code" class="cpp">
STDMETHODIMP CCoCOM3264Server::SayHello(void)
{
#ifdef _WIN64
   ::MessageBox(NULL, _T("Hello from 64-bit COM server!"), _T("COM3264Server"), MB_OK);
#else
   ::MessageBox(NULL, _T("Hello from 32-bit COM server!"), _T("COM3264Server"), MB_OK);
#endif

   return S_OK;
}
</pre>
<p><strong>Registry</strong><br />
When you register the COM server, the 32-bit and 64-bit versions are registered in different parts of the registry. On 64-bit machine, the registry has two views (or modes):</p>
<ul>
<li>a native view, for 64-bit application; (e.g. registry path for CLSIDs is HKEY_CLASSES_ROOT\CLSID\)</li>
<li>a WOW64 view, which enables redirections for 32-bit applications, a process transparent to the user (e.g. registry path for CLSIDs is HKEY_CLASSES_ROOT\Wow6432Node\CLSID\)</li>
</ul>
<p>Here is the Registry registration of the (native) 64-bit COM server (notice the registry key in the status bar of the editor, and the path to the server executable).<br />
<img alt="" src="/blog/wp-content/uploads/2010/11/com3264server_reg64.png" title="Native registry view" class="alignnone" width="891" height="319" /></p>
<p>On, the other hand, the 32-bit COM server is registered under the Wow6432 node.<br />
<img alt="" src="/blog/wp-content/uploads/2010/11/com3264server_reg32.png" title="Wow64 registry view" class="alignnone" width="891" height="319" /></p>
<p>So if both versions are registered in Windows Registry, which one is picked? Well, both the server and the client can specify which architecture to use:</p>
<ul>
<li>the COM server can do this via the <strong>PreferredServerBitness</strong> Registry value</li>
<li>the client can do this using one of the flags <strong>CLSCTX_ACTIVATE_32_BIT_SERVER</strong> and <strong>CLSCTX_ACTIVATE_64_BIT_SERVER</strong>, which overrides the server preference</li>
</ul>
<p>If neither the client nor the server specifies a preference, then:</p>
<ul>
<li>If the computer that hosts the server is running Windows Server 2003 with Service Pack 1 (SP1) or a later system, then COM will try to match the server architecture to the client architecture. In other words, for a 32-bit client, COM will activate a 32-bit server if available; otherwise it will activate a 64-bit version of the server. For a 64-bit client, COM will activate a 64-bit server if available; otherwise it will activate a 32-bit server.</li>
<li>If the computer that hosts the server is running Windows XP or Windows Server 2003 without SP1 or later installed, then COM will prefer a 64-bit version of the server if available; otherwise it will activate a 32-bit version of the server.</li>
</ul>
<p><strong>Server Preference</strong><br />
The server can specify its preferred architecture in the <a href="http://msdn.microsoft.com/en-us/library/ms694319%28v=VS.85%29.aspx">PreferredServerBitness</a> value under AppId (available only on 64-bit Windows). This integer value can be:</p>
<ul>
<li><strong>1</strong>: Match the server architecture to the client architecture. For example, if the client is 32-bit, use a 32-bit version of the server, if it is available. If not, the client&#8217;s activation request will fail.</li>
<li><strong>2</strong>: Use a 32-bit version of the server. If one does not exist, the client&#8217;s activation request will fail.</li>
<li><strong>3</strong>: Use a 64-bit version of the server. If one does not exist, the client&#8217;s activation request will fail.</li>
</ul>
<p>Here is the value set in Registry to specify the 64-bit architecture.<br />
<img alt="" src="/blog/wp-content/uploads/2010/11/com3264server_regappid.png" title="Registry AppId" class="alignnone" width="891" height="319" /></p>
<p>When you run the client, it launches the 64-bit version and in my example the following window pops-up:<br />
<img alt="" src="/blog/wp-content/uploads/2010/11/com3264server_64bit.png" title="64-bit COM message" class="alignnone" width="214" height="144" /></p>
<p>If I change the value to indicate the 32-bit architecture, the other COM server is launched and the displayed message is:<br />
<img alt="" src="/blog/wp-content/uploads/2010/11/com3264server_32bit.png" title="32-bit COM message" class="alignnone" width="214" height="144" /></p>
<p><strong>Client Preference</strong><br />
The client code I used so far looked like this:</p>
<pre name="code" class="cpp">
   ICoCOM3264Server* pServer;

   HRESULT hr = ::CoCreateInstance(
      CLSID_CoCOM3264Server,
      NULL,
      CLSCTX_LOCAL_SERVER|CLSCTX_REMOTE_SERVER,
      IID_ICoCOM3264Server,
      (void**)&#038;pServer);

   if(SUCCEEDED(hr))
   {
      pServer->SayHello();

      pServer->Release();
   }
</pre>
<p>However, the 64-bit version of Windows added new flags to the <a href="http://msdn.microsoft.com/en-us/library/ms693716%28v=VS.85%29.aspx">CLSCTX</a> enumeration.</p>
<ul>
<li><strong>CLSCTX_ACTIVATE_32_BIT_SERVER</strong>: used to activate or connect to a 32-bit version of the server; fail if one is not registered.</li>
<li><strong>CLSCTX_ACTIVATE_64_BIT_SERVER</strong>: used to activate or connect to a 64 bit version of the server; fail if one is not registered.</li>
</ul>
<p>As I mentioned earlier, if the client uses one of these flags, it overrides the server preference (specified via the PreferredServerBitness Registry value). </p>
<p>In the following example, the client requests the 64-bit COM server:</p>
<pre name="code" class="cpp">
   HRESULT hr = ::CoCreateInstance(
      CLSID_CoCOM3264Server,
      NULL,
      CLSCTX_LOCAL_SERVER|CLSCTX_REMOTE_SERVER|CLSCTX_ACTIVATE_64_BIT_SERVER,
      IID_ICoCOM3264Server,
      (void**)&#038;pServer);
</pre>
<p>And if you run it, no matter what the server specified, the 64-bit COM server is launched.</p>
<p>To read more about the subject see the MSDN links above.</p>
]]></content:encoded>
			<wfw:commentRss>http://mariusbancila.ro/blog/2010/11/04/32-bit-and-64-bit-com-servers/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>A Story About Browsers</title>
		<link>http://mariusbancila.ro/blog/2010/04/09/a-story-about-browsers/</link>
		<comments>http://mariusbancila.ro/blog/2010/04/09/a-story-about-browsers/#comments</comments>
		<pubDate>Fri, 09 Apr 2010 11:09:24 +0000</pubDate>
		<dc:creator>Marius Bancila</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[browsers]]></category>
		<category><![CDATA[Chrome]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[IE]]></category>

		<guid isPermaLink="false">http://mariusbancila.ro/blog/?p=522</guid>
		<description><![CDATA[I&#8217;m sometimes asked what browsers do I use and why. I use Firefox and Chrome, 95% of the time, and IE for those few Microsoft sites that are specially designed to work only with IE. Here is a story that shows an argument why I use those two. A few days ago I used my [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m sometimes asked what browsers do I use and why. I use Firefox and Chrome, 95% of the time, and IE for those few Microsoft sites that are specially designed to work only with IE. Here is a story that shows an argument why I use those two.</p>
<p>A few days ago I used my father&#8217;s laptop to do some web browsing. My father is not a computer specialist, but he knows how do use a computer for basic stuff like writing documents, browsing the web or downloading pictures from his digital camera. His laptop runs Windows XP and he had IE 6. Seeing that I though that&#8217;s <em>so 2006</em>. So I decided to upgrade that to IE 8. While IE8 was downloading I also decided to download and install Chrome for my own use. It took about a minute to download and install it. I was already surfing the web with Chrome by the time IE8 had done downloading.</p>
<p>Next step was to start the installer, but surprise, IE8 was requiring .NET 3.5 SP1. This was only 56MB or something so it didn&#8217;t take lot of time to download (but this could be very different in other geographical locations), however I thought that was a prerequisite whose purpose I don&#8217;t necessary see. So I started to install it and surprise: I got an error message that .NET 2.0, which was already installed, could not be uninstalled because it was not found. After some failed re-attempts I decided to uninstall .NET 2.0 manually and it worked well. However, running the .NET 3.5 SP1 setup again ended with the same error. So I decided to try .NET 3.5 without SP1. After a longer download the setup ran into the same error. Next, I downloaded .NET 3.0 and tried to install, but with the same error. At that point it was quite clear to me that there was something wrong with the uninstallation of .NET 2.0. After reading reports of similar problems on the web and without any suggestion being actually helpful I decided to download version 2.0 of the framework. Its setup allowed me to Uninstall or Repair and I chose to Uninstall. It said everything was OK so I tried 3.5 SP1 setup again, and this time it worked! Finally I was able to start the IE8 installation and it required to download and install a few updates and a couple of Windows restarts, and eventually it was up and running, <em>one hour later</em> after starting!</p>
<p>So my question to Microsoft is: how do you expect someone without good knowledge about computers and software installation be able to go through such a scenario? Chrome installation worked gracefully with 3-4 clicks and in less than a minute I was able to use it already. IE8 requires lots of updates and prerequisites like .NET and restarts and God forbids something goes wrong, you&#8217;re lost in installation. If the installation doesn&#8217;t work, you don&#8217;t have a product!</p>
<p>This is one reason (and definitely not the most important one) I prefer Firefox and Chrome over IE.</p>
]]></content:encoded>
			<wfw:commentRss>http://mariusbancila.ro/blog/2010/04/09/a-story-about-browsers/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Windows 7 Quotes Problem</title>
		<link>http://mariusbancila.ro/blog/2010/01/15/windows-7-quotes-problem/</link>
		<comments>http://mariusbancila.ro/blog/2010/01/15/windows-7-quotes-problem/#comments</comments>
		<pubDate>Fri, 15 Jan 2010 08:44:45 +0000</pubDate>
		<dc:creator>Marius Bancila</dc:creator>
				<category><![CDATA[Windows]]></category>
		<category><![CDATA[keyboard]]></category>
		<category><![CDATA[problem]]></category>
		<category><![CDATA[win7]]></category>

		<guid isPermaLink="false">http://mariusbancila.ro/blog/?p=463</guid>
		<description><![CDATA[For several months, after I installed Windows 7 at home I had a very annoying problem: whenever I was writing double quotes (&#8220;) or single quotes (&#8216;) in some text editors and all browsers, the quotes did not appear. Only after I was typing another character, then both the opening and the closing quotes were [...]]]></description>
			<content:encoded><![CDATA[<p>For several months, after I installed Windows 7 at home I had a very annoying problem: whenever I was writing double quotes (&#8220;) or single quotes (&#8216;) in some text editors and all browsers, the quotes did not appear. Only after I was typing another character, then both the opening and the closing quotes were shown, followed by the character (like &#8220;&#8221;X or &#8221;X, instead of &#8220;X&#8221; or &#8216;X&#8217;). And when pressing some characters, like A or I, instead of getting &#8220;&#8221;A or &#8220;&#8221;I what was showing up was an Ä or Ï with two points on top. To get &#8220;X&#8221;, I had to type quote followed by space followed by X and then quote again. Really annoying.</p>
<p>The curious thing was that my environment was similar to the one I had at the office: Windows 7 Ultimate, Visual Studio 2008 SP1, Office 2007, same browsers, etc. So I had to rule out a problem with Visual Studio. It must have been some weird setting in Windows 7, though I had done identical installations at home and at the office. Well, it turned out I didn&#8217;t have identical setups: at home I had both Romanian and English keyboard layouts, and for English I had both &#8220;US&#8221; and &#8220;United States-International&#8221;, the later being the default input language for the English layout.</p>
<img alt="Keyboard input" src="/blog/wp-content/uploads/2010/01/keyboardinput.png" title="Keyboard input" width="431" height="491" />
<p>Changing the default input language to <strong>English (United States) &#8211; US</strong> (as shown in the image above) solved this problem (without restarting Windows, only the applications where the problem occurred).</p>
<p>You can find this from Control Panel > Change Keyboard or other input methods > Keyboard and Languages > Change keyboards. </p>
]]></content:encoded>
			<wfw:commentRss>http://mariusbancila.ro/blog/2010/01/15/windows-7-quotes-problem/feed/</wfw:commentRss>
		<slash:comments>35</slash:comments>
		</item>
		<item>
		<title>More God Modes in Windows 7</title>
		<link>http://mariusbancila.ro/blog/2010/01/08/more-god-modes-in-windows-7/</link>
		<comments>http://mariusbancila.ro/blog/2010/01/08/more-god-modes-in-windows-7/#comments</comments>
		<pubDate>Fri, 08 Jan 2010 21:37:05 +0000</pubDate>
		<dc:creator>Marius Bancila</dc:creator>
				<category><![CDATA[Windows]]></category>
		<category><![CDATA[godmode]]></category>
		<category><![CDATA[tricks]]></category>
		<category><![CDATA[win7]]></category>

		<guid isPermaLink="false">http://mariusbancila.ro/blog/?p=451</guid>
		<description><![CDATA[In my previous post I wrote about a feature called &#8220;god mode&#8221; available in Windows 7 and Vista. By creating a folder with a specific name you get one entry point to all the commands available in Control Panel. It was reported that several such shortcuts exits. Below is an image with the 16 folders [...]]]></description>
			<content:encoded><![CDATA[<p>In my <a href="http://mariusbancila.ro/blog/2010/01/06/playing-god-in-windows-7/">previous post</a> I wrote about a feature called &#8220;god mode&#8221; available in Windows 7 and Vista. By creating a folder with a specific name you get one entry point to all the commands available in Control Panel. It was <a href="http://www.tomshardware.com/news/GodMode-Windows-7-Secret-Shortcuts,9373.html" target="_blank">reported</a> that several such shortcuts exits. Below is an image with the 16 folders that are god modes.</p>
<div class="wp-caption alignnone" style="width: 723px"><img alt="" src="/blog/wp-content/uploads/2010/01/godmode5.png" title="All 16 god modes" width="713" height="558" /><p class="wp-caption-text">All 16 god modes</p></div>
<p>You can create them all by making and running (from the desired parent folder) a .cmd or .bat file with the following content:</p>
<pre class="prettyprint">
mkdir ControlPanel.{ED7BA470-8E54-465E-825C-99712043E01C}
mkdir LocationSensor.{00C6D95F-329C-409a-81D7-C46C66EA7F33}
mkdir BiometricDevice.{0142e4d0-fb7a-11dc-ba4a-000ffe7ab428}
mkdir PowerOptions.{025A5937-A6BE-4686-A844-36FE4BEC8B6D}
mkdir TaskbarIcons.{05d7b0f4-2121-4eff-bf6b-ed3f69b894d9}
mkdir Credentials.{1206F5F1-0569-412C-8FEC-3204630DFB70}
mkdir InstallFromNetwork.{15eae92e-f17a-4431-9f28-805e482dafd4}
mkdir DefaultPrograms.{17cd9488-1228-4b2f-88ce-4298e93e0966}
mkdir PublicKeys.{1D2680C9-0E2A-469d-B787-065558BC7D43}
mkdir WifiNetworks.{1FA9085F-25A2-489B-85D4-86326EEDCD87}
mkdir Network.{208D2C60-3AEA-1069-A2D7-08002B30309D}
mkdir Computer.{20D04FE0-3AEA-1069-A2D8-08002B30309D}
mkdir Printers.{2227A280-3AEA-1069-A2DE-08002B30309D}
mkdir workplaceConnetions.{241D7C96-F8BF-4F85-B01F-E2B043341A4B}
mkdir Firewall.{4026492F-2F69-46B8-B9BF-5654FC07E423}
mkdir PerformanceRatings.{78F3955E-3B90-4184-BD14-5397C15F1EFC}
</pre>
<p>(You can get the GUIDs of the folders from the above listing).</p>
<p>You can read more about this <a href="http://www.tomshardware.com/news/GodMode-Windows-7-Secret-Shortcuts,9373.html" target="_blank">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://mariusbancila.ro/blog/2010/01/08/more-god-modes-in-windows-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Playing God in Windows 7</title>
		<link>http://mariusbancila.ro/blog/2010/01/06/playing-god-in-windows-7/</link>
		<comments>http://mariusbancila.ro/blog/2010/01/06/playing-god-in-windows-7/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 08:26:49 +0000</pubDate>
		<dc:creator>Marius Bancila</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[godmode]]></category>
		<category><![CDATA[win7]]></category>

		<guid isPermaLink="false">http://mariusbancila.ro/blog/?p=446</guid>
		<description><![CDATA[There has been some buzz in the last few days about a feature in Windows 7 called &#8220;God mode&#8221;. Well, it doesn&#8217;t empower you as a God but allows you to access all the nested features available in Control Panel from a single entry point. All you have to do is creating a folder (or [...]]]></description>
			<content:encoded><![CDATA[<p>There has been some buzz in the last few days about a feature in Windows 7 called &#8220;God mode&#8221;. Well, it doesn&#8217;t empower you as a God but allows you to access all the nested features available in Control Panel from a single entry point. All you have to do is creating a folder (or renaming an existing one) with the name <em><strong>GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}</strong></em></p>
<p><div class="wp-caption alignnone" style="width: 521px"><img alt="" src="/blog/wp-content/uploads/2010/01/godmode1.png" title="Folder GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}" width="511" height="156" /><p class="wp-caption-text">Create a folder with the name GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}</p></div><br />
After the folder was created/renamed its icon changes to the icon used for Control Panel.<br />
<div class="wp-caption alignnone" style="width: 520px"><img alt="" src="/blog/wp-content/uploads/2010/01/godmode2.png" title="Control Panel icon" width="510" height="156" /><p class="wp-caption-text">Same icon as Control Panel</p></div><br />
When you enter the folder you find all the commands that are available in Control Panel, but in a single list with no nesting. So this could be a good place to access quick commands.<br />
<div class="wp-caption alignnone" style="width: 755px"><img alt="" src="/blog/wp-content/uploads/2010/01/godmode3.png" title="Commands available in GodMode folder" width="745" height="540" /><p class="wp-caption-text">Commands available in GodMode folder</p></div></p>
<p>On the other hand you can get the same from the Start menu by searching for the name. Here is an example of the commands made available when searching for &#8220;defrag&#8221;.<br />
<div class="wp-caption alignnone" style="width: 421px"><img alt="" src="/blog/wp-content/uploads/2010/01/godmode4.png" title="Commands available from Start Menu" width="411" height="475" /><p class="wp-caption-text">Start menu results for &quot;defrag&quot;</p></div><br />
Of course, in this later case, one needs to know what to search for, but in general that should not be a problem.</p>
<p>This feature also works in Windows Vista and Windows Server 2008, but it <a href="http://www.sitepoint.com/blogs/2010/01/05/windows-7-god-mode/#">is reported</a> that is crashes with Vista 64 bit.</p>
<p>This feature only works from Windows Explorer. It is not available from tools like Total Commander or FreeCommander.</p>
]]></content:encoded>
			<wfw:commentRss>http://mariusbancila.ro/blog/2010/01/06/playing-god-in-windows-7/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Windows 7 and Server 2008 R2 RTM available on MSDN</title>
		<link>http://mariusbancila.ro/blog/2009/08/06/windows-7-and-server-2008-r2-rtm-available-on-msdn/</link>
		<comments>http://mariusbancila.ro/blog/2009/08/06/windows-7-and-server-2008-r2-rtm-available-on-msdn/#comments</comments>
		<pubDate>Thu, 06 Aug 2009 19:17:38 +0000</pubDate>
		<dc:creator>Marius Bancila</dc:creator>
				<category><![CDATA[Releases]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[MSDN]]></category>
		<category><![CDATA[release]]></category>
		<category><![CDATA[RTM]]></category>
		<category><![CDATA[win2008]]></category>
		<category><![CDATA[win7]]></category>

		<guid isPermaLink="false">http://mariusbancila.ro/blog/?p=342</guid>
		<description><![CDATA[Windows 7 RTM and Windows Server 2008 R2 RTM are now available for download on MSDN for MSDN and TechNet subscribers. Currently, the only available bits are in English. The other languages will become available on October 1st. Volume License customers with an existing Software Assurance license will be able to download the bits starting [...]]]></description>
			<content:encoded><![CDATA[<p>Windows 7 RTM and Windows Server 2008 R2 RTM are now available for download on MSDN for MSDN and TechNet subscribers. Currently, the only available bits are in English. The other languages will become available on October 1st. Volume License customers with an existing Software Assurance license will be able to download the bits starting tomorrow.</p>
<p>For more information on these releases check the <a href="http://windowsteamblog.com/">Windows Team Blog</a>.</p>
<p>Update: Windows Server 2008 R2 is not yet available.</p>
]]></content:encoded>
			<wfw:commentRss>http://mariusbancila.ro/blog/2009/08/06/windows-7-and-server-2008-r2-rtm-available-on-msdn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

