Sandip's Programming Zen

An attempt to share tech/coding experiences

Archive for the ‘Windows’ Category

Running 32 bit applications on 64 bit OS

with one comment

Lately I ran into a problem where I created a feature where user can view PDF within a winform application. To do that I first used a web browser control since it was a simple solution where you just need to provide pdf path to the navigate property. That works without problem on Win XP (32bit) , but as soon as user runs it on his Vista (64 bit) OS  , it behaved different , that said, pdf opens but in a separate window, which looks bit odd, so must be fixed.

To solve that problem , I have removed web browser control and placed Acrobat Reader control (assuming that all of my users will have at least Adobe reader installed). Now that again worked well on Win XP but simply crashed on Vista (64 bit).  Reason was Acrobat reader control is an ActiveX control which is 32 bit component , that won’t work on a 64 bit OS. After looking around for some time and find out there is no 64 bit version of Acrobat reader, I discovered that I have to make sure that my win form app runs under 32 bit process on a 64 bit OS. To, do that you have to change Target Platform property of your project (See screenshot below).

Bottom line is if you have any project dependencies which only works on 32 bit environment, you have to change your project’s target platform to run only under 32 bit process. That will make your app work fine on both 32 bit and 64 bit OSes.

target_platform

Advertisements

Written by Sandip

January 9, 2011 at 10:44 pm

Posted in .Net, Programming, Windows

Tagged with , , ,

multiple connections to a server or shared resource by the same user, using more than one user name, are not allowed

leave a comment »

multiple connections to a server or shared resource by the same user, using more than one user name, are not allowed

This message will come when you have already connected to a network machine earlier using some credential and now you are trying to access the same machine using a different set of credentials. The reason is, windows keep the connection open once we open a network path using a particular credential and does not close until we shutdown.

Solution is we remove those connections manually and a simple trick is following command which deletes all “saved” connections:

net use * /delete

Or, you can delete a specific by using :

net use \\192.168.1.100 /delete

Written by Sandip

November 4, 2009 at 9:21 am

Posted in Windows

Tagged with , ,