BoxedAppSDK_CreateVirtualFile

Description

The function creates a virtual file whose contents are stored in shared memory and are accessible to all attached processes. The parameters of BoxedAppSDK_CreateVirtualFile are similar to those of the WinAPI function CreateFile.

For more details on the concept of virtual files, see Virtual File System.

Syntax

HANDLE __stdcall BoxedAppSDK_CreateVirtualFile(
  LPCTSTR szPath,
  DWORD dwDesiredAccess,
  DWORD dwShareMode,
  LPSECURITY_ATTRIBUTES lpSecurityAttributes,
  DWORD dwCreationDisposition,
  DWORD dwFlagsAndAttributes,
  HANDLE hTemplateFile
);
function BoxedAppSDK_CreateVirtualFile(
  lpFileName: PAnsiChar;
  dwDesiredAccess, dwShareMode: Integer;
  lpSecurityAttributes: PSecurityAttributes;
  dwCreationDisposition, dwFlagsAndAttributes: DWORD;
  hTemplateFile: THandle
): THandle; stdcall;
 
function BoxedAppSDK_CreateVirtualFileA(
  lpFileName: PAnsiChar;
  dwDesiredAccess, dwShareMode: Integer;
  lpSecurityAttributes: PSecurityAttributes;
  dwCreationDisposition, dwFlagsAndAttributes: DWORD;
  hTemplateFile: THandle
): THandle; stdcall;
 
function BoxedAppSDK_CreateVirtualFileW(
  lpFileName: PWideChar;
  dwDesiredAccess, dwShareMode: Integer;
  lpSecurityAttributes: PSecurityAttributes;
  dwCreationDisposition, dwFlagsAndAttributes: DWORD;
  hTemplateFile: THandle
): THandle; stdcall;

Parameters

lpFileName
Specifies the name (relative or full path) of the virtual file to be created.

dwDesiredAccess
Specifies the type of access requested to the virtual file (read, write, etc.).

dwShareMode
Specifies the sharing mode of the virtual file.

lpSecurityAttributes
Pointer to a SECURITY_ATTRIBUTES structure that optionally specifies a security descriptor and determines whether the file handle can be inherited by child processes.
Currently, BoxedApp ignores this parameter.

dwCreationDisposition
Specifies the action to take on a virtual file that already exists or does not exist.

dwFlagsAndAttributes
Combination of FILE_FLAG_* and FILE_ATTRIBUTE_* values. You can pass 0.

See Also