Driver Paths
set_driver_base_directory
-
int fluxEngine_C_v1_set_driver_base_directory(fluxEngine_C_v1_Handle *handle, char const *directory, fluxEngine_C_v1_Error **error)
Set the driver base directory.
When loading drivers this sets the base directory where the drivers may be found. If this function is not called, or an empty value or
NULL
is passed, the directorydrivers
one level above the directory of the currently running executable will be used. For example, if the executable isC:\App\bin\engine_test.exe
, the default drivers directory would beC:\App\drivers
. (This is the case on all platforms.)Note that if this method is not used the user can also override the default via an environment variable per driver type. (See the introductory documentation for more details.)
The directory specified here must exist, otherwise it will not be used and an error will be raised.
Windows note: this will accept a path in the 8bit local file name encoding, which will not be able to represent all possible Unicode characters that may be used on Windows. Please use the fluxEngine_C_v1_set_driver_base_directory_w() function instead if possible, in order to supply a wide name.
The following specific error codes may be returned by this function:
fluxEngine_C_v1_ErrorCode_Unknown
fluxEngine_C_v1_ErrorCode_AllocationFailure
fluxEngine_C_v1_ErrorCode_InvalidArgument
fluxEngine_C_v1_ErrorCode_FileNotFoundError
fluxEngine_C_v1_ErrorCode_FileTypeError
- Parameters:
handle – The handle to set the directory for
directory – The directory to use. If a relative path is supplied the absolute path will be calculated relative to the current directory before the path is stored
error – [out] The resulting error object, if an error occurs. See the documentation of the fluxEngine_C_v1_Error structure for details on error handling.
- Returns:
0
on success,-1
on failure
set_driver_base_directory_w
-
int fluxEngine_C_v1_set_driver_base_directory_w(fluxEngine_C_v1_Handle *handle, wchar_t const *directory, fluxEngine_C_v1_Error **error)
Set the driver base directory (wide/Unicode variant for Windows)
When loading drivers this sets the base directory where the drivers may be found. If this function is not called, or an empty value or
NULL
is passed, the directorydrivers
one level above the directory of the currently running executable will be used. For example, if the executable isC:\App\bin\engine_test.exe
, the default drivers directory would beC:\App\drivers
. (This is the case on all platforms.)Note that if this method is not used the user can also override the default via an environment variable per driver type. (See the introductory documentation for more details.)
The directory specified here must exist, otherwise it will not be used and an error will be raised.
The following specific error codes may be returned by this function:
fluxEngine_C_v1_ErrorCode_Unknown
fluxEngine_C_v1_ErrorCode_AllocationFailure
fluxEngine_C_v1_ErrorCode_InvalidArgument
fluxEngine_C_v1_ErrorCode_FileNotFoundError
fluxEngine_C_v1_ErrorCode_FileTypeError
- Parameters:
handle – The handle to set the directory for
directory – The directory to use. If a relative path is supplied the absolute path will be calculated relative to the current directory before the path is stored
error – [out] The resulting error object, if an error occurs. See the documentation of the fluxEngine_C_v1_Error structure for details on error handling.
- Returns:
0
on success,-1
on failure
set_driver_isolation_executable
-
int fluxEngine_C_v1_set_driver_isolation_executable(fluxEngine_C_v1_Handle *handle, char const *executable, fluxEngine_C_v1_Error **error)
Set the path to the driver isolation executable.
Drivers are loaded via the
fluxDriverIsolation
executable (on WindowsfluxDriverIsolation.exe
), in case the default is not where the executable is deployed. The defaults are:On Windows and macOS the
fluxDriverIsolation
executable is assumed to be in the same directory as the current executable by default. For example, if the executable isC:\App\bin\engine_test.exe
on Windows, the default driver isolation path is assumed to beC:\App\bin\fluxDriverIsolation.exe
. Similarly, on macOS, if the main executable is in/Applications/engine_test.app/Contents/MacOS/engine_test
, the driver isolation executable is assumed to be in/Applications/engine_test.app/Contents/MacOS/fluxDriverIsolation
.On all other platforms (Linux) the executable is assumed to be in
../libexec/fluxDriverIsolation
relative to the current executable path. For example, if the executable is in/opt/engine_test/bin/engine_test
, the driver isolation executable will be looked for in/opt/engine_test/libexec/fluxDriverIsolation
by default.Windows note: this will accept a path in the 8bit local file name encoding, which will not be able to represent all possible Unicode characters that may be used on Windows. Please use the fluxEngine_C_v1_set_driver_isolation_executable_w() function instead if possible, in order to supply a wide name.
The following specific error codes may be returned by this function:
fluxEngine_C_v1_ErrorCode_Unknown
fluxEngine_C_v1_ErrorCode_AllocationFailure
fluxEngine_C_v1_ErrorCode_InvalidArgument
fluxEngine_C_v1_ErrorCode_FileNotFoundError
fluxEngine_C_v1_ErrorCode_FileTypeError
- Parameters:
handle – The handle to set the executable path for
executable – The path of the
fluxDriverIsolation
executable. If a relative path is supplied the absolute path will be calculated relative to the current directory before the path is storederror – [out] The resulting error object, if an error occurs. See the documentation of the fluxEngine_C_v1_Error structure for details on error handling.
- Returns:
0
on success,-1
on failure
set_driver_isolation_executable_w
-
int fluxEngine_C_v1_set_driver_isolation_executable_w(fluxEngine_C_v1_Handle *handle, wchar_t const *executable, fluxEngine_C_v1_Error **error)
Set the path to the driver isolation executable (wide/Unicode variant for Windows)
Drivers are loaded via the
fluxDriverIsolation
executable (on WindowsfluxDriverIsolation.exe
), in case the default is not where the executable is deployed. The defaults are:On Windows and macOS the
fluxDriverIsolation
executable is assumed to be in the same directory as the current executable by default. For example, if the executable isC:\App\bin\engine_test.exe
on Windows, the default driver isolation path is assumed to beC:\App\bin\fluxDriverIsolation.exe
. Similarly, on macOS, if the main executable is in/Applications/engine_test.app/Contents/MacOS/engine_test
, the driver isolation executable is assumed to be in/Applications/engine_test.app/Contents/MacOS/fluxDriverIsolation
.On all other platforms (Linux) the executable is assumed to be in
../libexec/fluxDriverIsolation
relative to the current executable path. For example, if the executable is in/opt/engine_test/bin/engine_test
, the driver isolation executable will be looked for in/opt/engine_test/libexec/fluxDriverIsolation
by default.The following specific error codes may be returned by this function:
fluxEngine_C_v1_ErrorCode_Unknown
fluxEngine_C_v1_ErrorCode_AllocationFailure
fluxEngine_C_v1_ErrorCode_InvalidArgument
fluxEngine_C_v1_ErrorCode_FileNotFoundError
fluxEngine_C_v1_ErrorCode_FileTypeError
- Parameters:
handle – The handle to set the executable path for
executable – The path of the
fluxDriverIsolation
executable. If a relative path is supplied the absolute path will be calculated relative to the current directory before the path is storederror – [out] The resulting error object, if an error occurs. See the documentation of the fluxEngine_C_v1_Error structure for details on error handling.
- Returns:
0
on success,-1
on failure