Speed up solution loading time in Visual Studio 2005


Your Visual studio taking long time load your project ?

just delete content of following folder (and keep deleting everyday…)

C:\Documents and Settings\\Local Settings\Application Data\Microsoft\WebsiteCache

More information: http://groups.google.com/group/chromium-dev/browse_thread/thread/b181f59d9d445fa1?pli=1

http://robertbogley.wordpress.com/2007/09/19/how-to-speed-up-loading-time-in-microsoft-visual-studionet-2005-projects/


Killing process thread in dot net

As of i know it is not possible to kill process thread directly in dot-net.
example code:
Process p = Process.GetCurrentProcess();
foreach (ProcessThread t in p.Threads)
{
if (t.Id == 1111)
// u cant abort this tread, abort method wont available for this thread
}

So how can i kill this thread? is it possible? Yes i did this using win32 programming

My Code: i declare below codes.
[DllImport("Kernel32.dll")]
public static extern Int32 OpenThread(Int32 dwDesiredAccess, Int32 bInheritHandle, Int32 dwThreadId);
[DllImport("Kernel32.dll")]
public static extern Int32 TerminateThread(Int32 hThread, Int32 dwExitCode);

So that i call these funaction to kill any thread :) like ,
Int32 threadHandle = OpenThread(0x1F03FF, 1, t.Id);
TerminateThread(threadHandle, 0);

Please let me know if you know any other method .

generating the code using xsd

path/xsd .exe FilePath.xsd /classes /namespace:

example :

"C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\xsd.exe" "Merlot XMLSchema.xsd" /classes /namespace:RightFax.Server.Archive.Utils.Resources

creating log from installshield exe/msp

msiexec.exe /p "C:\Documents and Settings\qa\Desktop\8.3 Patch.msp" /l*v c:\log85gold.log

if you already have exe then try below one :
"8.3 SP2.exe" /v"/l*v C:\LogFile.log"

How to run installshield MSP as EXE

msiexec.exe /p "full path to the .msp file\PatchPackage.msp" REINSTALL=ALL REINSTALLMODE=omus

Hide a Drive

If you don’t want other users stumbling over a drive while browsing the computer through Explorer, this tweak may help out. 

Although this tweak will render the drive invisible in Windows Explorer, it will still be accessible through Windows’ search utility, as well as other third-party file managing applications. 

Microsoft Office applications will also be able to access the cloaked drive with no problem. 
To cloak a drive, open up regedit and go to HKEY_CURRENT_USER/Software/Microsoft/Windows/
CurrentVersion/Policies/Explorer. 

Create/modify the DWORD value “NoDrives” to match a corresponding drive letter you wish to hide. 

A: 1; B: 2; C: 4; D: 8; E: 16; F: 32; G: 64; H: 128; I: 256; J: 512; etc. To hide multiple drives, just add the values together and enter the sum as the value for the DWORD value “NoDrives”. 

To hide all the drives, just enter the value 67108863.

Hope it is useful for u..

Dog got lost

Your dog got lost in one of the 17 rooms arranged next to each other.
There is a small channel between two adjacent rooms thorough which
that dog can pass. There's a channel between 1-2, 6-7, 7-8, 16-17 and
so on. There is no connection between room # 1 and room # 17. They are
situated at the two ends.

Your aim is to search out the dog in the least number of days. If you
are allergic to dogs or do not like dogs; it doesn't matter. You can
change that noun to anyone whom you love very much and would like to
find out as soon as possible. But, let me continue with that dog in
his problem. (A gentleman has advised long ago ==> Try to become that
man that your pet dog thinks you to be. The world be a real wonderful
place then.)

You can check any 2 rooms in the day time. Please, keep a note that
you cannot perceive if the dog is any of the adjacent rooms from that
particular room in which you are in for checking.

The dog also loves you and tries to find you. But, primarily it is
more active during the night. So, every mid-night it moves either one
room to the right or left. The dog is random in selecting if it would
move right or left and it doesn't believe in any kind of mathematics
or strategy.

You again come and get the opportunity to check any of the 2 rooms
during the day when the dog is waiting silently in its present room
for your visit.

What should be your strategy to find out your lost dog in the least
possible number of days?

No more system lock, screen saver problem when ur watching movie

·         Run ‘regedit’ to edit your registry

·         Navigate down the tree to HKEY_CURRENT_USER > Software Policies > Microsoft > Windows > Control Panel > Desktop and look for an entry ScreenSaverIsSecure. You want to make sure the value for ScreenSaverIsSecure is 0 (zero).

