Durch den Header Converter stehe ich zwar nicht mehr bei Null - aber immer noch auf dem Schlauch.
>>> 1.
Code: Alles auswählen
typedef struct _DOKAN_FILE_INFO {
ULONG64 Context; // FileSystem can use this variable
ULONG64 DokanContext; // Don't touch this
ULONG ProcessId; // process id for the thread that originally requested a given I/O operation
BOOL IsDirectory; // requesting a directory file
} DOKAN_FILE_INFO, *PDOKAN_FILE_INFO;
Code: Alles auswählen
Structure DOKAN_FILE_INFO
Context.ULONG64
DokanContext.ULONG64
ProcessId.ULONG
IsDirectory.BOOL
EndStructure
Ich habe nur Infos zu "typedef struct {...} NAME;" gefunden.
>>>2.
Code: Alles auswählen
typedef int (WINAPI *PFillFindData) (PWIN32_FIND_DATAW, PDOKAN_FILE_INFO);
>>>3.
Code: Alles auswählen
typedef struct _DOKAN_OPERATIONS {
// When an error occurs, return negative value.
// Usually you should return GetLastError() * -1.
// CreateFile
// If file is a directory, CreateFile (not OpenDirectory) may be called.
// In this case, CreateFile should return 0 when that directory can be opened.
// You should set TRUE on DokanFileInfo->IsDirectory when file is a directory.
// When CreationDisposition is CREATE_ALWAYS or OPEN_ALWAYS and a file already exists,
// you should return ERROR_ALREADY_EXISTS(183) (not negative value)
int (DOKAN_CALLBACK *CreateFile) (
LPCWSTR, // FileName
DWORD, // DesiredAccess
DWORD, // ShareMode
DWORD, // CreationDisposition
DWORD, // FlagsAndAttributes
//HANDLE, // TemplateFile
PDOKAN_FILE_INFO);
int (DOKAN_CALLBACK *OpenDirectory) (
LPCWSTR, // FileName
PDOKAN_FILE_INFO);
int (DOKAN_CALLBACK *CreateDirectory) (
LPCWSTR, // FileName
PDOKAN_FILE_INFO);
int (DOKAN_CALLBACK *Cleanup) (
LPCWSTR, // FileName
PDOKAN_FILE_INFO);
int (DOKAN_CALLBACK *CloseFile) (
LPCWSTR, // FileName
PDOKAN_FILE_INFO);
int (DOKAN_CALLBACK *ReadFile) (
LPCWSTR, // FileName
LPVOID, // Buffer
DWORD, // NumberOfBytesToRead
LPDWORD, // NumberOfBytesRead
LONGLONG, // Offset
PDOKAN_FILE_INFO);
int (DOKAN_CALLBACK *WriteFile) (
LPCWSTR, // FileName
LPCVOID, // Buffer
DWORD, // NumberOfBytesToWrite
LPDWORD, // NumberOfBytesWritten
LONGLONG, // Offset
PDOKAN_FILE_INFO);
int (DOKAN_CALLBACK *FlushFileBuffers) (
LPCWSTR, // FileName
PDOKAN_FILE_INFO);
int (DOKAN_CALLBACK *GetFileInformation) (
LPCWSTR, // FileName
LPBY_HANDLE_FILE_INFORMATION, // Buffer
PDOKAN_FILE_INFO);
int (DOKAN_CALLBACK *FindFiles) (
LPCWSTR, // PathName
PFillFindData, // call this function with PWIN32_FIND_DATAW
PDOKAN_FILE_INFO); // (see PFillFindData definition)
// You should implement either FindFires or FindFilesWithPattern
int (DOKAN_CALLBACK *FindFilesWithPattern) (
LPCWSTR, // PathName
LPCWSTR, // SearchPattern
PFillFindData, // call this function with PWIN32_FIND_DATAW
PDOKAN_FILE_INFO);
int (DOKAN_CALLBACK *SetFileAttributes) (
LPCWSTR, // FileName
DWORD, // FileAttributes
PDOKAN_FILE_INFO);
int (DOKAN_CALLBACK *SetFileTime) (
LPCWSTR, // FileName
CONST FILETIME*, // CreationTime
CONST FILETIME*, // LastAccessTime
CONST FILETIME*, // LastWriteTime
PDOKAN_FILE_INFO);
int (DOKAN_CALLBACK *DeleteFile) (
LPCWSTR, // FileName
PDOKAN_FILE_INFO);
int (DOKAN_CALLBACK *DeleteDirectory) (
LPCWSTR, // FileName
PDOKAN_FILE_INFO);
int (DOKAN_CALLBACK *MoveFile) (
LPCWSTR, // ExistingFileName
LPCWSTR, // NewFileName
BOOL, // ReplaceExisiting
PDOKAN_FILE_INFO);
int (DOKAN_CALLBACK *SetEndOfFile) (
LPCWSTR, // FileName
LONGLONG, // Length
PDOKAN_FILE_INFO);
int (DOKAN_CALLBACK *LockFile) (
LPCWSTR, // FileName
LONGLONG, // ByteOffset
LONGLONG, // Length
PDOKAN_FILE_INFO);
int (DOKAN_CALLBACK *UnlockFile) (
LPCWSTR, // FileName
LONGLONG,// ByteOffset
LONGLONG,// Length
PDOKAN_FILE_INFO);
// Neither GetDiskFreeSpace nor GetVolumeInformation
// save the DokanFileContext->Context.
// Before these methods are called, CreateFile may not be called.
// (ditto CloseFile and Cleanup)
// see Win32 API GetDiskFreeSpaceEx
int (DOKAN_CALLBACK *GetDiskFreeSpace) (
PULONGLONG, // FreeBytesAvailable
PULONGLONG, // TotalNumberOfBytes
PULONGLONG, // TotalNumberOfFreeBytes
PDOKAN_FILE_INFO);
// see Win32 API GetVolumeInformation
int (DOKAN_CALLBACK *GetVolumeInformation) (
LPWSTR, // VolumeNameBuffer
DWORD, // VolumeNameSize
LPDWORD,// VolumeSerialNumber
LPDWORD,// MaximumComponentLength
LPDWORD,// FileSystemFlags
LPWSTR, // FileSystemNameBuffer
DWORD, // FileSystemNameSize
PDOKAN_FILE_INFO);
int (DOKAN_CALLBACK *Unmount) (
PDOKAN_FILE_INFO);
} DOKAN_OPERATIONS, *PDOKAN_OPERATIONS;
Code: Alles auswählen
Structure DOKAN_OPERATIONS
EndStructure
Eine Übersetzung wäre natürlich toll. Ich bin aber auch für jeden Tipp wie der C-Code zu interpretieren ist dankbar.