Skip to content

Commit

Permalink
2.0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
LTRData committed Mar 25, 2020
1 parent 4a75444 commit 8e5aedc
Show file tree
Hide file tree
Showing 30 changed files with 8,455 additions and 7,733 deletions.
Binary file modified cpl/amd64/imdisk.exp
Binary file not shown.
Binary file modified cpl/amd64/imdisk.lib
Binary file not shown.
Binary file modified cpl/i386/imdisk.exp
Binary file not shown.
Binary file modified cpl/i386/imdisk.lib
Binary file not shown.
Binary file modified cpl/ia64/imdisk.exp
Binary file not shown.
Binary file modified cpl/ia64/imdisk.lib
Binary file not shown.
30 changes: 30 additions & 0 deletions cpl/imdisk.cpl.manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
version="1.0.0.0"
processorArchitecture="*"
name="LTR.ImDisk.CPlApplet"
type="win32"
/>
<description>ImDisk Virtual Disk Driver</description>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="highestAvailable"
uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>
Binary file modified cplcore/amd64/imdisk.exp
Binary file not shown.
Binary file modified cplcore/amd64/imdisk.lib
Binary file not shown.
Binary file modified cplcore/i386/imdisk.exp
Binary file not shown.
Binary file modified cplcore/i386/imdisk.lib
Binary file not shown.
Binary file modified cplcore/ia64/imdisk.exp
Binary file not shown.
Binary file modified cplcore/ia64/imdisk.lib
Binary file not shown.
12 changes: 12 additions & 0 deletions devio/devio.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup />
<ItemDefinitionGroup>
<ClCompile>
<PreprocessorDefinitions>_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<ItemGroup />
</Project>
2 changes: 1 addition & 1 deletion imdisk.inf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[Version]
signature = "$Windows NT$"
Provider = "LTR Data"
DriverVer=12/08/2015,6.0.6001.18000
DriverVer=12/14/2015,6.0.6001.18000


[SourceDisksNames]
Expand Down
4 changes: 2 additions & 2 deletions inc/imdiskver.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#define IMDISK_RC_VERSION_STR "2.0.8"
#define IMDISK_RC_VERSION_STR "2.0.9"
#define IMDISK_MAJOR_VERSION 2
#define IMDISK_MINOR_VERSION 0
#define IMDISK_MINOR_LOW_VERSION 8
#define IMDISK_MINOR_LOW_VERSION 9

#define IMDISK_RC_VERSION_FLD IMDISK_MAJOR_VERSION,IMDISK_MINOR_VERSION,IMDISK_MINOR_LOW_VERSION
205 changes: 205 additions & 0 deletions inc/wkmem.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,205 @@
#pragma once

inline void *operator_new(size_t Size, UCHAR FillByte)
{
void * result = ExAllocatePoolWithTag(NonPagedPool, Size, POOL_TAG);

if (result != NULL)
{
RtlFillMemory(result, Size, FillByte);
}

return result;
}

inline void * __CRTDECL operator new(size_t Size)
{
return operator_new(Size, 0);
}

inline void * __CRTDECL operator new[](size_t Size)
{
return operator_new(Size, 0);
}

inline void * __CRTDECL operator new(size_t Size, UCHAR FillByte)
{
return operator_new(Size, FillByte);
}

inline void operator_delete(void *Ptr)
{
if (Ptr != NULL)
{
ExFreePoolWithTag(Ptr, POOL_TAG);
}
}

inline void __CRTDECL operator delete(void * Ptr)
{
operator_delete(Ptr);
}

inline void __CRTDECL operator delete(void * Ptr, size_t)
{
operator_delete(Ptr);
}

inline void __CRTDECL operator delete[](void * Ptr)
{
operator_delete(Ptr);
}

template<typename T, POOL_TYPE pool_type> class WPoolMem
{
protected:
T *ptr;
SIZE_T bytecount;

explicit WPoolMem(T *pBlk, SIZE_T AllocationSize)
: ptr(pBlk),
bytecount(pBlk != NULL ? AllocationSize : 0) { }

public:
operator bool()
{
return ptr != NULL;
}

bool operator!()
{
return ptr == NULL;
}

operator T*()
{
return ptr;
}

T* operator ->()
{
return ptr;
}

T* operator+(int i)
{
return ptr + i;
}

T* operator-(int i)
{
return ptr - i;
}

T* operator =(T *pBlk)
{
Free();
return ptr = pBlk;
}

SIZE_T Count() const
{
return GetSize() / sizeof(T);
}

SIZE_T GetSize() const
{
return ptr != NULL ? bytecount : 0;
}

void Free()
{
if (ptr != NULL)
{
ExFreePoolWithTag(ptr, POOL_TAG);
ptr = NULL;
}
}

void Clear()
{
if ((ptr != NULL) && (bytecount > 0))
{
RtlZeroMemory(ptr, bytecount);
}
}

T* Abandon()
{
T* ab_ptr = ptr;
ptr = NULL;
bytecount = 0;
return ab_ptr;
}

~WPoolMem()
{
Free();
}

void Initialize(SIZE_T AllocateSize)
{
ptr = (T*)ExAllocatePoolWithTag(pool_type, AllocateSize, POOL_TAG);
bytecount = AllocateSize;
}

public:
WPoolMem() :
ptr(NULL),
bytecount(0) { }

explicit WPoolMem(SIZE_T AllocateSize)
{
Initialize(AllocateSize);
}

T* Alloc(SIZE_T AllocateSize)
{
Free();
Initialize(AllocateSize);
return ptr;
}
};

class WHandle
{
private:
HANDLE h;

public:
operator bool()
{
return h != NULL;
}

bool operator !()
{
return h == NULL;
}

operator HANDLE()
{
return h;
}

void Close()
{
if (h != NULL)
{
ZwClose(h);
h = NULL;
}
}

WHandle() :
h(NULL) { }

explicit WHandle(HANDLE h) :
h(h) { }

~WHandle()
{
Close();
}
};

4 changes: 2 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

ImDisk Virtual Disk Driver for Windows NT/2000/XP/2003/Vista/7/8/8.1.
ImDisk Virtual Disk Driver for Windows NT/2000/XP.

This driver emulates harddisk partitions, floppy drives and CD/DVD-ROM
drives from disk image files, in virtual memory or by redirecting I/O
Expand All @@ -21,7 +21,7 @@
you want to use this product under NT 3.51 you have to manually add the
registry entries for the driver and the service.

Copyright (c) 2005-2015 Olof Lagerkvist
Copyright (c) 2005-2009 Olof Lagerkvist
http://www.ltr-data.se [email protected]

Permission is hereby granted, free of charge, to any person
Expand Down
Loading

0 comments on commit 8e5aedc

Please sign in to comment.