Exit regedit;

useful visual studio shortcuts

Ctrl-Alt-V, A
Displays the Auto window to view the values of variables currently in the scope of the current line of execution within the current procedure

Ctrl-Alt-Break
Temporarily stops execution of all processes in a debugging session. Available only in run mode

Ctrl-Alt-B
Displays the Breakpoints dialog, where you can add and modify breakpoints

Ctrl-Alt-C
Displays the Call Stack window to display a list of all active procedures or stack frames for the current thread of execution. Available only in break mode

Ctrl-Shift-F9
Clears all of the breakpoints in the project

Ctrl-Alt-D
Displays the Disassembly window

Ctrl-F9
Enables or disables the breakpoint on the current line of code. The line must already have a breakpoint for this to work

Ctrl-Alt-E
Displays the Exceptions dialog

Ctrl-Alt-I
Displays the Immediate window, where you can evaluate expressions and execute individual commands

Ctrl-Alt-V, L
Displays the Locals window to view the variables and their values for the currently selected procedure in the stack frame

Ctrl-Alt-M, 1
Displays the Memory 1 window to view memory in the process being debugged. This is particularly useful when you do not have debugging symbols available for the code you are looking at. It is also helpful for looking at large buffers, strings, and other data that does not display clearly in the Watch or Variables window

Ctrl-Alt-M, 2
Displays the Memory 2 window

Ctrl-Alt-M, 3
Displays the Memory 3 window

Ctrl-Alt-M, 4
Displays the Memory 4 window

Ctrl-Alt-U
Displays the Modules window, which allows you to view the .dll or .exe files loaded by the program. In multiprocess debugging, you can right-click and select Show Modules for all programs

Ctrl-B
Opens the New Breakpoint dialog

Ctrl-Alt-Q
Displays the Quick Watch dialog with the current value of the selected expression. Available only in break mode. Use this command to check the current value of a variable, property, or other expression for which you have not defined a watch expression

Ctrl-Alt-G
Displays the Registers window, which displays CPU register contents

Ctrl-Shift-F5
Terminates the current debugging session, rebuilds if necessary, and then starts a new debugging session. Available in break and run modes

Ctrl-Alt-N
Displays the Running Documents window that displays the set of HTML documents that you are in the process of debugging. Available in break and run modes

Ctrl-F10
Starts or resumes execution of your code and then halts execution when it reaches the selected statement. This starts the debugger if it is not already running

Ctrl-Shift-F10
Sets the execution point to the line of code you choose

Alt-NUM *
Highlights the next statement to be executed

F5
If not currently debugging, this runs the startup project or projects and attaches the debugger. If in break mode, this allows execution to continue (i.e., it returns to run mode).

Ctrl-F5
Runs the code without invoking the debugger. For console applications, this also arranges for the console window to stay open with a "Press any key to continue" prompt when the program finishes

F11
Executes code one statement at a time, tracing execution into function calls

Shift-F11
Executes the remaining lines of a function in which the current execution point lies

F10
Executes the next line of code but does not step into any function calls

Shift-F5
Available in break and run modes, this terminates the debugging session

Ctrl-Alt-V, T
Displays the This window, which allows you to view the data members of the object associated with the current method

Ctrl-Alt-H
Displays the Threads window to view all of the threads for the current process

F9
Sets or removes a breakpoint at the current line

Ctrl-F11
Displays the disassembly information for the current source file. Available only in break mode

Ctrl-Alt-W, 1
Displays the Watch 1 window to view the values of variables or watch expressions

Ctrl-Alt-W, 2
Displays the Watch 2 window

Ctrl-Alt-W, 3
Displays the Watch 3 window

Ctrl-Alt-W, 4
Displays the Watch 4 window

Ctrl-Alt-P
Displays the Processes dialog, which allows you to attach or detach the debugger to one or more running processes 

Windows XP - Secrets

Deleting System Software:

XP hides some system software you might want to remove, such as Windows Messenger, but you can tickle it and make it disgorge everything. Using Notepad or Edit, edit the text file /windows/inf/ sysoc.inf, search for the word 'hide' and remove it. You can then go to the Add or Remove Programs in the Control Panel, select Add/Remove Windows Components and there will be your prey, exposed and vulnerable.

Creating Shutdown Icon or One Click Shutdown:

