Sunday, December 30, 2007

How to Write a Windows XP Driver

How to Write a Windows XP Driver

Summary: This document describes the steps you should take to create a Microsoft® Windows® XP driver for your device.

To create a Windows XP device driver:

1. Install the current Windows DDK. Read the system requirements and installation instructions in the stand-alone Getting Started HTML file supplied with the DDK.

2. Read Getting Started with Windows Drivers. This document guides you through the planning and decision-making process involved in making a Windows device driver from design through distribution. You should also look through the DDK documentation for device-type-specific information.

The DDK documentation set has the following device-type-specific nodes:
· Battery Devices
· Display and Print Devices
· IEEE 1284.4 Devices
· Interactive Input Devices
· Modem Devices
· Multifunction Devices
· Network Devices and Protocols
· Parallel Ports and Devices
· Serial Ports and Devices
· Smart Card Devices
· Still Image Devices
· Storage Devices
· Streaming Devices (Video and Audio)
· Devices Requiring VDDs

3. IDE bus are described in System Support for Buses. Driver development for most device types also requires a strong understanding of Windows operating system fundamentals, which are described in Kernel-Mode Driver Architecture.

4. Look through the driver source code provided with the DDK for a sample that represents your device type. Use the sample code where possible, modifying it for your device's specifics.

5. The sample code can enhance your understanding of Windows XP driver implementation requirements and speed your development time.

6. Compile and build your driver. This should be done using the Build utility and not some other compiler, because the Build utility has certain features that are necessary for driver development.

7. Obtain a checked build of Windows XP, so that you can test and debug your driver using free and checked system builds.

8. The checked build of Windows XP provides extensive kernel-mode debugging capabilities not available in the free build.

9. Create an INF file so that you can install and test your driver.

10. Test and debug your driver. You should use Driver Verifier, a program that puts your driver through a variety of tests, stresses, and deliberate failures in order to test its response and reliability in many extreme situations. You should also use a debugger. Microsoft provides several powerful debuggers that can monitor and debug kernel-mode and user-mode drivers. Using Driver Verifier in conjunction with these debuggers, on both the checked and free versions of the operating system, can be a powerful way to test your driver.

11. Provide an installation package so that customers can install devices that use your driver.

12. Submit your driver and installation package to Microsoft so that it can be digitally signed.
There are many resources available to you while developing your driver. The following sites describe some of the support available to you:
a. http://www.microsoft.com/ddk describes how to obtain the current DDK and provides other information, such as a driver development reading list.
b. http://www.microsoft.com/hwdev provides information, such as device-type-specific white papers and late-breaking news, and a list of resources available to driver developers.
c. http://support.microsoft.com/support/ddk contains DDK product support information.

Source: Microsoft Corporation July 2001

Saturday, December 22, 2007

Formatting A HDD when Fdisk wont work!

Formatting A HDD when Fdisk wont work!

This was originally posted by andro11meda in Hardware and Networking Support. It worked so well for me on a problem-computer that I was working on that I had to post it in tutorials. Thanks andro11meda!!
***
This is my favorite way to wipe it clean:

CAUTION: This debug script is for advanced users only. Its Purpose is to remove all formatting and partitioning information from your hard disk when FDISK is unable to do so.

THIS WILL REMOVE ALL DATA AND PROGRAMS FORM THE DRIVE.

1. Create a MSDOS bood disk with Debug

2. At DOS command prompt type the following: Debug[Enter] (Where enter is to press the enter key once)

NOTE: Type the following bolded text only. You will recieve an error if you type anything other than the bold text. The non-bolded text represents what will appear on you screen once you press [Enter] after each command.

-F 200 L1000 0 [Enter]
-A CS:100 [Enter]
xxxx:0100 MOV AX,301 [Enter]
xxxx:0103 MOV BX,200 [Enter]
xxxx:0106 MOV CX,1 [Enter]
xxxx:0109 MOV DX,80 [Enter]

NOTE: ( --- "80" for hd0, "81" for hd1)
xxxx:010c INT 13 [Enter]
xxxx: 010e INT 20 [Enter]
xxxx: 0110 [Enter]

-G [Enter]
"Program terminated normally"

3. Turn off the computer. On the next startup the hard drive will need to be partitioned and formatted.
***

Wednesday, December 19, 2007

Change Text on XP start button

Change Text on XP start button

Step 1 - Modify Explorer.exe File

In order to make the changes, the file explorer.exe located at C:\Windows needs to be edited. Since explorer.exe is a binary file it requires a special editor. For purposes of this article I have used Resource Hacker. Resource HackerTM is a freeware utility to view, modify, rename, add, delete and extract resources in 32bit Windows executables and resource files (*.res). It incorporates an internal resource script compiler and decompiler and works on Microsoft Windows 95/98/ME, Windows NT, Windows 2000 and Windows XP operating systems.

