Artifact 919a0473b75001a32697d37adeccd442bf764d23:
- File
src/win32/rasdlg.d
-
2015-05-05 06:49:05
- part of checkin
[9b639cf2d6]
on branch trunk
- Working version for update to 2.067.
The problem was __gshared. Replacing it with TLS fixed the issue. Remaining problem is that "hack.d"'s CloseHandle hack is not working anymore.
(user: kinaba) [annotate]
-
2015-05-05 06:49:05
- part of checkin
[9b639cf2d6]
on branch trunk
- Working version for update to 2.067.
0000: 2f 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a /***************
0010: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a ****************
0020: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a ****************
0030: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a ****************
0040: 2a 2a 2a 2a 2a 2a 2a 2a 5c 0d 0a 2a 20 20 20 20 ********\..*
0050: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0060: 20 20 20 20 20 20 20 20 20 20 20 20 72 61 73 64 rasd
0070: 6c 67 2e 64 20 20 20 20 20 20 20 20 20 20 20 20 lg.d
0080: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0090: 20 20 20 2a 0d 0a 2a 20 20 20 20 20 20 20 20 20 *..*
00a0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
00b0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
00c0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
00d0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2a 0d *.
00e0: 0a 2a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 .*
00f0: 20 20 20 20 20 20 20 20 20 57 69 6e 64 6f 77 73 Windows
0100: 20 41 50 49 20 68 65 61 64 65 72 20 6d 6f 64 75 API header modu
0110: 6c 65 20 20 20 20 20 20 20 20 20 20 20 20 20 20 le
0120: 20 20 20 20 20 20 20 20 20 2a 0d 0a 2a 20 20 20 *..*
0130: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0140: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0150: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0160: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0170: 20 20 20 20 2a 0d 0a 2a 20 20 20 20 20 20 20 20 *..*
0180: 20 20 20 20 20 20 20 20 20 54 72 61 6e 73 6c 61 Transla
0190: 74 65 64 20 66 72 6f 6d 20 4d 69 6e 47 57 20 57 ted from MinGW W
01a0: 69 6e 64 6f 77 73 20 68 65 61 64 65 72 73 20 20 indows headers
01b0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2a *
01c0: 0d 0a 2a 20 20 20 20 20 20 20 20 20 20 20 20 20 ..*
01d0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 79 by
01e0: 20 53 74 65 77 61 72 74 20 47 6f 72 64 6f 6e 20 Stewart Gordon
01f0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0200: 20 20 20 20 20 20 20 20 20 20 2a 0d 0a 2a 20 20 *..*
0210: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0220: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0230: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0240: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0250: 20 20 20 20 20 2a 0d 0a 2a 20 20 20 20 20 20 20 *..*
0260: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0270: 50 6c 61 63 65 64 20 69 6e 74 6f 20 70 75 62 6c Placed into publ
0280: 69 63 20 64 6f 6d 61 69 6e 20 20 20 20 20 20 20 ic domain
0290: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
02a0: 2a 0d 0a 5c 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a *..\************
02b0: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a ****************
02c0: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a ****************
02d0: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a ****************
02e0: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2f 0d 0a 6d 6f ***********/..mo
02f0: 64 75 6c 65 20 77 69 6e 33 32 2e 72 61 73 64 6c dule win32.rasdl
0300: 67 3b 0d 0a 0d 0a 69 6d 70 6f 72 74 20 77 69 6e g;....import win
0310: 33 32 2e 72 61 73 3b 0d 0a 70 72 69 76 61 74 65 32.ras;..private
0320: 20 69 6d 70 6f 72 74 20 77 69 6e 33 32 2e 6c 6d import win32.lm
0330: 63 6f 6e 73 2c 20 77 69 6e 33 32 2e 77 69 6e 64 cons, win32.wind
0340: 65 66 3b 0d 0a 0d 0a 65 6e 75 6d 20 7b 0d 0a 09 ef;....enum {...
0350: 52 41 53 50 42 44 45 56 45 4e 54 5f 41 64 64 45 RASPBDEVENT_AddE
0360: 6e 74 72 79 20 3d 20 31 2c 0d 0a 09 52 41 53 50 ntry = 1,...RASP
0370: 42 44 45 56 45 4e 54 5f 45 64 69 74 45 6e 74 72 BDEVENT_EditEntr
0380: 79 2c 0d 0a 09 52 41 53 50 42 44 45 56 45 4e 54 y,...RASPBDEVENT
0390: 5f 52 65 6d 6f 76 65 45 6e 74 72 79 2c 0d 0a 09 _RemoveEntry,...
03a0: 52 41 53 50 42 44 45 56 45 4e 54 5f 44 69 61 6c RASPBDEVENT_Dial
03b0: 45 6e 74 72 79 2c 0d 0a 09 52 41 53 50 42 44 45 Entry,...RASPBDE
03c0: 56 45 4e 54 5f 45 64 69 74 47 6c 6f 62 61 6c 73 VENT_EditGlobals
03d0: 2c 0d 0a 09 52 41 53 50 42 44 45 56 45 4e 54 5f ,...RASPBDEVENT_
03e0: 4e 6f 55 73 65 72 2c 0d 0a 09 52 41 53 50 42 44 NoUser,...RASPBD
03f0: 45 56 45 4e 54 5f 4e 6f 55 73 65 72 45 64 69 74 EVENT_NoUserEdit
0400: 0d 0a 7d 0d 0a 0d 0a 63 6f 6e 73 74 20 52 41 53 ..}....const RAS
0410: 50 42 44 46 4c 41 47 5f 50 6f 73 69 74 69 6f 6e PBDFLAG_Position
0420: 44 6c 67 20 20 20 20 20 20 3d 20 20 31 3b 0d 0a Dlg = 1;..
0430: 63 6f 6e 73 74 20 52 41 53 50 42 44 46 4c 41 47 const RASPBDFLAG
0440: 5f 46 6f 72 63 65 43 6c 6f 73 65 4f 6e 44 69 61 _ForceCloseOnDia
0450: 6c 20 3d 20 20 32 3b 0d 0a 63 6f 6e 73 74 20 52 l = 2;..const R
0460: 41 53 50 42 44 46 4c 41 47 5f 4e 6f 55 73 65 72 ASPBDFLAG_NoUser
0470: 20 20 20 20 20 20 20 20 20 20 20 3d 20 31 36 3b = 16;
0480: 0d 0a 0d 0a 63 6f 6e 73 74 20 52 41 53 45 44 46 ....const RASEDF
0490: 4c 41 47 5f 50 6f 73 69 74 69 6f 6e 44 6c 67 20 LAG_PositionDlg
04a0: 3d 20 31 3b 0d 0a 63 6f 6e 73 74 20 52 41 53 45 = 1;..const RASE
04b0: 44 46 4c 41 47 5f 4e 65 77 45 6e 74 72 79 20 20 DFLAG_NewEntry
04c0: 20 20 3d 20 32 3b 0d 0a 63 6f 6e 73 74 20 52 41 = 2;..const RA
04d0: 53 45 44 46 4c 41 47 5f 43 6c 6f 6e 65 45 6e 74 SEDFLAG_CloneEnt
04e0: 72 79 20 20 3d 20 34 3b 0d 0a 0d 0a 63 6f 6e 73 ry = 4;....cons
04f0: 74 20 52 41 53 44 44 46 4c 41 47 5f 50 6f 73 69 t RASDDFLAG_Posi
0500: 74 69 6f 6e 44 6c 67 20 3d 20 31 3b 0d 0a 0d 0a tionDlg = 1;....
0510: 61 6c 69 67 6e 28 34 29 3a 0d 0a 0d 0a 73 74 72 align(4):....str
0520: 75 63 74 20 52 41 53 45 4e 54 52 59 44 4c 47 41 uct RASENTRYDLGA
0530: 20 7b 0d 0a 09 44 57 4f 52 44 20 20 20 20 20 64 {...DWORD d
0540: 77 53 69 7a 65 20 3d 20 52 41 53 45 4e 54 52 59 wSize = RASENTRY
0550: 44 4c 47 41 2e 73 69 7a 65 6f 66 3b 0d 0a 09 48 DLGA.sizeof;...H
0560: 57 4e 44 20 20 20 20 20 20 68 77 6e 64 4f 77 6e WND hwndOwn
0570: 65 72 3b 0d 0a 09 44 57 4f 52 44 20 20 20 20 20 er;...DWORD
0580: 64 77 46 6c 61 67 73 3b 0d 0a 09 4c 4f 4e 47 20 dwFlags;...LONG
0590: 20 20 20 20 20 78 44 6c 67 3b 0d 0a 09 4c 4f 4e xDlg;...LON
05a0: 47 20 20 20 20 20 20 79 44 6c 67 3b 0d 0a 09 43 G yDlg;...C
05b0: 48 41 52 5b 52 41 53 5f 4d 61 78 45 6e 74 72 79 HAR[RAS_MaxEntry
05c0: 4e 61 6d 65 20 2b 20 31 5d 20 73 7a 45 6e 74 72 Name + 1] szEntr
05d0: 79 3b 0d 0a 09 44 57 4f 52 44 20 20 20 20 20 64 y;...DWORD d
05e0: 77 45 72 72 6f 72 3b 0d 0a 09 55 4c 4f 4e 47 5f wError;...ULONG_
05f0: 50 54 52 20 72 65 73 65 72 76 65 64 3b 0d 0a 09 PTR reserved;...
0600: 55 4c 4f 4e 47 5f 50 54 52 20 72 65 73 65 72 76 ULONG_PTR reserv
0610: 65 64 32 3b 0d 0a 7d 0d 0a 61 6c 69 61 73 20 52 ed2;..}..alias R
0620: 41 53 45 4e 54 52 59 44 4c 47 41 2a 20 4c 50 52 ASENTRYDLGA* LPR
0630: 41 53 45 4e 54 52 59 44 4c 47 41 3b 0d 0a 0d 0a ASENTRYDLGA;....
0640: 73 74 72 75 63 74 20 52 41 53 45 4e 54 52 59 44 struct RASENTRYD
0650: 4c 47 57 20 7b 0d 0a 09 44 57 4f 52 44 20 20 20 LGW {...DWORD
0660: 20 20 64 77 53 69 7a 65 20 3d 20 52 41 53 45 4e dwSize = RASEN
0670: 54 52 59 44 4c 47 57 2e 73 69 7a 65 6f 66 3b 0d TRYDLGW.sizeof;.
0680: 0a 09 48 57 4e 44 20 20 20 20 20 20 68 77 6e 64 ..HWND hwnd
0690: 4f 77 6e 65 72 3b 0d 0a 09 44 57 4f 52 44 20 20 Owner;...DWORD
06a0: 20 20 20 64 77 46 6c 61 67 73 3b 0d 0a 09 4c 4f dwFlags;...LO
06b0: 4e 47 20 20 20 20 20 20 78 44 6c 67 3b 0d 0a 09 NG xDlg;...
06c0: 4c 4f 4e 47 20 20 20 20 20 20 79 44 6c 67 3b 0d LONG yDlg;.
06d0: 0a 09 57 43 48 41 52 5b 52 41 53 5f 4d 61 78 45 ..WCHAR[RAS_MaxE
06e0: 6e 74 72 79 4e 61 6d 65 20 2b 20 31 5d 20 73 7a ntryName + 1] sz
06f0: 45 6e 74 72 79 3b 0d 0a 09 44 57 4f 52 44 20 20 Entry;...DWORD
0700: 20 20 20 64 77 45 72 72 6f 72 3b 0d 0a 09 55 4c dwError;...UL
0710: 4f 4e 47 5f 50 54 52 20 72 65 73 65 72 76 65 64 ONG_PTR reserved
0720: 3b 0d 0a 09 55 4c 4f 4e 47 5f 50 54 52 20 72 65 ;...ULONG_PTR re
0730: 73 65 72 76 65 64 32 3b 0d 0a 7d 0d 0a 61 6c 69 served2;..}..ali
0740: 61 73 20 52 41 53 45 4e 54 52 59 44 4c 47 57 2a as RASENTRYDLGW*
0750: 20 4c 50 52 41 53 45 4e 54 52 59 44 4c 47 57 3b LPRASENTRYDLGW;
0760: 0d 0a 0d 0a 73 74 72 75 63 74 20 52 41 53 44 49 ....struct RASDI
0770: 41 4c 44 4c 47 20 7b 0d 0a 09 44 57 4f 52 44 20 ALDLG {...DWORD
0780: 20 20 20 20 64 77 53 69 7a 65 3b 0d 0a 09 48 57 dwSize;...HW
0790: 4e 44 20 20 20 20 20 20 68 77 6e 64 4f 77 6e 65 ND hwndOwne
07a0: 72 3b 0d 0a 09 44 57 4f 52 44 20 20 20 20 20 64 r;...DWORD d
07b0: 77 46 6c 61 67 73 3b 0d 0a 09 4c 4f 4e 47 20 20 wFlags;...LONG
07c0: 20 20 20 20 78 44 6c 67 3b 0d 0a 09 4c 4f 4e 47 xDlg;...LONG
07d0: 20 20 20 20 20 20 79 44 6c 67 3b 0d 0a 09 44 57 yDlg;...DW
07e0: 4f 52 44 20 20 20 20 20 64 77 53 75 62 45 6e 74 ORD dwSubEnt
07f0: 72 79 3b 0d 0a 09 44 57 4f 52 44 20 20 20 20 20 ry;...DWORD
0800: 64 77 45 72 72 6f 72 3b 0d 0a 09 55 4c 4f 4e 47 dwError;...ULONG
0810: 5f 50 54 52 20 72 65 73 65 72 76 65 64 3b 0d 0a _PTR reserved;..
0820: 09 55 4c 4f 4e 47 5f 50 54 52 20 72 65 73 65 72 .ULONG_PTR reser
0830: 76 65 64 32 3b 0d 0a 7d 0d 0a 61 6c 69 61 73 20 ved2;..}..alias
0840: 52 41 53 44 49 41 4c 44 4c 47 2a 20 4c 50 52 41 RASDIALDLG* LPRA
0850: 53 44 49 41 4c 44 4c 47 3b 0d 0a 0d 0a 2f 2f 20 SDIALDLG;....//
0860: 41 70 70 6c 69 63 61 74 69 6f 6e 2d 64 65 66 69 Application-defi
0870: 6e 65 64 20 63 61 6c 6c 62 61 63 6b 20 66 75 6e ned callback fun
0880: 63 74 69 6f 6e 73 0d 0a 65 78 74 65 72 6e 20 28 ctions..extern (
0890: 57 69 6e 64 6f 77 73 29 20 7b 0d 0a 09 61 6c 69 Windows) {...ali
08a0: 61 73 20 56 4f 49 44 20 66 75 6e 63 74 69 6f 6e as VOID function
08b0: 28 44 57 4f 52 44 2c 20 44 57 4f 52 44 2c 20 4c (DWORD, DWORD, L
08c0: 50 57 53 54 52 2c 20 4c 50 56 4f 49 44 29 20 52 PWSTR, LPVOID) R
08d0: 41 53 50 42 44 4c 47 46 55 4e 43 57 3b 0d 0a 09 ASPBDLGFUNCW;...
08e0: 61 6c 69 61 73 20 56 4f 49 44 20 66 75 6e 63 74 alias VOID funct
08f0: 69 6f 6e 28 44 57 4f 52 44 2c 20 44 57 4f 52 44 ion(DWORD, DWORD
0900: 2c 20 4c 50 53 54 52 2c 20 4c 50 56 4f 49 44 29 , LPSTR, LPVOID)
0910: 20 52 41 53 50 42 44 4c 47 46 55 4e 43 41 3b 0d RASPBDLGFUNCA;.
0920: 0a 7d 0d 0a 0d 0a 73 74 72 75 63 74 20 52 41 53 .}....struct RAS
0930: 50 42 44 4c 47 41 20 7b 0d 0a 09 44 57 4f 52 44 PBDLGA {...DWORD
0940: 20 20 20 20 20 20 20 20 20 64 77 53 69 7a 65 20 dwSize
0950: 3d 20 52 41 53 50 42 44 4c 47 41 2e 73 69 7a 65 = RASPBDLGA.size
0960: 6f 66 3b 0d 0a 09 48 57 4e 44 20 20 20 20 20 20 of;...HWND
0970: 20 20 20 20 68 77 6e 64 4f 77 6e 65 72 3b 0d 0a hwndOwner;..
0980: 09 44 57 4f 52 44 20 20 20 20 20 20 20 20 20 64 .DWORD d
0990: 77 46 6c 61 67 73 3b 0d 0a 09 4c 4f 4e 47 20 20 wFlags;...LONG
09a0: 20 20 20 20 20 20 20 20 78 44 6c 67 3b 0d 0a 09 xDlg;...
09b0: 4c 4f 4e 47 20 20 20 20 20 20 20 20 20 20 79 44 LONG yD
09c0: 6c 67 3b 0d 0a 09 55 4c 4f 4e 47 5f 50 54 52 20 lg;...ULONG_PTR
09d0: 20 20 20 20 64 77 43 61 6c 6c 62 61 63 6b 49 64 dwCallbackId
09e0: 3b 0d 0a 09 52 41 53 50 42 44 4c 47 46 55 4e 43 ;...RASPBDLGFUNC
09f0: 41 20 70 43 61 6c 6c 62 61 63 6b 3b 0d 0a 09 44 A pCallback;...D
0a00: 57 4f 52 44 20 20 20 20 20 20 20 20 20 64 77 45 WORD dwE
0a10: 72 72 6f 72 3b 0d 0a 09 55 4c 4f 4e 47 5f 50 54 rror;...ULONG_PT
0a20: 52 20 20 20 20 20 72 65 73 65 72 76 65 64 3b 0d R reserved;.
0a30: 0a 09 55 4c 4f 4e 47 5f 50 54 52 20 20 20 20 20 ..ULONG_PTR
0a40: 72 65 73 65 72 76 65 64 32 3b 0d 0a 7d 0d 0a 61 reserved2;..}..a
0a50: 6c 69 61 73 20 52 41 53 50 42 44 4c 47 41 2a 20 lias RASPBDLGA*
0a60: 4c 50 52 41 53 50 42 44 4c 47 41 3b 0d 0a 0d 0a LPRASPBDLGA;....
0a70: 73 74 72 75 63 74 20 52 41 53 50 42 44 4c 47 57 struct RASPBDLGW
0a80: 20 7b 0d 0a 09 44 57 4f 52 44 20 20 20 20 20 20 {...DWORD
0a90: 20 20 20 64 77 53 69 7a 65 20 3d 20 52 41 53 50 dwSize = RASP
0aa0: 42 44 4c 47 57 2e 73 69 7a 65 6f 66 3b 0d 0a 09 BDLGW.sizeof;...
0ab0: 48 57 4e 44 20 20 20 20 20 20 20 20 20 20 68 77 HWND hw
0ac0: 6e 64 4f 77 6e 65 72 3b 0d 0a 09 44 57 4f 52 44 ndOwner;...DWORD
0ad0: 20 20 20 20 20 20 20 20 20 64 77 46 6c 61 67 73 dwFlags
0ae0: 3b 0d 0a 09 4c 4f 4e 47 20 20 20 20 20 20 20 20 ;...LONG
0af0: 20 20 78 44 6c 67 3b 0d 0a 09 4c 4f 4e 47 20 20 xDlg;...LONG
0b00: 20 20 20 20 20 20 20 20 79 44 6c 67 3b 0d 0a 09 yDlg;...
0b10: 55 4c 4f 4e 47 5f 50 54 52 20 20 20 20 20 64 77 ULONG_PTR dw
0b20: 43 61 6c 6c 62 61 63 6b 49 64 3b 0d 0a 09 52 41 CallbackId;...RA
0b30: 53 50 42 44 4c 47 46 55 4e 43 57 20 70 43 61 6c SPBDLGFUNCW pCal
0b40: 6c 62 61 63 6b 3b 0d 0a 09 44 57 4f 52 44 20 20 lback;...DWORD
0b50: 20 20 20 20 20 20 20 64 77 45 72 72 6f 72 3b 0d dwError;.
0b60: 0a 09 55 4c 4f 4e 47 5f 50 54 52 20 20 20 20 20 ..ULONG_PTR
0b70: 72 65 73 65 72 76 65 64 3b 0d 0a 09 55 4c 4f 4e reserved;...ULON
0b80: 47 5f 50 54 52 20 20 20 20 20 72 65 73 65 72 76 G_PTR reserv
0b90: 65 64 32 3b 0d 0a 7d 0d 0a 61 6c 69 61 73 20 52 ed2;..}..alias R
0ba0: 41 53 50 42 44 4c 47 57 2a 20 4c 50 52 41 53 50 ASPBDLGW* LPRASP
0bb0: 42 44 4c 47 57 3b 0d 0a 0d 0a 73 74 72 75 63 74 BDLGW;....struct
0bc0: 20 52 41 53 4e 4f 55 53 45 52 41 0d 0a 7b 0d 0a RASNOUSERA..{..
0bd0: 09 44 57 4f 52 44 20 20 20 20 20 20 20 20 20 20 .DWORD
0be0: 20 64 77 53 69 7a 65 20 3d 20 52 41 53 4e 4f 55 dwSize = RASNOU
0bf0: 53 45 52 41 2e 73 69 7a 65 6f 66 3b 0d 0a 09 44 SERA.sizeof;...D
0c00: 57 4f 52 44 20 20 20 20 20 20 20 20 20 20 20 64 WORD d
0c10: 77 46 6c 61 67 73 3b 0d 0a 09 44 57 4f 52 44 20 wFlags;...DWORD
0c20: 20 20 20 20 20 20 20 20 20 20 64 77 54 69 6d 65 dwTime
0c30: 6f 75 74 4d 73 3b 0d 0a 09 43 48 41 52 5b 55 4e outMs;...CHAR[UN
0c40: 4c 45 4e 20 2b 20 31 5d 20 73 7a 55 73 65 72 4e LEN + 1] szUserN
0c50: 61 6d 65 3b 0d 0a 09 43 48 41 52 5b 50 57 4c 45 ame;...CHAR[PWLE
0c60: 4e 20 2b 20 31 5d 20 73 7a 50 61 73 73 77 6f 72 N + 1] szPasswor
0c70: 64 3b 0d 0a 09 43 48 41 52 5b 44 4e 4c 45 4e 20 d;...CHAR[DNLEN
0c80: 2b 20 31 5d 20 73 7a 44 6f 6d 61 69 6e 3b 0d 0a + 1] szDomain;..
0c90: 7d 0d 0a 61 6c 69 61 73 20 52 41 53 4e 4f 55 53 }..alias RASNOUS
0ca0: 45 52 41 2a 20 4c 50 52 41 53 4e 4f 55 53 45 52 ERA* LPRASNOUSER
0cb0: 41 3b 0d 0a 0d 0a 73 74 72 75 63 74 20 52 41 53 A;....struct RAS
0cc0: 4e 4f 55 53 45 52 57 20 7b 0d 0a 09 44 57 4f 52 NOUSERW {...DWOR
0cd0: 44 20 20 20 20 20 20 20 20 20 20 20 20 64 77 53 D dwS
0ce0: 69 7a 65 20 3d 20 52 41 53 4e 4f 55 53 45 52 57 ize = RASNOUSERW
0cf0: 2e 73 69 7a 65 6f 66 3b 0d 0a 09 44 57 4f 52 44 .sizeof;...DWORD
0d00: 20 20 20 20 20 20 20 20 20 20 20 20 64 77 46 6c dwFl
0d10: 61 67 73 3b 0d 0a 09 44 57 4f 52 44 20 20 20 20 ags;...DWORD
0d20: 20 20 20 20 20 20 20 20 64 77 54 69 6d 65 6f 75 dwTimeou
0d30: 74 4d 73 3b 0d 0a 09 57 43 48 41 52 5b 55 4e 4c tMs;...WCHAR[UNL
0d40: 45 4e 20 2b 20 31 5d 20 73 7a 55 73 65 72 4e 61 EN + 1] szUserNa
0d50: 6d 65 3b 0d 0a 09 57 43 48 41 52 5b 50 57 4c 45 me;...WCHAR[PWLE
0d60: 4e 20 2b 20 31 5d 20 73 7a 50 61 73 73 77 6f 72 N + 1] szPasswor
0d70: 64 3b 0d 0a 09 57 43 48 41 52 5b 44 4e 4c 45 4e d;...WCHAR[DNLEN
0d80: 20 2b 20 31 5d 20 73 7a 44 6f 6d 61 69 6e 3b 0d + 1] szDomain;.
0d90: 0a 7d 0d 0a 61 6c 69 61 73 20 52 41 53 4e 4f 55 .}..alias RASNOU
0da0: 53 45 52 57 2a 20 4c 50 52 41 53 4e 4f 55 53 45 SERW* LPRASNOUSE
0db0: 52 57 3b 0d 0a 0d 0a 65 78 74 65 72 6e 20 28 57 RW;....extern (W
0dc0: 69 6e 64 6f 77 73 29 20 7b 0d 0a 09 42 4f 4f 4c indows) {...BOOL
0dd0: 20 52 61 73 44 69 61 6c 44 6c 67 41 28 4c 50 53 RasDialDlgA(LPS
0de0: 54 52 2c 20 4c 50 53 54 52 2c 20 4c 50 53 54 52 TR, LPSTR, LPSTR
0df0: 2c 20 4c 50 52 41 53 44 49 41 4c 44 4c 47 29 3b , LPRASDIALDLG);
0e00: 0d 0a 09 42 4f 4f 4c 20 52 61 73 44 69 61 6c 44 ...BOOL RasDialD
0e10: 6c 67 57 28 4c 50 57 53 54 52 2c 20 4c 50 57 53 lgW(LPWSTR, LPWS
0e20: 54 52 2c 20 4c 50 57 53 54 52 2c 20 4c 50 52 41 TR, LPWSTR, LPRA
0e30: 53 44 49 41 4c 44 4c 47 29 3b 0d 0a 09 42 4f 4f SDIALDLG);...BOO
0e40: 4c 20 52 61 73 45 6e 74 72 79 44 6c 67 41 28 4c L RasEntryDlgA(L
0e50: 50 53 54 52 2c 20 4c 50 53 54 52 2c 20 4c 50 52 PSTR, LPSTR, LPR
0e60: 41 53 45 4e 54 52 59 44 4c 47 41 29 3b 0d 0a 09 ASENTRYDLGA);...
0e70: 42 4f 4f 4c 20 52 61 73 45 6e 74 72 79 44 6c 67 BOOL RasEntryDlg
0e80: 57 28 4c 50 57 53 54 52 2c 20 4c 50 57 53 54 52 W(LPWSTR, LPWSTR
0e90: 2c 20 4c 50 52 41 53 45 4e 54 52 59 44 4c 47 57 , LPRASENTRYDLGW
0ea0: 29 3b 0d 0a 09 42 4f 4f 4c 20 52 61 73 50 68 6f );...BOOL RasPho
0eb0: 6e 65 62 6f 6f 6b 44 6c 67 41 28 4c 50 53 54 52 nebookDlgA(LPSTR
0ec0: 2c 20 4c 50 53 54 52 2c 20 4c 50 52 41 53 50 42 , LPSTR, LPRASPB
0ed0: 44 4c 47 41 29 3b 0d 0a 09 42 4f 4f 4c 20 52 61 DLGA);...BOOL Ra
0ee0: 73 50 68 6f 6e 65 62 6f 6f 6b 44 6c 67 57 28 4c sPhonebookDlgW(L
0ef0: 50 57 53 54 52 2c 20 4c 50 57 53 54 52 2c 20 4c PWSTR, LPWSTR, L
0f00: 50 52 41 53 50 42 44 4c 47 57 29 3b 0d 0a 7d 0d PRASPBDLGW);..}.
0f10: 0a 0d 0a 76 65 72 73 69 6f 6e 20 28 55 6e 69 63 ...version (Unic
0f20: 6f 64 65 29 20 7b 0d 0a 09 61 6c 69 61 73 20 52 ode) {...alias R
0f30: 41 53 45 4e 54 52 59 44 4c 47 57 20 52 41 53 45 ASENTRYDLGW RASE
0f40: 4e 54 52 59 44 4c 47 3b 0d 0a 09 61 6c 69 61 73 NTRYDLG;...alias
0f50: 20 52 41 53 50 42 44 4c 47 57 20 52 41 53 50 42 RASPBDLGW RASPB
0f60: 44 4c 47 3b 0d 0a 09 61 6c 69 61 73 20 52 41 53 DLG;...alias RAS
0f70: 4e 4f 55 53 45 52 57 20 52 41 53 4e 4f 55 53 45 NOUSERW RASNOUSE
0f80: 52 3b 0d 0a 09 61 6c 69 61 73 20 52 61 73 44 69 R;...alias RasDi
0f90: 61 6c 44 6c 67 57 20 52 61 73 44 69 61 6c 44 6c alDlgW RasDialDl
0fa0: 67 3b 0d 0a 09 61 6c 69 61 73 20 52 61 73 45 6e g;...alias RasEn
0fb0: 74 72 79 44 6c 67 57 20 52 61 73 45 6e 74 72 79 tryDlgW RasEntry
0fc0: 44 6c 67 3b 0d 0a 09 61 6c 69 61 73 20 52 61 73 Dlg;...alias Ras
0fd0: 50 68 6f 6e 65 62 6f 6f 6b 44 6c 67 57 20 52 61 PhonebookDlgW Ra
0fe0: 73 50 68 6f 6e 65 62 6f 6f 6b 44 6c 67 3b 0d 0a sPhonebookDlg;..
0ff0: 7d 20 65 6c 73 65 20 7b 0d 0a 09 61 6c 69 61 73 } else {...alias
1000: 20 52 41 53 45 4e 54 52 59 44 4c 47 41 20 52 41 RASENTRYDLGA RA
1010: 53 45 4e 54 52 59 44 4c 47 3b 0d 0a 09 61 6c 69 SENTRYDLG;...ali
1020: 61 73 20 52 41 53 50 42 44 4c 47 41 20 52 41 53 as RASPBDLGA RAS
1030: 50 42 44 4c 47 3b 0d 0a 09 61 6c 69 61 73 20 52 PBDLG;...alias R
1040: 41 53 4e 4f 55 53 45 52 41 20 52 41 53 4e 4f 55 ASNOUSERA RASNOU
1050: 53 45 52 3b 0d 0a 09 61 6c 69 61 73 20 52 61 73 SER;...alias Ras
1060: 44 69 61 6c 44 6c 67 41 20 52 61 73 44 69 61 6c DialDlgA RasDial
1070: 44 6c 67 3b 0d 0a 09 61 6c 69 61 73 20 52 61 73 Dlg;...alias Ras
1080: 45 6e 74 72 79 44 6c 67 41 20 52 61 73 45 6e 74 EntryDlgA RasEnt
1090: 72 79 44 6c 67 3b 0d 0a 09 61 6c 69 61 73 20 52 ryDlg;...alias R
10a0: 61 73 50 68 6f 6e 65 62 6f 6f 6b 44 6c 67 41 20 asPhonebookDlgA
10b0: 52 61 73 50 68 6f 6e 65 62 6f 6f 6b 44 6c 67 3b RasPhonebookDlg;
10c0: 0d 0a 7d 0d 0a 0d 0a 61 6c 69 61 73 20 52 41 53 ..}....alias RAS
10d0: 45 4e 54 52 59 44 4c 47 2a 20 4c 50 52 41 53 45 ENTRYDLG* LPRASE
10e0: 4e 54 52 59 44 4c 47 3b 0d 0a 61 6c 69 61 73 20 NTRYDLG;..alias
10f0: 52 41 53 50 42 44 4c 47 2a 20 4c 50 52 41 53 50 RASPBDLG* LPRASP
1100: 42 44 4c 47 3b 0d 0a 61 6c 69 61 73 20 52 41 53 BDLG;..alias RAS
1110: 4e 4f 55 53 45 52 2a 20 4c 50 52 41 53 4e 4f 55 NOUSER* LPRASNOU
1120: 53 45 52 3b 0d 0a SER;..