BoxedApp SDK Help >> Functions

BoxedAppSDK_CreateVirtualFileBasedOnBuffer

Description

The function creates a Virtual File System with the contents located in the specified buffer. Thus, the contents is both read from the buffer and written to the specified buffer. That file is useful when you need to create a virtual file of an invariable size (in particular, when the file is read-only).

The arguments of BoxedAppSDK_CreateVirtualFileBasedOnBuffer are similar to the arguments of the winapi function CreateFile.

There are ANSI and UNICODE versions (BoxedAppSDK_CreateVirtualFileBasedOnBufferA and BoxedAppSDK_CreateVirtualFileBasedOnBufferW).

Syntax

[ C++ ]
HANDLE __stdcall BoxedAppSDK_CreateVirtualFileBasedOnBuffer(
	LPCTSTR szPath, 
	DWORD dwDesiredAccess,
	DWORD dwShareMode,
	LPSECURITY_ATTRIBUTES lpSecurityAttributes,
	DWORD dwCreationDisposition,
	DWORD dwFlagsAndAttributes,
	HANDLE hTemplateFile, 

	PVOID pBuffer, 
	DWORD dwSize
);

[ Delphi ]
function BoxedAppSDK_CreateVirtualFileBasedOnBuffer(
         lpFileName: PAnsiChar;
         dwDesiredAccess, dwShareMode: Integer;
         lpSecurityAttributes: PSecurityAttributes;
         dwCreationDisposition, dwFlagsAndAttributes: DWORD;
         hTemplateFile: THandle;
         pData: Pointer; 
         dwSize: DWORD): THandle; stdcall;

function BoxedAppSDK_CreateVirtualFileBasedOnBufferA(
         lpFileName: PAnsiChar;
         dwDesiredAccess, dwShareMode: Integer;
         lpSecurityAttributes: PSecurityAttributes;
         dwCreationDisposition, dwFlagsAndAttributes: DWORD;
         hTemplateFile: THandle;
         pData: Pointer; 
         dwSize: DWORD): THandle; stdcall;

function BoxedAppSDK_CreateVirtualFileBasedOnBufferW(
         lpFileName: PWideChar;
         dwDesiredAccess, dwShareMode: Integer;
         lpSecurityAttributes: PSecurityAttributes;
         dwCreationDisposition, dwFlagsAndAttributes: DWORD;
         hTemplateFile: THandle;
         pData: Pointer; 
         dwSize: DWORD): THandle; stdcall;



Copyright © Softanics. All rights reserved.
BoxedApp is a trademark of Softanics.