get this from http://delphi.icm.edu.pl/ftp/tools/ResHack.zip

The first step is to make a backup copy of the file explorer.exe located at C:\Windows\explorer. Place it in a folder somewhere on your hard drive where it will be safe. Start Resource Hacker and open explorer.exe located at C:\Windows\explorer.exe.

The category we are going to be using is "String Table". Expand it by clicking the plus sign then navigate down to and expand string 37 followed by highlighting 1033. If you are using the Classic Layout rather than the XP Layout, use number 38. The right hand pane will display the stringtable. We’re going to modify item 578, currently showing the word “start” just as it displays on the current Start button.

There is no magic here. Just double click on the word “start” so that it’s highlighted, making sure the quotation marks are not part of the highlight. They need to remain in place, surrounding the new text that you’ll type. Go ahead and type your new entry. In my case I used Click Me!

You’ll notice that after the new text string has been entered the Compile Script button that was grayed out is now active. I won’t get into what’s involved in compiling a script, but suffice it to say it’s going to make this exercise worthwhile. Click Compile Script and then save the altered file using the Save As command on the File Menu. Do not use the Save command – Make sure to use the Save As command and choose a name for the file. Save the newly named file to C:\Windows.


Step 2 – Modify the Registry

!!!make a backup of your registry before making changes!!!

Now that the modified explorer.exe has been created it’s necessary to modify the registry so the file will be recognized when the user logs on to the system. If you don’t know how to access the registry I’m not sure this article is for you, but just in case it’s a temporary memory lapse, go to Start (soon to be something else) Run and type regedit in the Open field. Navigate to:

HKEY_LOCAL_MACHINE\ SOFTWARE\ Microsoft\ Windows NT\ CurrentVersion\ Winlogon

In the right pane, double click the "Shell" entry to open the Edit String dialog box. In Value data: line, enter the name that was used to save the modified explorer.exe file. Click OK.

Close Registry Editor and either log off the system and log back in, or reboot the entire system if that’s your preference. If all went as planned you should see your new Start button with the revised text.

Sunday, December 16, 2007

Tweaks for Windows XP

Tweaks for Windows XP

1. Speedup the Start menu
The Start menu takes quite a while to display the list of programs installed. In order to get Windows XP to display the list faster, you will have to edit the registry settings. But before you set about doing this, remember to back up your registry before making any changes. To speed up your Start menu, go to Start > Run and type regedit. This will open the registry window. Then navigate to the following key: HKEY_CURRENT_USER\Control Panel\Desktop folder. Thereafter, scroll down in the right panel and double-click on the menu ‘Show Delay File’. In the Value Data box, change the default value for the menu speed from 400 to a lesser number, such as 1 or even 0. Click OK. You should now find a significant increase in the Start menu speed.

2. Modifying visual settings
If you have only 128 MB RAM, your machine might be a bit sluggish after installing Windows XP. So to achieve optimal performance without buying additional RAM, disable certain visual settings and free up some precious memory. Go to the Control Panel, click on the Advanced tab in System, and choose Settings under the Performance option. Change various graphical effects. Uncheck the animation and shadow options as they tend to consume a lot of memory. You should get a better response from your OS now without spending any money on RAM.

3. Grouping/ungrouping taskbar items
Try opening more than three windows of any program, for instance Internet Explorer, and you will see them automatically grouped together under a single button. This happens because Windows XP, by default, enables the option for grouping similar programs on the taskbar.
To uncheck this option, right-click on a blank area of the Taskbar and select Properties.
Under Properties, deselect ‘Group Similar Taskbar Buttons’, and then click OK.

If you want to specify the number of windows before Window XP groups the program windows, you will have to navigate to the registry key

HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Explorer\Advanced\Taskbar Groupsize. Now right-click on Taskbar Groupsize and change the hexadecimal value to whatever you like (for example, 4 or 5 or even 10).

XP will now group the programs according to the number you set.

4. Disabling Automatic Windows Update and System Restore

There are certain services such as Windows Update and System Restore, which are automatically loaded and occupy a lot of space.
If you would like to disable them, right-click on My Computer and choose Properties.
Click on the System Restore tab and check the box ‘Turn off System Restore’.
This will increase Windows performance and save disk space.
Similarly, locate the ‘Automatic Update’ option just next to ‘System Restore’. This option will periodically ask you to update the OS.
You can go ahead and disable this, but remember that you will have to update Windows manually after applying this option since there will be no reminders.

