Skip to content

Commit

Permalink
Continue to implement Mile.Cirno with Mile.Cirno.Dokany.
Browse files Browse the repository at this point in the history
  • Loading branch information
MouriNaruto committed Jul 2, 2024
1 parent 7e08a13 commit 90f2318
Showing 1 changed file with 45 additions and 6 deletions.
51 changes: 45 additions & 6 deletions Mile.Cirno/Mile.Cirno.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,70 @@
#include <cstdio>
#include <cwchar>

NTSTATUS DOKAN_CALLBACK MileCirnoZwCreateFile(
_In_ LPCWSTR FileName,
_In_ PDOKAN_IO_SECURITY_CONTEXT SecurityContext,
_In_ ACCESS_MASK DesiredAccess,
_In_ ULONG FileAttributes,
_In_ ULONG ShareAccess,
_In_ ULONG CreateDisposition,
_In_ ULONG CreateOptions,
_In_ PDOKAN_FILE_INFO DokanFileInfo)
{
UNREFERENCED_PARAMETER(FileName);
UNREFERENCED_PARAMETER(SecurityContext);
UNREFERENCED_PARAMETER(DesiredAccess);
UNREFERENCED_PARAMETER(FileAttributes);
UNREFERENCED_PARAMETER(ShareAccess);
UNREFERENCED_PARAMETER(CreateDisposition);
UNREFERENCED_PARAMETER(CreateOptions);
UNREFERENCED_PARAMETER(DokanFileInfo);
return STATUS_SUCCESS;
}

NTSTATUS DOKAN_CALLBACK MileCirnoFindFiles(
_In_ LPCWSTR FileName,
_In_ PFillFindData FillFindData,
_In_ PDOKAN_FILE_INFO DokanFileInfo)
{
UNREFERENCED_PARAMETER(FileName);
UNREFERENCED_PARAMETER(FillFindData);
UNREFERENCED_PARAMETER(DokanFileInfo);
return STATUS_SUCCESS;
}

int main()
{
DOKAN_OPTIONS Options = { 0 };
Options.Version = DOKAN_VERSION;
Options.SingleThread;
Options.Options;
Options.Options =
DOKAN_OPTION_DEBUG |
DOKAN_OPTION_STDERR |
DOKAN_OPTION_ALT_STREAM |
DOKAN_OPTION_WRITE_PROTECT |
DOKAN_OPTION_MOUNT_MANAGER |
DOKAN_OPTION_CASE_SENSITIVE |
DOKAN_OPTION_DISPATCH_DRIVER_LOGS;
Options.GlobalContext;
Options.MountPoint;
Options.UNCName = nullptr;
Options.MountPoint = L"C:\\Windows\\System32\\HostDriverStore";
Options.UNCName;
Options.Timeout;
Options.AllocationUnitSize;
Options.SectorSize;
Options.VolumeSecurityDescriptorLength;
Options.VolumeSecurityDescriptor;

DOKAN_OPERATIONS Operations = { 0 };
Operations.ZwCreateFile;
Operations.ZwCreateFile = ::MileCirnoZwCreateFile;
Operations.Cleanup;
Operations.CloseFile;
Operations.ReadFile;
Operations.WriteFile;
Operations.FlushFileBuffers;
Operations.GetFileInformation;
Operations.FindFiles;
Operations.FindFilesWithPattern;
Operations.FindFiles = ::MileCirnoFindFiles;
Operations.FindFilesWithPattern = nullptr;
Operations.SetFileAttributesW;
Operations.SetFileTime;
Operations.DeleteFileW;
Expand Down

0 comments on commit 90f2318

Please sign in to comment.