Navigate to your desktop. On the desktop, right-click and go to New, then to Shortcut (in other words, create a new shortcut). You should now see a pop-up window instructing you to enter a command line path.

Use this path in "Type Location of the Item"

SHUTDOWN -s -t 01

If the C: drive is not your local hard drive, then replace "C" with the correct letter of the hard drive. Click the "Next" button. Name the shortcut and click the "Finish" button. Now whenever you want to shut down, just click on this shortcut and you're done.

Increasing Band-Width By 20%:

Microsoft reserves 20% of your available bandwidth for their own purposes like Windows Updates and interrogating your PC etc

To get it back:

Click Start then Run and type " gpedit.msc" without quotes.This opens the group policy editor. Then go to:

Local Computer Policy then Computer Configuration then Administrative Templates then Network then QOS Packet Scheduler and then to Limit Reservable Bandwidth.

Double click on Limit Reservable bandwidth. It will say it is not configured, but the truth is under the 'Explain' tab i.e."By default, the Packet Scheduler limits the system to 20 percent of the bandwidth of a connection, but you can use this setting to override the default."

So the trick is to ENABLE reservable bandwidth, then set it to ZERO. This will allow the system to reserve nothing, rather than the default 20%.It works on Win 2000 as well.

Renaming The Recycle Bin icon:

To change the name of the Recycle Bin desktop icon, click Start then goto Run, write Regedit and press Enter. It opens Registry Editor. Now in Registry Editor go to:

HKEY_CLASSES_ ROOT/CLSID/ {645FF040- 5081-101B- 9F08-00AA002F954 E}

