ReactOS  0.4.15-dev-1384-g878186b
nps.c File Reference
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "netspi.h"
#include "wine/debug.h"
#include "winerror.h"
#include "mprres.h"
Include dependency graph for nps.c:

Go to the source code of this file.

Classes

struct  _CHANGEPWDINFOA
 
struct  _CHANGEPWDINFOW
 

Typedefs

typedef struct _CHANGEPWDINFOA CHANGEPWDINFOA
 
typedef struct _CHANGEPWDINFOALPCHANGEPWDINFOA
 
typedef struct _CHANGEPWDINFOW CHANGEPWDINFOW
 
typedef struct _CHANGEPWDINFOWLPCHANGEPWDINFOW
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (mpr)
 
static INT_PTR WINAPI NPS_ProxyPasswordDialog (HWND hdlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
DWORD WINAPI NPSAuthenticationDialogA (LPAUTHDLGSTRUCTA lpAuthDlgStruct)
 
DWORD WINAPI NPSGetProviderHandleA (PHPROVIDER phProvider)
 
DWORD WINAPI NPSGetProviderNameA (HPROVIDER hProvider, LPCSTR *lpszProviderName)
 
DWORD WINAPI NPSGetSectionNameA (HPROVIDER hProvider, LPCSTR *lpszSectionName)
 
DWORD WINAPI NPSSetExtendedErrorA (DWORD NetSpecificError, LPSTR lpExtendedErrorText)
 
VOID WINAPI NPSSetCustomTextA (LPSTR lpCustomErrorText)
 
DWORD WINAPI NPSCopyStringA (LPCSTR lpString, LPVOID lpBuffer, LPDWORD lpdwBufferSize)
 
DWORD WINAPI NPSDeviceGetNumberA (LPSTR lpLocalName, LPDWORD lpdwNumber, LPDWORD lpdwType)
 
DWORD WINAPI NPSDeviceGetStringA (DWORD dwNumber, DWORD dwType, LPSTR lpLocalName, LPDWORD lpdwBufferSize)
 
DWORD WINAPI NPSNotifyRegisterA (enum NOTIFYTYPE NotifyType, NOTIFYCALLBACK pfNotifyCallBack)
 
LPVOID WINAPI NPSNotifyGetContextA (NOTIFYCALLBACK pfNotifyCallBack)
 
DWORD WINAPI PwdGetPasswordStatusA (LPCSTR lpProvider, DWORD dwIndex, LPDWORD status)
 
DWORD WINAPI PwdGetPasswordStatusW (LPCWSTR lpProvider, DWORD dwIndex, LPDWORD status)
 
DWORD WINAPI PwdSetPasswordStatusA (LPCSTR lpProvider, DWORD dwIndex, DWORD status)
 
DWORD WINAPI PwdSetPasswordStatusW (LPCWSTR lpProvider, DWORD dwIndex, DWORD status)
 
DWORD WINAPI PwdChangePasswordA (LPCSTR lpProvider, HWND hWnd, DWORD flags, LPCHANGEPWDINFOA info)
 
DWORD WINAPI PwdChangePasswordW (LPCWSTR lpProvider, HWND hWnd, DWORD flags, LPCHANGEPWDINFOW info)
 

Typedef Documentation

◆ CHANGEPWDINFOA

◆ CHANGEPWDINFOW

◆ LPCHANGEPWDINFOA

◆ LPCHANGEPWDINFOW

Function Documentation

◆ NPS_ProxyPasswordDialog()

static INT_PTR WINAPI NPS_ProxyPasswordDialog ( HWND  hdlg,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)
static

Definition at line 39 of file nps.c.

41 {
42  HWND hitem;
43  LPAUTHDLGSTRUCTA lpAuthDlgStruct;
44 
45  if( uMsg == WM_INITDIALOG )
46  {
47  TRACE("WM_INITDIALOG (%08lx)\n", lParam);
48 
49  /* save the parameter list */
50  lpAuthDlgStruct = (LPAUTHDLGSTRUCTA) lParam;
52 
53  if( lpAuthDlgStruct->lpExplainText )
54  {
55  hitem = GetDlgItem( hdlg, IDC_EXPLAIN );
56  SetWindowTextA( hitem, lpAuthDlgStruct->lpExplainText );
57  }
58 
59  /* extract the Realm from the proxy response and show it */
60  if( lpAuthDlgStruct->lpResource )
61  {
62  hitem = GetDlgItem( hdlg, IDC_REALM );
63  SetWindowTextA( hitem, lpAuthDlgStruct->lpResource );
64  }
65 
66  return TRUE;
67  }
68 
69  lpAuthDlgStruct = (LPAUTHDLGSTRUCTA) GetWindowLongPtrW( hdlg, GWLP_USERDATA );
70 
71  switch( uMsg )
72  {
73  case WM_COMMAND:
74  if( wParam == IDOK )
75  {
76  hitem = GetDlgItem( hdlg, IDC_USERNAME );
77  if( hitem )
78  GetWindowTextA( hitem, lpAuthDlgStruct->lpUsername, lpAuthDlgStruct->cbUsername );
79 
80  hitem = GetDlgItem( hdlg, IDC_PASSWORD );
81  if( hitem )
82  GetWindowTextA( hitem, lpAuthDlgStruct->lpPassword, lpAuthDlgStruct->cbPassword );
83 
84  EndDialog( hdlg, WN_SUCCESS );
85  return TRUE;
86  }
87  if( wParam == IDCANCEL )
88  {
89  EndDialog( hdlg, WN_CANCEL );
90  return TRUE;
91  }
92  break;
93  }
94  return FALSE;
95 }
#define IDOK
Definition: winuser.h:824
int WINAPI GetWindowTextA(HWND hWnd, LPSTR lpString, int nMaxCount)
Definition: window.c:1330
#define WN_SUCCESS
Definition: winnetwk.h:111
#define TRUE
Definition: types.h:120
struct AUTHDLGSTRUCTA * LPAUTHDLGSTRUCTA
#define WN_CANCEL
Definition: winnetwk.h:114
#define GetWindowLongPtrW
Definition: winuser.h:4804
LPSTR lpUsername
Definition: netspi.h:43
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
WPARAM wParam
Definition: combotst.c:138
#define FALSE
Definition: types.h:117
#define GWLP_USERDATA
Definition: treelist.c:63
#define TRACE(s)
Definition: solgame.cpp:4
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
BOOL WINAPI SetWindowTextA(_In_ HWND, _In_opt_ LPCSTR)
LPSTR lpPassword
Definition: netspi.h:45
LPCSTR lpExplainText
Definition: netspi.h:50
#define IDC_USERNAME
Definition: resource.h:77
DWORD cbUsername
Definition: netspi.h:44
#define WM_COMMAND
Definition: winuser.h:1722
DWORD cbPassword
Definition: netspi.h:46
LPCSTR lpResource
Definition: netspi.h:42
#define SetWindowLongPtrW
Definition: winuser.h:5321
#define IDCANCEL
Definition: winuser.h:825
#define WM_INITDIALOG
Definition: winuser.h:1721
LPARAM lParam
Definition: combotst.c:139
#define IDC_REALM
Definition: mprres.h:29
#define IDC_PASSWORD
Definition: resource.h:17
#define IDC_EXPLAIN
Definition: mprres.h:33

Referenced by NPSAuthenticationDialogA().

◆ NPSAuthenticationDialogA()

DWORD WINAPI NPSAuthenticationDialogA ( LPAUTHDLGSTRUCTA  lpAuthDlgStruct)

Definition at line 100 of file nps.c.

101 {
102  HMODULE hwininet = GetModuleHandleA( "mpr.dll" );
103 
104  TRACE("%p\n", lpAuthDlgStruct);
105 
106  if( !lpAuthDlgStruct )
107  return WN_BAD_POINTER;
108  if( lpAuthDlgStruct->cbStructure < sizeof *lpAuthDlgStruct )
109  return WN_BAD_POINTER;
110 
111  TRACE("%s %s %s\n",lpAuthDlgStruct->lpResource,
112  lpAuthDlgStruct->lpOUTitle, lpAuthDlgStruct->lpExplainText);
113 
114  return DialogBoxParamW( hwininet, MAKEINTRESOURCEW( IDD_PROXYDLG ),
115  lpAuthDlgStruct->hwndOwner, NPS_ProxyPasswordDialog,
116  (LPARAM) lpAuthDlgStruct );
117 }
INT_PTR WINAPI DialogBoxParamW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)
LPCSTR lpOUTitle
Definition: netspi.h:49
DWORD cbStructure
Definition: netspi.h:40
#define IDD_PROXYDLG
Definition: mprres.h:26
LONG_PTR LPARAM
Definition: windef.h:208
#define TRACE(s)
Definition: solgame.cpp:4
LPCSTR lpExplainText
Definition: netspi.h:50
static INT_PTR WINAPI NPS_ProxyPasswordDialog(HWND hdlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: nps.c:39
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
Definition: loader.c:812
#define WN_BAD_POINTER
Definition: winnetwk.h:118
HWND hwndOwner
Definition: netspi.h:41
LPCSTR lpResource
Definition: netspi.h:42
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582

◆ NPSCopyStringA()

DWORD WINAPI NPSCopyStringA ( LPCSTR  lpString,
LPVOID  lpBuffer,
LPDWORD  lpdwBufferSize 
)

Definition at line 166 of file nps.c.

167 {
168  FIXME( "(%s, %p, %p): stub\n", debugstr_a(lpString), lpBuffer, lpdwBufferSize );
169  return WN_NOT_SUPPORTED;
170 }
#define WN_NOT_SUPPORTED
Definition: winnetwk.h:113
#define FIXME(fmt,...)
Definition: debug.h:111
static TAGREF LPCWSTR LPDWORD LPVOID lpBuffer
Definition: db.cpp:173
#define debugstr_a
Definition: kernel32.h:31

◆ NPSDeviceGetNumberA()

DWORD WINAPI NPSDeviceGetNumberA ( LPSTR  lpLocalName,
LPDWORD  lpdwNumber,
LPDWORD  lpdwType 
)

Definition at line 175 of file nps.c.

176 {
177  FIXME( "(%s, %p, %p): stub\n", debugstr_a(lpLocalName), lpdwNumber, lpdwType );
178  return WN_NOT_SUPPORTED;
179 }
#define WN_NOT_SUPPORTED
Definition: winnetwk.h:113
#define FIXME(fmt,...)
Definition: debug.h:111
#define debugstr_a
Definition: kernel32.h:31

◆ NPSDeviceGetStringA()

DWORD WINAPI NPSDeviceGetStringA ( DWORD  dwNumber,
DWORD  dwType,
LPSTR  lpLocalName,
LPDWORD  lpdwBufferSize 
)

Definition at line 184 of file nps.c.

185 {
186  FIXME( "(%d, %d, %p, %p): stub\n", dwNumber, dwType, lpLocalName, lpdwBufferSize );
187  return WN_NOT_SUPPORTED;
188 }
#define WN_NOT_SUPPORTED
Definition: winnetwk.h:113
#define FIXME(fmt,...)
Definition: debug.h:111

◆ NPSGetProviderHandleA()

DWORD WINAPI NPSGetProviderHandleA ( PHPROVIDER  phProvider)

Definition at line 122 of file nps.c.

123 {
124  FIXME( "(%p): stub\n", phProvider );
125  return WN_NOT_SUPPORTED;
126 }
#define WN_NOT_SUPPORTED
Definition: winnetwk.h:113
#define FIXME(fmt,...)
Definition: debug.h:111

◆ NPSGetProviderNameA()

DWORD WINAPI NPSGetProviderNameA ( HPROVIDER  hProvider,
LPCSTR lpszProviderName 
)

Definition at line 131 of file nps.c.

132 {
133  FIXME( "(%p, %p): stub\n", hProvider, lpszProviderName );
134  return WN_NOT_SUPPORTED;
135 }
WDFWMIPROVIDER hProvider
Definition: fxwmiapi.cpp:165
#define WN_NOT_SUPPORTED
Definition: winnetwk.h:113
#define FIXME(fmt,...)
Definition: debug.h:111

◆ NPSGetSectionNameA()

DWORD WINAPI NPSGetSectionNameA ( HPROVIDER  hProvider,
LPCSTR lpszSectionName 
)

Definition at line 140 of file nps.c.

141 {
142  FIXME( "(%p, %p): stub\n", hProvider, lpszSectionName );
143  return WN_NOT_SUPPORTED;
144 }
WDFWMIPROVIDER hProvider
Definition: fxwmiapi.cpp:165
#define WN_NOT_SUPPORTED
Definition: winnetwk.h:113
#define FIXME(fmt,...)
Definition: debug.h:111

◆ NPSNotifyGetContextA()

LPVOID WINAPI NPSNotifyGetContextA ( NOTIFYCALLBACK  pfNotifyCallBack)

Definition at line 202 of file nps.c.

203 {
204  FIXME( "(%p): stub\n", pfNotifyCallBack );
205  return NULL;
206 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define NULL
Definition: types.h:112

◆ NPSNotifyRegisterA()

DWORD WINAPI NPSNotifyRegisterA ( enum NOTIFYTYPE  NotifyType,
NOTIFYCALLBACK  pfNotifyCallBack 
)

Definition at line 193 of file nps.c.

194 {
195  FIXME( "(%d, %p): stub\n", NotifyType, pfNotifyCallBack );
196  return WN_NOT_SUPPORTED;
197 }
#define WN_NOT_SUPPORTED
Definition: winnetwk.h:113
#define FIXME(fmt,...)
Definition: debug.h:111

◆ NPSSetCustomTextA()

VOID WINAPI NPSSetCustomTextA ( LPSTR  lpCustomErrorText)

Definition at line 158 of file nps.c.

159 {
160  FIXME( "(%s): stub\n", debugstr_a(lpCustomErrorText) );
161 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define debugstr_a
Definition: kernel32.h:31

◆ NPSSetExtendedErrorA()

DWORD WINAPI NPSSetExtendedErrorA ( DWORD  NetSpecificError,
LPSTR  lpExtendedErrorText 
)

Definition at line 149 of file nps.c.

150 {
151  FIXME( "(%08x, %s): stub\n", NetSpecificError, debugstr_a(lpExtendedErrorText) );
152  return WN_NOT_SUPPORTED;
153 }
#define WN_NOT_SUPPORTED
Definition: winnetwk.h:113
#define FIXME(fmt,...)
Definition: debug.h:111
#define debugstr_a
Definition: kernel32.h:31

◆ PwdChangePasswordA()

DWORD WINAPI PwdChangePasswordA ( LPCSTR  lpProvider,
HWND  hWnd,
DWORD  flags,
LPCHANGEPWDINFOA  info 
)

Definition at line 261 of file nps.c.

262 {
263  FIXME("%s %p %x %p\n", debugstr_a(lpProvider), hWnd, flags, info );
264  return WN_SUCCESS;
265 }
#define WN_SUCCESS
Definition: winnetwk.h:111
HWND hWnd
Definition: settings.c:17
#define FIXME(fmt,...)
Definition: debug.h:111
#define debugstr_a
Definition: kernel32.h:31
GLbitfield flags
Definition: glext.h:7161

◆ PwdChangePasswordW()

DWORD WINAPI PwdChangePasswordW ( LPCWSTR  lpProvider,
HWND  hWnd,
DWORD  flags,
LPCHANGEPWDINFOW  info 
)

Definition at line 270 of file nps.c.

271 {
272  FIXME("%s %p %x %p\n", debugstr_w(lpProvider), hWnd, flags, info );
273  return WN_SUCCESS;
274 }
#define WN_SUCCESS
Definition: winnetwk.h:111
HWND hWnd
Definition: settings.c:17
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111
GLbitfield flags
Definition: glext.h:7161

◆ PwdGetPasswordStatusA()

DWORD WINAPI PwdGetPasswordStatusA ( LPCSTR  lpProvider,
DWORD  dwIndex,
LPDWORD  status 
)

Definition at line 211 of file nps.c.

212 {
213  FIXME("%s %d %p\n", debugstr_a(lpProvider), dwIndex, status );
214  *status = 0;
215  return WN_SUCCESS;
216 }
#define WN_SUCCESS
Definition: winnetwk.h:111
#define FIXME(fmt,...)
Definition: debug.h:111
#define debugstr_a
Definition: kernel32.h:31
Definition: ps.c:97

◆ PwdGetPasswordStatusW()

DWORD WINAPI PwdGetPasswordStatusW ( LPCWSTR  lpProvider,
DWORD  dwIndex,
LPDWORD  status 
)

Definition at line 221 of file nps.c.

222 {
223  FIXME("%s %d %p\n", debugstr_w(lpProvider), dwIndex, status );
224  *status = 0;
225  return WN_SUCCESS;
226 }
#define WN_SUCCESS
Definition: winnetwk.h:111
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111
Definition: ps.c:97

◆ PwdSetPasswordStatusA()

DWORD WINAPI PwdSetPasswordStatusA ( LPCSTR  lpProvider,
DWORD  dwIndex,
DWORD  status 
)

Definition at line 231 of file nps.c.

232 {
233  FIXME("%s %d %d\n", debugstr_a(lpProvider), dwIndex, status );
234  return WN_SUCCESS;
235 }
#define WN_SUCCESS
Definition: winnetwk.h:111
#define FIXME(fmt,...)
Definition: debug.h:111
#define debugstr_a
Definition: kernel32.h:31
Definition: ps.c:97

◆ PwdSetPasswordStatusW()

DWORD WINAPI PwdSetPasswordStatusW ( LPCWSTR  lpProvider,
DWORD  dwIndex,
DWORD  status 
)

Definition at line 240 of file nps.c.

241 {
242  FIXME("%s %d %d\n", debugstr_w(lpProvider), dwIndex, status );
243  return WN_SUCCESS;
244 }
#define WN_SUCCESS
Definition: winnetwk.h:111
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111
Definition: ps.c:97

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( mpr  )