Welcome to MSDN Blogs Sign in | Join | Help

Chrome OS?

Yesterday evening I had the opportunity to read in detail the document that describe Google Chrome features. Interesting is that if I read "O.S." each time in the document appairs the word "browser" all the document continues to have sense. Very, very interesting:-)

Posted by NicolD | 0 Comments

Polipo Matico

PolipoMatico is a Windows Vista sidebar gadget that allows to retrieve and show italia traffic infos from octotelematics web site (www.octotelematics.it)

image

Why
Because traffic in Italy is a serious topic, and because we like to be at home, at the end of the day, with less stress as possible:-)

Usage
Just install the gadget, and add it to the sidebar. Main commands:

  • Mouse wheel: zoom in and out
  • Use the orange icon to select "rotate" or "drag" mode
  • to rotate or drag, just click and drag the image
  • double click: reset image position


Supported Areas
Roma - GRA (Grande Raccordo Anulare)

 

Download it from CodePlex: Polipo Matico

How to provide a context sentitive help to your WPF application

I found the following (and very) interesting post where is well described how to provide your windows presentation fundation client application with a context sensitive help. Chek it out!

http://blogs.msdn.com/mikehillberg/archive/2007/07/26/a-context-sensitive-help-provider-in-wpf.aspx

Posted by NicolD | 0 Comments

Win32 Application contextmenu piloting (UI Automation)

I just developed a PoC where I demonstrated to my customer how is feasible to integrate and manipulate a Win32 application (Remedy Client in my case) into a CCF (Customer Care Framework) client application.

In this context I had some problem in piloting context menu. the couple of link below give much information.

My main takeways:

  • standard context menu class name is "#32768"
  • usually context menu send a WM_COMMAND message to the application window with an ID that trigger the operation
  • when you successfully selected the context menu window (you have the HWND):
    • you can choose the menu item via WM_KEYDOWN/VK_DOWN messages
    • you can activate the menu item via a WM_KEYDOWN/VK_ENTER message

Links that saved my day:

Posted by NicolD | 0 Comments

WPF: How to embed an Icon in an Assembly

You can easily integrate resources in your Windows Presentation Foundation application by using the WPF designer for Visual Studio and "pack:" URI scheme provided by XAML to reference resources in your application's XAML.

for more information have a look to MSDN article.

Posted by NicolD | 0 Comments
Filed under:

How to access Hyper-V (RC0) machine (workgroup) from Vista SP1 joined to a domain

Step 1: Install this update to enable remote management of a Windows Server 2008 computer running the Hyper-V RC0 role

Step 2: If the server is either a member of WORKGROUP or is in a different domain that is untrusted by the client, then the connection from the server to the client used to return asynchronous results is created as an Anonymous connection. An anonymous connection fails with either the 0x80070005 error or the 0x8007000e error unless Anonymous connections are given the DCOM Remote Access permission on the client. The following steps grant DCOM remote access permissions from the server to the client in this scenario.

    1. Click Start, click Run, type DCOMCNFG, and then click OK.
    2. In the Component Services dialog box, expand Component Services, expand Computers, and then right-click My Computer and click Properties.
    3. In the My Computer Properties dialog box, click the COM Security tab.
    4. Under Access Permissions, click Edit Limits.
    5. In the Access Permission dialog box, select ANONYMOUS LOGON name in the Group or user names box. In the Allow column under Permissions for User, select Remote Access, and then click OK.

Step 3: from command prompt execute the following command:

  • cmdkey /add:yourhyper-vmachine /user:hyper-vdomani\administrator /pass:hyper-vadministratorpassword

in example:

  • cmdkey /add:srv04 /user:srv04\administrator /pass:123.password.123
NOTE: use netbios name (i.e. SRV04) and not FQDN name (i.e. SRV04.myintranet.local)
Posted by NicolD | 2 Comments
Filed under: ,

How to use Hyper-V with a wireless network connection

Hyper-V, the fantastic Windows Server 2008 new feature have a small limit I discovered when on my "home/handmade server:-)" I tried to use it. It doesn't manage wireless networks. This is "by design", as clearly described by Ben Armstrong in his blog. This absolutely make sense because Windows Server 2008 and Hyper-V is a server oriented product.

Despite of this, there are scenarios I can define "consumer" or "Lab" oriented where allow to Hyper-V to interact with a wireless network can be required. The scenarios list include:

  • A test server at home connected via wireless to both Internet and other home PCs via a SOHO router (my scenario :-)
  • A server machine used on a live/conference demo connected to the speaker's PC via wireless 