and change the name "Recycle Bin" to whatever you want (don't type any quotes).

Managing Tasks:

You can at last get rid of tasks on the computer from the command line by using 'taskkill /pid' and the task number, or just 'tskill' and the process number. Find that out by typing 'tasklist', which will also tell you a lot about what's going on in your system.

Removing Shared Documents folder From My Computer window:

Open registry editor by going to Start then Run and entering regedit. Once in registry, navigate to key

 

HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Explorer \ My Computer \ NameSpace \ DelegateFolders

You must see a  sub-key named {59031a47-3f72- 44a7-89c5- 5595fe6b30ee} . If you delete this key, you have effectively removed the my shared documents folder.

Making Google the Default Search Engine in Internet Explorer:

Open registry editor by going to Start then Run and entering  regedit and navigate to following three keys separately and change it as shown below:

[HKEY_CURRENT_ USER\Software\ Microsoft\ Internet Explorer\Main]

"Search Page"=" http://www.google. com"

"Search Bar"=" http://www.google. com/ie"

[HKEY_CURRENT_ USER\Software\ Microsoft\ Internet Explorer\SearchURL]

""=" http://www.google. com/keyword/ %s"

[HKEY_LOCAL_ MACHINE\SOFTWARE \Microsoft\ Internet Explorer\Search]

"SearchAssistant" =" http://www.google. com/ie" .

Improving the Slow Boot up time:

There are a variety of reasons why your windows XP system would boot slowly. Most of the times it this has to do with the startup applications. If you would like to speed up the bootup sequence, consider removing some of the startup applications that you do not need. Easiest way to remove startup apps is through System Configuration Utility. Go to Start then Run and enter MSCONFIG and go to the Startup tab. Deselect/UnCheck application( s) that you do not want to startup at boot time

Customize Logon prompt with your Own Words:

Open Registry by going to Start then Run, entering regedit and Navigate to [HKEY_LOCAL_ MACHINE\SOFTWARE \Microsoft\ Windows NT\CurrentVersion\ Winlogon] . In right pane, look for key by the name "LogonPrompt" . Set its value to whatever text you want to see displayed at login screen

 

IP address of your connection:

Go to Start then Run. Enter 'cmd' and then enter 'ipconfig' .Add the '/all' switch for more info .

Making Folders Private:

Open My Computer Double-click the drive where Windows is installed (usually drive (C:), unless you have more than one drive on your computer). If the contents of the drive are hidden, under System Tasks, click Show the contents of this drive.

Double-click the Documents and Settings folder. Double-click your user folder. Right-click any folder in your user profile, and then click Properties. On the Sharing tab, select the Make this folder private so that only I have access to it check box.

To change Drive Letters:

Go to Start > Control Panel > Administrative Tools > Computer Management, Disk Management, then right-click the partition whose name you want to change (click in the white area just below the word "Volume") and select "change drive letter and paths."

From here you can add, remove or change drive letters and paths to the partition.

Removing the Shortcut arrow from Desktop Icons:

Goto Start then Run and Enter regedit. Navigate to HKEY_CLASSES_ ROOTlnkfile. Delete the IsShortcut registry value. You may need to restart Windows XP

 

Get Drivers for your Devices:

Visit Windows Update (XP Only)

Look at the left hand pane and under Other Options click Personalize Windows Update.

Now in the right hand pane check the box - Display the link to the Windows Update Catalog under See Also

Below Choose which categories and updates to display on Windows Update - make sure you check all the boxes you want shown.

Click Save Settings

Now look in the left hand pane under See Also click Windows Update Catalog and choose what you're looking for. Choose either MS updates or drivers for hardware devices.

Start the Wizard and off you go.

Customize Internet Explorer's Title Bar:

Open Registry by going to Start then Run and Enter regedit. Navigate to HKEY_CURRENT_ USER\Software\ Microsoft\ Internet. Explorer\Main. In right hand panel look for string "Window Title" and change its value to whatever custom text you want to see.

Disabling the use of Win Key:

If your are a gaming freak then you must be sick of the Win key in your keyboard. To disable use of Win key, open registry by going to Start then Run and entering regedit. Navigate to [HKEY_LOCAL_ MACHINE\SYSTEM\ CurrentControlSe t\Control\ Keyboard Layout] . In this look for value of "Scancode Map". Its binary data so be extra careful:

Set its value to "00 00 00 00 00 00 00 00 03 00 00 00 00 00 5B E0 00 00 5C E0 00 00 00 00" to disable the win key.

Restarting Windows without Restarting the Computer:

This one is again is. When you click on the SHUTDOWN button, make sure to simultaneous press SHIFT Button. If you hold the Shift key down while clicking on SHUTDOWN button, you computer would restart without restarting the Computer. This is equivalent to term "HOT REBOOT".

Stopping XP from displaying unread messages count on Welcome Screen:

To stop XP from displaying count of unread messages, Open registry and navigate to [HKEY_CURRENT_ USER\Software\ Microsoft\ Windows\CurrentV ersion\UnreadMai l] and look for the data key "MessageExpiryDays" . If you do not see this key, create one DWORD key by the name "MessageExpiryDays" . Setting its value to 0 would stop Windows XP from displaying the count of unread messages.

Modify Color Selection of Default Theme:

Open registry by going to Start then Run. Entering regedit, navigate to [HKEY_USERS\ .DEFAULT\ Software\ Microsoft\ Windows\CurrentV ersion\ThemeMana ger] and locate the key "ColorName".

Right Click on it and select modify its value from "NormalColor" to "Metallic"

Click Ok, and exit regedit and restart your computer.

Removing the Recycle Bin from the Desktop:

If you don't use the Recycle Bin to store deleted files , you can get rid of its desktop icon all together. Run Regedit and go to: 

HKEY_LOCAL_MACHINE/ SOFTWARE/ Microsoft/ Windows/CurrentV ersion/explorer/ Desktop/NameSpace 

Remote Debugging

1. Examine the exe to debug in dependency walker. Again recursively check the dependencies in dependency walker of the found binaries.

 

2. Build all binaries in debug mode.

 

3. Copy the exe and dlls to appropriate folder in remote machine. You can copy all the debug binaries on remote machine.

 

4.i. Copy the msvcp80d.dll, msvcr80d.dll and msvcm80d.dll binaries from c:\windows\winsxs\x86_microsoft.vc80.debugcrt_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_5490cd9f path to path of these binaries on remote machine. For the correct path see path in dependency walker of the above dlls.

 

ii. Also copy the debug CRT manifest file and cat files for these files from Windows\WinSxs folder.

For example, manifest file for the above path is x86_Microsoft.VC80.DebugCRT_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_5490cd9f.manifest and x86_Microsoft.VC80.DebugCRT_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_5490cd9f.cat.

 

iii. Rename the files to simply Microsoft.VC80.DebugCRT.menifest and Microsoft.VC80.DebugCRT.cat.

 

5. Install msvsmon.exe from C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\Remote Debugger\x86 on remote machine and configure it for no authentication.

 

6. In Visual studio, open attach process window and select "Remote (Native only with no authentication)" and give IP address of the remote machine. The remote processes will appear in the process list. Attach the needed process and start debugging.