1
0

More Dokan changes

This commit is contained in:
Scott E. Graves
2017-02-10 17:16:09 -06:00
parent 25bb8b7cc9
commit 01453d0006
3 changed files with 40 additions and 6 deletions

View File

@@ -6,7 +6,13 @@
using namespace Sia::Api;
using namespace Sia::Api::Dokan;
static NTSTATUS DOKAN_CALLBACK _ZwCreateFile(
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,
@@ -18,16 +24,31 @@ static NTSTATUS DOKAN_CALLBACK _ZwCreateFile(
{
}
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::InitializeOperations()
void CSiaDokenDrive::Mount(const wchar_t& driveLetter)
{
}
void CSiaDokenDrive::Unmount()
{
}