For these scenarios, we can identify following connectivity requirements:

  1. to allow to guest machine (on Hyper-V) to access to Internet
  2. to allow to guest machine to access to other machines connected to wireless LAN
  3. to allow to other machines connected to the wireless LAN to access to guest machine
  4. to allow to guest machine to be exposed and accessed from Internet

The great Ben's post on this topic, address just the scenario (1) leaving other not covered. Objective of this post is to show a configuration that allow to address all above requirement in 15 minutes or less:-)

--

Well, Hyper-V allows to create "Internal Virtual Networks" (IVN). These IVN are networks visible from both HOST and GUEST operating systems. In example if I have an internal virtual network called "RoI" (Route over Internet:-) on my host machine (i.e. SRV04.local) and the this network is shared with 3 guest machines (GUEST01.local, GUEST02.local, GUEST03.local), I'll have a "virtual" network topology as shown below:

image

In order to create a new virtual internal network switch you have to:

  1. Open the Hyper-V Manager and select your server.
  2. Select Virtual Network Manager... from the action pane (on the right).
  3. Select New virtual network and choose to Add an Internal network.
  4. Give the new virtual network the name you want hit OK.

Because SRV04.local have a wireless network card too, SRV04.local now have 2 network cards. Through this second network card, it is able connect to wireless network (WIRELESS) that allows it to interact with both other PC connected via wireless and to Internet.

image

Now, in order to allow to GUEST machines to interact with both machines connected to wireless LAN AND Internet we can enable HOST machine (SRV04.local) to act as a router.

Windows Server 2008 have a standard role called "Network Policy and Access Service" that can be activated to allow this kind of scenario.

Before to proceed, in order to simplify the discussion, let's assume to use following network configuration:

WIRELESS LAN

  • IP Range: 192.168.1.x (1<= x <=255)
  • Subnet Mask: 255.255.255.0
  • DNS == Default Gateway == 192.168.1.1
  • Wireless LAN is private and router act as a NAT to allow local machines to access Internet.

RoI LAN

  • IP Range: 192.168.2.x (1<= x <=255)
  • Subnet Mask 255.255.255.0
  • DNS: 192.168.1.1
  • Default Gateway: 192.168.2.6 (SRV04 machine on RoI LAN!)

SRV04

  • IP on Wireless LAN: 192.168.1.6
  • IP on RoI LAN: 192.168.2.6

 image

Steps required to allow GUEST01.local to access to Internet are following:

  • enable and configure "Network Policy and Access Service" on SRV04.local
  • add a static route on "default gateway" router

 

Step1: how to configure/enable "Network Policy and Access Service"

From Server Manager, select "Add Role".

Select "Network Policy and Access Service", then click Next.

Capture01

Select "Remote Access Service" and "Routing" then click Next.

Capture02

Select "Custom Configuration" then click Next.

Capture03

Select "LAN Routing only" then click Next.

Capture04

when finished, select "Start Service" on server manager.

Capture05

 

Step 2: how to configure your default gateway router

Previous configuration is not enough to allow routing because you still need to say to your router that addresses 192.168.2.x must be forwarder to SRV04.local machine. You can obtain this adding a static route on your router. Almost every SOHO router of €50 or more is able to do this, please refer to your router manual to discover how to do this.In example, at home, I have a Netgear toy that shows the following page

Capture06

In our example have to add a route to 192.168.2.0 mask 255.255.255.0 through 192.168.1.6

And that's all! Now your guest machine can access to Internet. The cool think is that with this configuration, and thanks to your cheap:-) router too, someone from Internet can access to a service based on your GUEST machine. In example, if you have an IIS on GUEST01.local and you want to show it on Internet, you can use the port forwarding option of your router with following parameters:

  • Service/Port: 80
  • Server IP Address: 192.168.2.10

Again for more information on port forwarding please refer to your router instruction manual.

This configuration still doesn't allow:

  • Other machines on your wireless LAN to access to GUEST01.local
  • GUEST01.local to access other machines on your wireless LAN

This because machines on your wireless LAN have as default gateway 192.168.1.1 and the router is not smart enough to understand that 192.168.2.x addresses must be routed to SRV04.local. The easy solution is to add a static route on each machine connected to the wireless LAN. You can achieve this adding a static route via command prompt with the following instruction:

  • route ADD 192.168.2.0 MASK 255.255.255.0 192.168.1.6

Remember that this action, on Vista, requires elevation.

Thanks to Marcello "router" Formica for the fundamental help:-)

Posted by NicolD | 0 Comments
Filed under: ,

WPF - Windows Presentation Foundation - for dummies (and for free:-)A

As you discovered from my previous post, today I'm working on WPF, Again on codeproject, I found this series of articles that can be a good start point to understand basics on WPF, XAML, resources, styles...

 

