1
0
This repository has been archived on 2025-07-27. You can view files and clone it, but cannot push or open issues or pull requests.
Files
siadrive/SiaDrive.Dokan.Api/SiaDokenDrive.cpp
Scott E. Graves 01453d0006 More Dokan changes
2017-02-10 17:16:09 -06:00

54 lines
999 B
C++

#include "stdafx.h"
#include "SiaDokenDrive.h"
#include <dokan\dokan.h>
#include <dokan\fileinfo.h>
using namespace Sia::Api;
using namespace Sia::Api::Dokan;
static bool s_dokenInitialized = false;
static CSiaDokenDrive* s_dokenDrive = nullptr;
static DOKAN_OPERATIONS s_dokanOps = {0};
static NTSTATUS DOKAN_CALLBACK SiaDrive_ZwCreateFile(
LPCWSTR FileName,
PDOKAN_IO_SECURITY_CONTEXT SecurityContext,
ACCESS_MASK DesiredAccess,
ULONG FileAttributes,
ULONG ShareAccess,
ULONG CreateDisposition,
ULONG CreateOptions,
PDOKAN_FILE_INFO DokanFileInfo)
{
}
CSiaDokenDrive::CSiaDokenDrive(CSiaApi& siaApi) :
_siaApi(siaApi)
{
if (s_dokenDrive)
{
throw SiaDokenDriveException("Sia drive has already been activated");
}
else
{
s_dokenDrive = this;
s_dokanOps.ZwCreateFile = SiaDrive_ZwCreateFile;
}
}
CSiaDokenDrive::~CSiaDokenDrive()
{
Unmount();
s_dokenDrive = nullptr;
}
void CSiaDokenDrive::Mount(const wchar_t& driveLetter)
{
}
void CSiaDokenDrive::Unmount()
{
}