You've already forked mariadb-connector-c
mirror of
https://github.com/mariadb-corporation/mariadb-connector-c.git
synced 2025-08-01 06:27:04 +03:00
get_tty_password(Windows) - CreateFile error
The Windows error condition for failing to open a file is INVALID_HANDLE_VALUE is returned.
This commit is contained in:
@ -122,11 +122,11 @@ char* get_tty_password(char *prompt, char *buffer, int length)
|
|||||||
if (prompt)
|
if (prompt)
|
||||||
fprintf(stderr, "%s", prompt);
|
fprintf(stderr, "%s", prompt);
|
||||||
|
|
||||||
if (!(Hdl= CreateFile("CONIN$",
|
if ((Hdl= CreateFile("CONIN$",
|
||||||
GENERIC_READ | GENERIC_WRITE,
|
GENERIC_READ | GENERIC_WRITE,
|
||||||
FILE_SHARE_READ,
|
FILE_SHARE_READ,
|
||||||
NULL,
|
NULL,
|
||||||
OPEN_EXISTING, 0, NULL)))
|
OPEN_EXISTING, 0, NULL)) == INVALID_HANDLE_VALUE)
|
||||||
{
|
{
|
||||||
/* todo: provide a graphical dialog */
|
/* todo: provide a graphical dialog */
|
||||||
return buffer;
|
return buffer;
|
||||||
|
Reference in New Issue
Block a user