dll: FspFsctlServiceVersion as public API

This commit is contained in:
Bill Zissimopoulos 2023-08-18 15:50:51 +01:00
parent a482183149
commit de321620fd
2 changed files with 4 additions and 3 deletions

View File

@ -696,6 +696,7 @@ FSP_API NTSTATUS FspFsctlNotify(HANDLE VolumeHandle,
FSP_API NTSTATUS FspFsctlGetVolumeList(PWSTR DevicePath, FSP_API NTSTATUS FspFsctlGetVolumeList(PWSTR DevicePath,
PWCHAR VolumeListBuf, PSIZE_T PVolumeListSize); PWCHAR VolumeListBuf, PSIZE_T PVolumeListSize);
FSP_API NTSTATUS FspFsctlPreflight(PWSTR DevicePath); FSP_API NTSTATUS FspFsctlPreflight(PWSTR DevicePath);
FSP_API NTSTATUS FspFsctlServiceVersion(PUINT32 PVersion);
FSP_API NTSTATUS FspFsctlStartService(VOID); FSP_API NTSTATUS FspFsctlStartService(VOID);
FSP_API NTSTATUS FspFsctlStopService(VOID); FSP_API NTSTATUS FspFsctlStopService(VOID);
FSP_API NTSTATUS FspFsctlEnumServices( FSP_API NTSTATUS FspFsctlEnumServices(

View File

@ -31,8 +31,6 @@ static ULONG FspFsctlServiceVersionValue;
static DWORD FspFsctlTransactCode = FSP_FSCTL_TRANSACT; static DWORD FspFsctlTransactCode = FSP_FSCTL_TRANSACT;
static DWORD FspFsctlTransactBatchCode = FSP_FSCTL_TRANSACT_BATCH; static DWORD FspFsctlTransactBatchCode = FSP_FSCTL_TRANSACT_BATCH;
static VOID FspFsctlServiceVersion(PUINT32 PVersion);
FSP_API NTSTATUS FspFsctlCreateVolume(PWSTR DevicePath, FSP_API NTSTATUS FspFsctlCreateVolume(PWSTR DevicePath,
const FSP_FSCTL_VOLUME_PARAMS *VolumeParams, const FSP_FSCTL_VOLUME_PARAMS *VolumeParams,
PWCHAR VolumeNameBuf, SIZE_T VolumeNameSize, PWCHAR VolumeNameBuf, SIZE_T VolumeNameSize,
@ -423,12 +421,14 @@ exit:
return TRUE; return TRUE;
} }
static VOID FspFsctlServiceVersion(PUINT32 PVersion) FSP_API NTSTATUS FspFsctlServiceVersion(PUINT32 PVersion)
{ {
InitOnceExecuteOnce(&FspFsctlServiceVersionInitOnce, FspFsctlServiceVersionInitialize, 0, 0); InitOnceExecuteOnce(&FspFsctlServiceVersionInitOnce, FspFsctlServiceVersionInitialize, 0, 0);
if (0 != PVersion) if (0 != PVersion)
*PVersion = FspFsctlServiceVersionValue; *PVersion = FspFsctlServiceVersionValue;
return 0 != FspFsctlServiceVersionValue ? STATUS_SUCCESS : STATUS_UNSUCCESSFUL;
} }
static SRWLOCK FspFsctlStartStopServiceLock = SRWLOCK_INIT; static SRWLOCK FspFsctlStartStopServiceLock = SRWLOCK_INIT;