5. Creating personal screensavers
You can use your photographs for creating slide show presentations or even creating a screensaver.
Right-click an empty spot on your desktop, choose Properties, and click the Screensaver tab.
In the Screensaver list, click on ‘My Pictures Slideshow’, and click ‘Settings’ to make any adjustments such as how often the pictures should change, their size and whether you would like to use transition effects between pictures.
Click OK to finish.
The screensaver that will now be generated will display photographs from the My Picturesfolder in a random manner.

6. Increasing connection speed
Some of us may find that after installing Windows XP, the Internet connection gets slower. A possible reason for this is the QoS (Quality of Service) installed. This service reserves 20 per cent of the bandwidth for itself, even with QoS disabled.
In order to remove this reserved quota, you will have to make sure you are logged on as Administrator.
Go to Start > Run and type gpedit.msc.
Expand the ‘local computer policy’ branch, the ‘administrative templates’ branch, and the ‘network’ branch.
Highlight the ‘QoS Packet Scheduler’ in the left window and in the right window double-click the ‘limit reservable bandwidth’ setting.
Then, on the Setting tab, check the ‘enabled’ item and change the ‘Bandwidth limit %’ to read 0.
After doing this, you should immediately notice a boost in your Internet connection speed.

7. Bridging connections
If you’d like to connect two or more computers via LAN, then you should utilise the Network Bridge option provided in Windows XP. There is no configuration required and you do not need to purchase additional hardware such as routers or bridges. IP addressing, address allocation, and name resolution is highly simplified in a single subnet IP network. To use this feature you will have to open Network Connections. Under LAN or High-Speed Internet, select each of the private network connections that you want to be part of the bridge. Right-click one of the highlighted private network connections and click Bridge Connections.

8. Removing MSN Messenger
How do you remove MSN Messenger in Windows XP?
Not from the Add/Remove program list but by locating SYSOC.INF in the \Windows\INF folder (hidden file and folder).
Open it in Notepad and locate the line: msmsgs=msgrocm.dll,OcEntry,msmsgs.inf,hide,
Remove the word ‘hide’ from the line and save the file.
After making the necessary changes, you’ll be able to see MSN Messenger in the Add/Remove Windows components list.
You can then remove it for good.

9. Renaming multiple batch filesIn Windows XP,
you can easily rename multiple files at a single go and save a lot of time.
Click Start and click My Pictures or the folder where you have saved the pictures.
Switch the view from the default Filmstrip to Thumbnails by clicking the Views button on the toolbar.
Select all the pictures you want to rename by highlighting the last picture you want, then press and hold down the [Shift] key until you include all the pictures that have to be renamed, ending with the first picture in the list.
Right-click the first picture, and then click Rename.
Rename the first picture, and then click in the white space next to one of the pictures.
The pictures are renamed all at once!

10. Creating boot-up disk
In order to create a bootable floppy disk in XP, insert a floppy and go to the floppy icon in My Computer. There you will have to right-click the floppy drive icon and click on the Format option.
You will see the option ‘Create MS-DOS Start up Disk’.
After creating the boot up disk, you will be able to boot into Windows XP using this disk.

Troubleshoot Unknown Devices Listed In Device Manager..

Troubleshoot Unknown Devices Listed In Device Manager..
Unknown Device Identifier is a small freeware from Huntersoft which Identifies unknown devices not recognized by Windows and search workable drivers on the Internet and contact hardware manufacturer or vender directly.It comes handy when you reinstall your system and cannot figure out what all those yellow question mark labeled devices in device manager really are.Unknown Device Identifier is a very good and powerfull software. It's easy to use and helpful to those who need to install unknown device drivers in thier system.
Download Unknown Device Identifier:
http://www.zhangduo.com/UnknownDeviceIdentifier.exe
Please scan the file before running the same..

Method to Reinstall Internet Explorer 6.0

Method to Reinstall Internet Explorer 6.0

To do so follow these steps:
Insert the Windows XP CD in your CD drive.
Open Start / Run and type:

rundll32.exe setupapi,InstallHinfSection DefaultInstall 132 c:\windows\inf\ie.inf
(in one long line. Just copy/paste the above entry)

Press ENTER

You can also use the I386 folder from the CD, just copy it to your HD, but make sure you change the installation path to the new location.

Thursday, December 13, 2007

Change the default Location for Installing Apps

Change the default Location for Installing Apps

As the size of hardrives increase, more people are using partitions to seperate and store groups of files.

XP uses the C:\Program Files directory as the default base directory into which new programs are installed. However, you can change the default installation drive and/ or directory by using a Registry hack.

Run the Registry Editor (regedit)and go to

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion

Look for the value named ProgramFilesDir. by default,this value will be C:\Program Files. Edit the value to any valid drive or folder and XP will use that new location as the default installation directory for new programs.