xref: /netbsd-src/external/public-domain/sqlite/man/sqlite3_win32_set_directory.3 (revision b9988867a8ad969c45a52aa7628bc932ec98d46b)
1.Dd January 24, 2024
2.Dt SQLITE3_WIN32_SET_DIRECTORY 3
3.Os
4.Sh NAME
5.Nm sqlite3_win32_set_directory ,
6.Nm sqlite3_win32_set_directory8 ,
7.Nm sqlite3_win32_set_directory16
8.Nd win32 specific interface
9.Sh SYNOPSIS
10.In sqlite3.h
11.Ft int
12.Fo sqlite3_win32_set_directory
13.Fa "unsigned long type"
14.Fa "void *zValue"
15.Fc
16.Ft int
17.Fo sqlite3_win32_set_directory8
18.Fa "unsigned long type"
19.Fa "const char *zValue"
20.Fc
21.Ft int
22.Fo sqlite3_win32_set_directory16
23.Fa "unsigned long type"
24.Fa "const void *zValue"
25.Fc
26.Sh DESCRIPTION
27These interfaces are available only on Windows.
28The sqlite3_win32_set_directory interface
29is used to set the value associated with the sqlite3_temp_directory
30or sqlite3_data_directory variable, to zValue,
31depending on the value of the type parameter.
32The zValue parameter should be NULL to cause the previous value to
33be freed via sqlite3_free; a non-NULL value will be copied
34into memory obtained from sqlite3_malloc prior to being
35used.
36The sqlite3_win32_set_directory interface
37returns SQLITE_OK to indicate success, SQLITE_ERROR
38if the type is unsupported, or SQLITE_NOMEM if memory could
39not be allocated.
40The value of the sqlite3_data_directory variable
41is intended to act as a replacement for the current directory on the
42sub-platforms of Win32 where that concept is not present, e.g. WinRT
43and UWP.
44The sqlite3_win32_set_directory8 and sqlite3_win32_set_directory16
45interfaces behave exactly the same as the sqlite3_win32_set_directory
46interface except the string parameter must be UTF-8 or UTF-16, respectively.
47.Sh IMPLEMENTATION NOTES
48These declarations were extracted from the
49interface documentation at line 6519.
50.Bd -literal
51SQLITE_API int sqlite3_win32_set_directory(
52  unsigned long type, /* Identifier for directory being set or reset */
53  void *zValue        /* New value for directory being set or reset */
54);
55SQLITE_API int sqlite3_win32_set_directory8(unsigned long type, const char *zValue);
56SQLITE_API int sqlite3_win32_set_directory16(unsigned long type, const void *zValue);
57.Ed
58.Sh SEE ALSO
59.Xr sqlite3_data_directory 3 ,
60.Xr sqlite3_malloc 3 ,
61.Xr sqlite3_temp_directory 3 ,
62.Xr SQLITE_OK 3
63