-
-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
30 changed files
with
8,455 additions
and
7,733 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
@@ -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 | ||
|
Oops, something went wrong.