-
Notifications
You must be signed in to change notification settings - Fork 41
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
Stephen Eckels
committed
Nov 21, 2023
1 parent
e7e45ab
commit 95fa194
Showing
21 changed files
with
6,845 additions
and
29 deletions.
There are no files selected for viewing
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
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
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,10 @@ | ||
#pragma once | ||
|
||
#define DRIVER_POOL_TAG ' xtS' | ||
#define DRIVER_NAME_WITH_EXT L"strace.sys" | ||
#define NT_DEVICE_NAME L"\\Device\\STrace" | ||
#define DOS_DEVICES_LINK_NAME L"\\DosDevices\\STrace" | ||
#define DEVICE_SDDL L"D:P(A;;GA;;;SY)(A;;GA;;;BA)" | ||
|
||
#define IOCTL_LOADDLL CTL_CODE (FILE_DEVICE_UNKNOWN, (0x800 + 0), METHOD_BUFFERED, FILE_SPECIAL_ACCESS) | ||
#define IOCTL_UNLOADDLL CTL_CODE (FILE_DEVICE_UNKNOWN, (0x800 + 1), METHOD_BUFFERED, FILE_SPECIAL_ACCESS) |
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,25 @@ | ||
#include "Interface.h" | ||
|
||
UNICODE_STRING WideToUnicodeString(PCWSTR SourceString) | ||
{ | ||
UNICODE_STRING DestinationString; | ||
|
||
SIZE_T Size; | ||
CONST SIZE_T MaxSize = (MAXUSHORT & ~1) - sizeof(UNICODE_NULL); // an even number | ||
|
||
if (SourceString) | ||
{ | ||
Size = wcslen(SourceString) * sizeof(WCHAR); | ||
if (Size > MaxSize) | ||
Size = MaxSize; | ||
DestinationString.Length = (USHORT)Size; | ||
DestinationString.MaximumLength = (USHORT)Size + sizeof(UNICODE_NULL); | ||
} | ||
else { | ||
DestinationString.Length = 0; | ||
DestinationString.MaximumLength = 0; | ||
} | ||
|
||
DestinationString.Buffer = (PWCHAR)SourceString; | ||
return DestinationString; | ||
} |
Oops, something went wrong.