NCBI C++ ToolKit
Macros | Functions | Variables
winlogin.c File Reference
#include <config.h>
#include <stdarg.h>
#include <stdio.h>
#include <assert.h>
#include <ctype.h>
#include "resource.h"
#include <freetds/tds.h>
#include <freetds/odbc.h>
#include <freetds/string.h>
#include <freetds/convert.h>
#include "replacements.h"
#include <shlobj.h>
+ Include dependency graph for winlogin.c:

Go to the source code of this file.

Go to the SVN repository for this file.

Macros

#define GetWindowUserData(wnd)   GetWindowLong((wnd), GWL_USERDATA)
 
#define SetWindowUserData(wnd, data)   SetWindowLong((wnd), GWL_USERDATA, (data))
 

Functions

static char * get_desktop_file (const char *file)
 
static BOOL CALLBACK LoginDlgProc (HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
 Callback function for the DSN Configuration dialog. More...
 
BOOL get_login_info (HWND hwndParent, TDSLOGIN *login)
 Use a dialog window to prompt for user_name and password. More...
 

Variables

HINSTANCE hinstFreeTDS
 

Macro Definition Documentation

◆ GetWindowUserData

#define GetWindowUserData (   wnd)    GetWindowLong((wnd), GWL_USERDATA)

Definition at line 87 of file winlogin.c.

◆ SetWindowUserData

#define SetWindowUserData (   wnd,
  data 
)    SetWindowLong((wnd), GWL_USERDATA, (data))

Definition at line 88 of file winlogin.c.

Function Documentation

◆ get_desktop_file()

static char* get_desktop_file ( const char *  file)
static

Definition at line 65 of file winlogin.c.

References asprintf, file, and NULL.

Referenced by LoginDlgProc().

◆ get_login_info()

BOOL get_login_info ( HWND  hwndParent,
TDSLOGIN login 
)

Use a dialog window to prompt for user_name and password.

If the user hits the [OK] button then store the entered values into the given TDSLOGIN structure and return TRUE. If the user hits [CANCEL] then return FALSE.

Parameters
hwndParentparent for dialog
loginwhere to store login info

Definition at line 172 of file winlogin.c.

References hinstFreeTDS, IDD_LOGIN, login, and LoginDlgProc().

Referenced by _SQLDriverConnect().

◆ LoginDlgProc()

static BOOL CALLBACK LoginDlgProc ( HWND  hDlg,
UINT  message,
WPARAM  wParam,
LPARAM  lParam 
)
static

Callback function for the DSN Configuration dialog.

Parameters
hDlgidentifies the dialog
messagewhat happened to the dialog
wParamvaries with message
lParampointer to TDSLOGIN struct

Definition at line 102 of file winlogin.c.

References tds_login::dump_file, FALSE, free(), get_desktop_file(), GetWindowUserData, IDC_LOGINDUMP, IDC_LOGINPWD, IDC_LOGINSERVER, IDC_LOGINUID, login, tds_login::password, tds_login::server_name, SetWindowUserData, tds_dstr_copy(), tds_dstr_cstr(), tds_dstr_isempty(), tmp, TRUE, and tds_login::user_name.

Referenced by get_login_info().

Variable Documentation

◆ hinstFreeTDS

HINSTANCE hinstFreeTDS
extern

Definition at line 10 of file initnet.c.

Referenced by get_login_info().

Modified on Wed Feb 28 07:14:41 2024 by modify_doxy.py rev. 669887