You've already forked mariadb-connector-c
mirror of
https://github.com/mariadb-corporation/mariadb-connector-c.git
synced 2025-07-30 19:03:17 +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)
|
||||
fprintf(stderr, "%s", prompt);
|
||||
|
||||
if (!(Hdl= CreateFile("CONIN$",
|
||||
GENERIC_READ | GENERIC_WRITE,
|
||||
FILE_SHARE_READ,
|
||||
NULL,
|
||||
OPEN_EXISTING, 0, NULL)))
|
||||
if ((Hdl= CreateFile("CONIN$",
|
||||
GENERIC_READ | GENERIC_WRITE,
|
||||
FILE_SHARE_READ,
|
||||
NULL,
|
||||
OPEN_EXISTING, 0, NULL)) == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
/* todo: provide a graphical dialog */
|
||||
return buffer;
|
||||
|
Reference in New Issue
Block a user