diff options
Diffstat (limited to 'src/w32-add.h')
-rw-r--r-- | src/w32-add.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/w32-add.h b/src/w32-add.h index 3428961..74696bd 100644 --- a/src/w32-add.h +++ b/src/w32-add.h @@ -61,6 +61,22 @@ size_t gpgrt_w32_iconv (gpgrt_w32_iconv_t cd, # define iconv(a,b,c,d,e) gpgrt_w32_iconv ((a),(b),(c),(d),(e)) #endif /*GPGRT_ENABLE_W32_ICONV_MACROS*/ +/* Release a wchar_t * buffer. */ +void gpgrt_free_wchar (wchar_t *wstring); + +/* Convert an UTF-8 encoded file name to wchar. + * Prepend a '\\?\' prefix if needed. */ +wchar_t *gpgrt_fname_to_wchar (const char *fname); + +/* Convert an UTF8 string to a WCHAR string. Caller should use + * gpgrt_free_wchar to release the result. + * Returns NULL on error and sets ERRNO. */ +wchar_t *gpgrt_utf8_to_wchar (const char *string); + +/* Convert a WCHAR string to UTF-8. Caller should use gpgrt_free to + * release the result. Returns NULL on error and sets ERRNO. */ +char *gpgrt_wchar_to_utf8 (const wchar_t *wstring); + /* Query a string in the registry. */ char *gpgrt_w32_reg_query_string (const char *root, const char *dir, |