OT: .Net(?) Used to Create a Win2K/XP RamDrive and Control Panel Properties Dialog



http://www.codeguru.com/Cpp/W-P/system/devicedriverdevelopment/article.php/c5789/

I'm not sure if the WinDDK is what you would call .Net. The
link above is NOT VB6 (nor any other BASIC). The link
does provide a working RAM drive for XP systems (and I
believe Win2K as well, but I only tested on XPSP2). It also
provides a DLL to manage the size and drive letter for the
RAM drive. Both the ramdisk.sys and the ramdisk.dll come
with source code and whatever language it's called, it's some
sort of C++ with extern "C" implementations.

Also, I changed the name of ramdisk.sys to ramdisk1.sys so it
wouldn't interfere with XP SP2 ramdisk.sys (in case of SFC
protection). I modified the ramdisk.inf file to use the renamed
ramdisk1.sys during it's installation and it worked great without
a glitch.

The modified ramdisk.inf file is posted under my sig.

I couldn't get the RAMDisk supplied with ServicePack2 for
XP to work and gave up on that.

So if anyone wants to create a RamDrive...
1) Grab the files (binary and source code) from the link above,
2) Unpack the files,
3) Rename the ramdisk.sys to ramdisk1.sys,
4) Open the ramdisk.inf file and copy the stuff below over
everything, or just do a search and replace ...
search: ramdisk.sys
replace: ramdisk1.sys
5) Follow the steps at the link above for the rest of the install.

Hope this is worthwhile for anyone that wanted to set up a
RAM drive.

--
Jim Carlock
Please post replies to newsgroup.

; RAMDISK.INF
; Windows 2000 installation file for installing the Ramdisk driver
; Copyright (c) 1990-2000 Microsoft Corporation All rights Reserved
; Copyright (c) 2002 QSoft [ Quality Software ]

[Version]
Signature="$WINDOWS NT$"
Class=RamDisk
ClassGuid={FFA1C341-4539-11D3-B88D-00C04FAD5172}
Provider=%QSOFT%
DriverVer=09/30/2002,5.00.0001.0

[DestinationDirs]
DefaultDestDir = 12
RamDiskInstaller=11

[ClassInstall32]
Addreg=RamDiskClassReg
CopyFiles=RamDiskInstaller

[RamDiskClassReg]
HKR,,,0,%ClassName%
; If we don't provide our own Installer32, ICON's from "SETUPAPI.DLL" will be selected
; HKR,,Icon,,-5
; HKR,,Icon,,-159

HKR,,Installer32,,"RAMDisk.dll,ClassInstaller"
HKR,,Icon,,"105"
HKR,,EnumPropPages32,,"RAMDisk.dll,PropPageProvider"

[RamDiskInstaller]
RAMDisk.dll,,,%COPYFLG_NOSKIP%
msvcr70.dll,,,%COPYFLG_NOSKIP%
mfc70u.dll,,,%COPYFLG_NOSKIP%

[DiskCopyfiles]
ramdisk1.sys
ramdisk.dll

[SourceDisksNames]
1=%InstDisk%,

[SourceDisksFiles]
ramdisk1.sys=1

[Manufacturer]
%QSOFT% = DiskDevice

[DiskDevice]
%DiskDevDesc% = DiskInstall, Ramdisk

[DiskInstall.NT]
CopyFiles = DiskCopyfiles

[DiskInstall.NT.Services]
AddService = Ramdisk, %SPSVCINST_ASSOCSERVICE%, DiskServiceInst

[DiskServiceInst]
ServiceType = %SERVICE_KERNEL_DRIVER%
StartType = %SERVICE_BOOT_START%
ErrorControl = %SERVICE_ERROR_NORMAL%
DisplayName = %DiskServiceDesc%
ServiceBinary = %12%\ramdisk1.sys
AddReg = DiskAddReg

[DiskAddReg]
HKR, "Parameters", "BreakOnEntry", %REG_DWORD%, 0x00000000
HKR, "Parameters", "DebugLevel", %REG_DWORD%, 0x00000005
HKR, "Parameters", "DebugComp", %REG_DWORD%, 0xFFFFFFFF
HKR, "Parameters", "DiskSize", %REG_DWORD%, 0x00320000
HKR, "Parameters", "DriveLetter", %REG_SZ%, "Z:"
HKR, "Parameters", "RootDirEntries", %REG_DWORD%, 0x00000200
HKR, "Parameters", "SectorsPerCluster", %REG_DWORD%, 0x00000002

[Strings]
QSOFT = "QSoft"
ClassName = "RAM Disk"
DiskDevDesc = "Ramdisk [ QSoft ]"
DiskServiceDesc = "Ramdisk [ QSoft ]"
InstDisk = "Ramdisk Install Disk"
;*******************************************
;Handy macro substitutions (non-localizable)
SPSVCINST_ASSOCSERVICE = 0x00000002
SERVICE_KERNEL_DRIVER = 1
SERVICE_BOOT_START = 0
SERVICE_ERROR_NORMAL = 1
REG_DWORD = 0x00010001
REG_SZ = 0x00000000
COPYFLG_NOSKIP = 2


.



Relevant Pages

  • Re: IE 6 cant open *some* websites
    ... >something in common with the sites I can't get to. ... >you view the source code for a few of them to see if ... >after installing the latest security update that I have ... >repair installation of XP solely from the windows/I386 ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: 9.1 register??
    ... > look like installation, 2 probably source code?) ... SUSE ... for registering. ...
    (alt.os.linux.suse)
  • Re: Build engineer (QA and testing)
    ... > build/release engineer where source code version control,configruation ... - create an installation process to place all the binaries on an operating ... darrell dot grainger at utoronto dot ca ...
    (comp.software.testing)
  • Re: Installation Questions
    ... I boot my computer up first in an OS called ... > desktop in the Magic OS which then runs the Linux installation ramdisk ... > soon get the screen which asks for what language I want the installation ... > If I use the newer kernels, the ramdisk loads, but I get no video. ...
    (comp.os.linux.misc)
  • Re: Installation Questions
    ... >Are you booting Linux? ... With my older Kernel the ramdisk runs and I soon ... get the screen which asks for what language I want the installation to be in. ...
    (comp.os.linux.misc)