WPF- A Beginner's Guide - Part 1 of n - Layout

WPF - A Beginners guide part 2 of n - XAML and Resources

WPF - A Beginners guide part 3 of n - Commands and Events

WPF- A Beginner's Guide - Part 4 of n - Dependency Properties

WPF- A Beginner's Guide - Part 5 of n - Data Binding

WPF - A Beginner's Guide - Part 6 of n - Templates

Posted by NicolD | 0 Comments
Filed under:

Custom ListBox Layout in WPF

Today I used this useful article found a couple of articles that describe first steps on WPF ListView Customization. Check it out if you have time.

Custom ListBox Layout in WPF from Codeproject

Styling the highlighting colors for Combo/List/View/Box from XAML for Morons

Posted by NicolD | 0 Comments

HowTo: Unblock restricted file attachments in Microsoft Outlook 2007

If you want (REALLY WANT :-) to change the Outlook file attachments security levels (i.e. to read e .exe file attached to a received email), and you know how to use the regedit.exe tool, you can follow the procedure below:

  • Start...Run..."regedit"
  • Go to HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Outlook\Security
  • Create a new string value called Level1Remove
  • Enter in the file extensions you want to use, such as .exe or .bat
  • You can have multiple file types separated by a semicolon like this: ".exe;.com"
  • Close and open outlook.

To avoid risks, I suggest to keep the string "Level1Remove" in the registry ONLY for the strict necessary.

More info on .NET Atlanta Regular Guys blog.

Posted by NicolD | 3 Comments
Filed under:

Oh damn... where is my "Hibernation Button"?

On Vista, even if is extremely easy to disable hibernation, re-activate or activate it for the first time, is an activity that you can do only via command line. While if you search on Live || Google you can find many answers to this question, my personal suggestion is to use information provided by Microsoft official support (KB929658 - The Hibernate option is not available in Windows Vista).

Posted by NicolD | 0 Comments
Filed under: , ,

"Window Vista SP1 File Removal Tool" AKA "how to recover disk space after Vista SP1 installation"

as described below you can use vsp1cln.exe to remove SP1 uninstallation information and recover up to 1Gb of disk space...

Windows Vista SP1 File Removal tool (Vsp1cln.exe). Vsp1cln.exe is an optional tool that you can run
after you install SP1. This tool removes older versions of components that have been updated in SP1,
which are stored during the installation in case you need to uninstall SP1 later. Saving these older
components increases the amount of disk space that is used. Typically, you should run Vsp1cln.exe if
you want to reclaim this disk space after applying SP1 and if you will not need to uninstall SP1. Note,
however, that you cannot uninstall SP1 after you run this tool. You can use this tool both online and
offline, but you must have SP1 installed and you must use the correct version of the tool. If you are
running this file on an offline image, you should use the Vsp1cln.exe included in the Windows OPK or
AIK. However, if you are running this file online (on a computer that you are booted into), you should
use the Vsp1cln.exe file located at %windir%\system32\vsp1cln.exe.

More info: http://technet2.microsoft.com/WindowsVista/en/library/5cf710a1-1414-4d11-97de-
0748abdcec651033.mspx?mfr=true

Posted by NicolD | 5 Comments
Filed under:

Vista with SP1 hangs with CPU usage at 100% (99% of kernel time)

UPDATEI think that information below are not correct because in days after this post, I continued to have this problem in other scenarios too. At the end of the story I just re-installed the machine with a "Vista&SP1 integrated" and now, after one month, everything is working fine. At this time the only hypothesis I have is that for some reason the SP1 setup didn't the right job, how knows:-S
N

 ---------

Since I installed SP1 RTM on my Vista (Toshiba Tecra M7 dual core tablet PC) I discovered that the system after a boot, remained with CPU usage constant at 100%. A deeper analysis shown that 99% of that CPU usage was kernel time:-(

kernel-time

After a Sunday afternoon spent to find a solution, I discovered the problem: I have an old PCMCIA card reader from GEMPLUS (GemPC400) that, if present when I boot the laptop, produces the issue and the behavior described above.

IMG_0543

When Vista started with CPU ad 100%, even if I removed the card reader, system remained with CPU at 100% (== unusable). The only way to unlock the situation, was to reboot the system (without the card!).

Because I needed that card reader, I found a workaround: infact, if I start Vista without the card reader and after the boot I insert it into PCMCIA port everything goes fine.

Lession lerned: if you discover that your Vista uses 99% of CPU time as "kernel time", try to analyze peripherals you have installed because there could be a driver that is not working as it should.

Posted by NicolD | 0 Comments
Filed under: , , ,
More Posts Next page »
 
Page view tracker