#include "stdafx.h" #include "SiaDokenDrive.h" #include #include 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() { }