Keyword - Windows XP

Entries feed - Comments feed

Tuesday, November 28 2006

Using Microsoft RTC API under Windows Vista

If you are developping an application base on the Microsoft RTC API, a big surprise is awaiting you with Windows Vista. The installation of the RTC API miserably failed, because of lack of privileges. The result is that the RTC side-by-side assemblies are not available, thus the application does not want to start. Crawling through the forums doesn't help much. So what can you do to make this application work ? Here is an answer.

The basic idea is that if the RTC side-by-side assemblies cannot be installed, then they have to be deployed within the application, thus making the application isolated. MSDN is a great source of knowledge about isolated applications and side-by-side assemblies. To avoid any problem during the library lookup, the workaround also uses tips about the assembly searching sequence.

To deploy side-by-side assemblies to be used with an isolated application, we must copy them in the same folder that the application exectuable. The naming of the Manifest files is important to enable a proper lookup. The last trick is to force the local resolution of the DLLs, by indicating that no system-wide search is needed. Now that you have the full picture, here are the details.

  1. Extract the RTC DLLs and Manifests files from a successful install of the RTC API. This can be done on a Windows XP SP2 system. The files to grab are (for a RTC 1.3 API) :
    C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Networking.Dxmrtp_6595b64144ccf1df_5.2.1002.3_x-ww_021cfae0\dxmrtp.dll
    C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Networking.RtcDll_6595b64144ccf1df_5.2.1002.3_x-ww_92561fce\rtcdll.dll
    C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Networking.RtcRes_6595b64144ccf1df_5.2.1002.3_x-ww_88ef1b2a\rtcres.dll
    C:\WINDOWS\WinSxS\Manifests\x86_Microsoft.Windows.Networking.Dxmrtp_6595b64144ccf1df_5.2.1002.3_x-ww_021cfae0.Manifest
    C:\WINDOWS\WinSxS\Manifests\x86_Microsoft.Windows.Networking.RtcDll_6595b64144ccf1df_5.2.1002.3_x-ww_92561fce.Manifest
    C:\WINDOWS\WinSxS\Manifests\x86_Microsoft.Windows.Networking.RtcRes_6595b64144ccf1df_5.2.1002.3_x-ww_88ef1b2a.Manifest
  2. Rename the Manifests. The changes are :
    x86_Microsoft.Windows.Networking.Dxmrtp_6595b64144ccf1df_5.2.1002.3_x-ww_021cfae0.Manifest becomes Microsoft.Windows.Networking.Dxmrtp.Manifest
    x86_Microsoft.Windows.Networking.RtcDll_6595b64144ccf1df_5.2.1002.3_x-ww_92561fce.Manifest becomes Microsoft.Windows.Networking.RtcDll.Manifest
    x86_Microsoft.Windows.Networking.RtcRes_6595b64144ccf1df_5.2.1002.3_x-ww_88ef1b2a.Manifest becomes Microsoft.Windows.Networking.RtcRes.Manifest
  3. Copy the files in the direction where lies your application. They must be in the same folder.
  4. In your RTC based application, create a Manifest file to reference the exact version of the RTC API. The dependency section in the Manifest file should look like that (taken from the RTC samples) :
    <dependency>
    <dependentAssembly>
    <assemblyIdentity
    type="win32"
    name="Microsoft.Windows.Networking.RtcDll"
    version="5.2.1002.3"
    processorArchitecture="X86"
    publicKeyToken="6595b64144ccf1df"
    language="*"
    />
    </dependentAssembly>
    </dependency>
  5. Create an empty file, named like your application executable file, with a local extension. If your application executable is WindowsApplication.exe, the empy file should be named WindowsApplication.exe.local.
  6. Launch your application. It should work properly.

Wednesday, October 4 2006

Installing software from ISO images without burning them

More and more software are distributed on ISO images and to install them, you must burn CDs, and launch the installation. While it is great if you like to store tons of CDs, or even if you are using a rewritable medium, it is a bit clumsy and totally avoidable. Here is how.

For illustration purpose, I will use the example of the MSDN Library. The library is available for download under three ISO images. Once the three images are downloaded, you have to burn three CDs in order to install the library. Eh, wait a minute !!! Don't do that !!! What about a virtual CD drive ?

In fact, Microsoft has release a small tool called Windows XP Virtual CD Control Panel. This small tool allows to define one or more virtual drive, and to mount ISO, CDFS, Joliet, and UDF images. Once the image is mounted, it appears as a loaded drive that is recognized like any other physical drive.

Let's get back to my example. I create a drive and mount the first image of the install. When the installer requires the second disk, I unmount the first image and mount the second. The image swap last less than ten seconds.

Believe me, it's a valuable trick that can save you a lot of time : no more burning and lengthy disk swapping.

Tuesday, March 21 2006

Microsoft.mshtml.dll within a .NET application

If you are using the package in your .NET application, be aware that does not copy it into you project. Instead, it references it like any other assemblies of the .

The problem is that this DLL is not installed by default on a Windows XP SP2 system. So when you launched your .NET application, it miserably failed with a cryptic error message. The solution is to tell Visual Studio to make a local copy of the DLL so it will be include in the redistribuables files of the application. Select the MSHTML reference and in the properties sheet, set "Copy Local" to true. That's it.

Solution Explorer Reference Properties

Thursday, March 9 2006

Windows XP boots on a Macbook Pro

They did it : it's here..

Tuesday, February 14 2006

Solaris 10/x86 on VMWare Player

Some days ago, I wanted to try . The fastest way to do was to use a virtual machine. As there is no VMWare support from , I created my own image.

If you google a bit, you will find how to create this kind of custom image. has done a great job to show step by step how to build an image for . So I followed the same steps and build a blank image to install Solaris 10.

Creating a blank image for an install involves to steps :

  • Creating a compressed virtual hard drive file. This is done with an utility found in , called qemu-img.exe. The typical command line is "qemu-img.exe create -f vmdk Solaris10.vmdk 10G" (for Solaris, I choose a 10Go drive size to be able to make a default install).
  • Creating a descriptor file for VMWare Player. This is done with NotePad or WordPad. This is mostly a copy-and-paste job.

With this blank image and the Solaris 10 DVD (which I downloaded), you have all you need to launch VMWare Player and install Solaris 10.

I don't want provide complete image of Solaris 10 as I have no place to store it and no rights to do it. But for the lazy one, I provide the following images :

  • a to boot Solaris 10. Memory is 512Mo and drive size is 10Go.
  • a to boot Windows XP Pro. Memory is 256Mo and drive size is 10Go.
These images are ready to be run in VMWare Player but you NEED a CD/DVD of the OS to install it. And remember to only install OS you have a license for !!!