Hex Artifact Content

Not logged in

Artifact f83f87973b669ceecf8a361bcaefe16c280c761a:


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 0a 2a 20 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 6e 73 70 61 70             nspap
0070: 69 2e 64 20 20 20 20 20 20 20 20 20 20 20 20 20  i.d             
0080: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
0090: 20 20 2a 0a 2a 20 20 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 2a 0a 2a 20              *.* 
00e0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
00f0: 20 20 20 20 20 20 57 69 6e 64 6f 77 73 20 41 50        Windows AP
0100: 49 20 68 65 61 64 65 72 20 6d 6f 64 75 6c 65 20  I header module 
0110: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
0120: 20 20 20 20 20 20 2a 0a 2a 20 20 20 20 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: 2a 0a 2a 20 20 20 20 20 20 20 20 20 20 20 20 20  *.*             
0180: 20 20 20 20 54 72 61 6e 73 6c 61 74 65 64 20 66      Translated f
0190: 72 6f 6d 20 4d 69 6e 47 57 20 57 69 6e 64 6f 77  rom MinGW Window
01a0: 73 20 68 65 61 64 65 72 73 20 20 20 20 20 20 20  s headers       
01b0: 20 20 20 20 20 20 20 20 20 20 2a 0a 2a 20 20 20            *.*   
01c0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
01d0: 20 20 20 20 20 20 20 20 62 79 20 53 74 65 77 61          by Stewa
01e0: 72 74 20 47 6f 72 64 6f 6e 20 20 20 20 20 20 20  rt Gordon       
01f0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
0200: 20 20 20 20 2a 0a 2a 20 20 20 20 20 20 20 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 2a 0a                *.
0250: 2a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20  *               
0260: 20 20 20 20 20 20 20 20 50 6c 61 63 65 64 20 69          Placed i
0270: 6e 74 6f 20 70 75 62 6c 69 63 20 64 6f 6d 61 69  nto public domai
0280: 6e 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20  n               
0290: 20 20 20 20 20 20 20 20 2a 0a 5c 2a 2a 2a 2a 2a          *.\*****
02a0: 2a 2a 2a 2a 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 2f 0a 6d 6f 64 75 6c 65 20 77 69 6e 33 32  **/.module win32
02f0: 2e 6e 73 70 61 70 69 3b 0a 0a 70 72 69 76 61 74  .nspapi;..privat
0300: 65 20 69 6d 70 6f 72 74 20 77 69 6e 33 32 2e 62  e import win32.b
0310: 61 73 65 74 79 70 73 2c 20 77 69 6e 33 32 2e 77  asetyps, win32.w
0320: 69 6e 64 65 66 3b 0a 0a 2f 2f 20 46 49 58 4d 45  indef;..// FIXME
0330: 3a 20 63 68 65 63 6b 20 74 79 70 65 73 20 6f 66  : check types of
0340: 20 63 6f 6e 73 74 61 6e 74 73 0a 0a 65 6e 75 6d   constants..enum
0350: 20 7b 0a 09 4e 53 5f 41 4c 4c 20 20 20 20 20 20   {..NS_ALL      
0360: 20 20 20 3d 20 20 30 2c 0a 0a 09 4e 53 5f 53 41     =  0,...NS_SA
0370: 50 2c 0a 09 4e 53 5f 4e 44 53 2c 0a 09 4e 53 5f  P,..NS_NDS,..NS_
0380: 50 45 45 52 5f 42 52 4f 57 53 45 2c 0a 0a 09 4e  PEER_BROWSE,...N
0390: 53 5f 54 43 50 49 50 5f 4c 4f 43 41 4c 20 3d 20  S_TCPIP_LOCAL = 
03a0: 31 30 2c 0a 09 4e 53 5f 54 43 50 49 50 5f 48 4f  10,..NS_TCPIP_HO
03b0: 53 54 53 2c 0a 09 4e 53 5f 44 4e 53 2c 0a 09 4e  STS,..NS_DNS,..N
03c0: 53 5f 4e 45 54 42 54 2c 0a 09 4e 53 5f 57 49 4e  S_NETBT,..NS_WIN
03d0: 53 2c 0a 0a 09 4e 53 5f 4e 42 50 20 20 20 20 20  S,...NS_NBP     
03e0: 20 20 20 20 3d 20 32 30 2c 0a 0a 09 4e 53 5f 4d      = 20,...NS_M
03f0: 53 20 20 20 20 20 20 20 20 20 20 3d 20 33 30 2c  S          = 30,
0400: 0a 09 4e 53 5f 53 54 44 41 2c 0a 09 4e 53 5f 4e  ..NS_STDA,..NS_N
0410: 54 44 53 2c 0a 0a 09 4e 53 5f 58 35 30 30 20 20  TDS,...NS_X500  
0420: 20 20 20 20 20 20 3d 20 34 30 2c 0a 09 4e 53 5f        = 40,..NS_
0430: 4e 49 53 2c 0a 09 4e 53 5f 4e 49 53 50 4c 55 53  NIS,..NS_NISPLUS
0440: 2c 0a 0a 09 4e 53 5f 57 52 51 20 20 20 20 20 20  ,...NS_WRQ      
0450: 20 20 20 3d 20 35 30 0a 7d 0a 0a 65 6e 75 6d 20     = 50.}..enum 
0460: 7b 0a 09 53 45 52 56 49 43 45 5f 52 45 47 49 53  {..SERVICE_REGIS
0470: 54 45 52 20 20 20 3d 20 31 2c 0a 09 53 45 52 56  TER   = 1,..SERV
0480: 49 43 45 5f 44 45 52 45 47 49 53 54 45 52 20 3d  ICE_DEREGISTER =
0490: 20 32 2c 0a 09 53 45 52 56 49 43 45 5f 46 4c 55   2,..SERVICE_FLU
04a0: 53 48 20 20 20 20 20 20 3d 20 33 2c 0a 09 53 45  SH      = 3,..SE
04b0: 52 56 49 43 45 5f 46 4c 41 47 5f 48 41 52 44 20  RVICE_FLAG_HARD 
04c0: 20 3d 20 32 0a 7d 0a 0a 2f 2a 09 4d 69 6e 47 57   = 2.}../*.MinGW
04d0: 20 6d 61 6b 65 73 20 74 68 65 20 6e 65 78 74 20   makes the next 
04e0: 73 65 63 74 69 6f 6e 20 63 6f 6e 64 69 74 69 6f  section conditio
04f0: 6e 61 6c 20 6f 6e 20 77 69 6e 73 6f 63 6b 2e 68  nal on winsock.h
0500: 20 6f 72 20 77 69 6e 73 6f 63 6b 32 2e 68 0a 20   or winsock2.h. 
0510: 2a 09 62 65 69 6e 67 20 69 6e 63 6c 75 64 65 64  *.being included
0520: 2e 20 20 42 75 74 20 74 68 61 74 20 64 6f 65 73  .  But that does
0530: 6e 27 74 20 74 72 61 6e 73 6c 61 74 65 20 77 65  n't translate we
0540: 6c 6c 20 69 6e 74 6f 20 44 2e 0a 20 2a 2f 0a 76  ll into D.. */.v
0550: 65 72 73 69 6f 6e 20 28 57 69 6e 33 32 5f 57 69  ersion (Win32_Wi
0560: 6e 73 6f 63 6b 31 29 20 7b 0a 09 69 6d 70 6f 72  nsock1) {..impor
0570: 74 20 77 69 6e 33 32 2e 77 69 6e 73 6f 63 6b 3b  t win32.winsock;
0580: 0a 7d 20 65 6c 73 65 20 7b 0a 09 69 6d 70 6f 72  .} else {..impor
0590: 74 20 77 69 6e 33 32 2e 77 69 6e 73 6f 63 6b 32  t win32.winsock2
05a0: 3b 0a 7d 0a 0a 73 74 72 75 63 74 20 53 4f 43 4b  ;.}..struct SOCK
05b0: 45 54 5f 41 44 44 52 45 53 53 20 7b 0a 09 4c 50  ET_ADDRESS {..LP
05c0: 53 4f 43 4b 41 44 44 52 20 6c 70 53 6f 63 6b 61  SOCKADDR lpSocka
05d0: 64 64 72 3b 0a 09 49 4e 54 20 20 20 20 20 20 20  ddr;..INT       
05e0: 20 69 53 6f 63 6b 61 64 64 72 4c 65 6e 67 74 68   iSockaddrLength
05f0: 3b 0a 7d 0a 61 6c 69 61 73 20 53 4f 43 4b 45 54  ;.}.alias SOCKET
0600: 5f 41 44 44 52 45 53 53 2a 20 50 53 4f 43 4b 45  _ADDRESS* PSOCKE
0610: 54 5f 41 44 44 52 45 53 53 2c 20 4c 50 53 4f 43  T_ADDRESS, LPSOC
0620: 4b 45 54 5f 41 44 44 52 45 53 53 3b 0a 0a 73 74  KET_ADDRESS;..st
0630: 72 75 63 74 20 43 53 41 44 44 52 5f 49 4e 46 4f  ruct CSADDR_INFO
0640: 20 7b 0a 09 53 4f 43 4b 45 54 5f 41 44 44 52 45   {..SOCKET_ADDRE
0650: 53 53 20 4c 6f 63 61 6c 41 64 64 72 3b 0a 09 53  SS LocalAddr;..S
0660: 4f 43 4b 45 54 5f 41 44 44 52 45 53 53 20 52 65  OCKET_ADDRESS Re
0670: 6d 6f 74 65 41 64 64 72 3b 0a 09 49 4e 54 20 20  moteAddr;..INT  
0680: 20 20 20 20 20 20 20 20 20 20 69 53 6f 63 6b 65            iSocke
0690: 74 54 79 70 65 3b 0a 09 49 4e 54 20 20 20 20 20  tType;..INT     
06a0: 20 20 20 20 20 20 20 69 50 72 6f 74 6f 63 6f 6c         iProtocol
06b0: 3b 0a 7d 0a 61 6c 69 61 73 20 43 53 41 44 44 52  ;.}.alias CSADDR
06c0: 5f 49 4e 46 4f 2a 20 50 43 53 41 44 44 52 5f 49  _INFO* PCSADDR_I
06d0: 4e 46 4f 2c 20 4c 50 43 53 41 44 44 52 5f 49 4e  NFO, LPCSADDR_IN
06e0: 46 4f 3b 0a 0a 73 74 72 75 63 74 20 42 4c 4f 42  FO;..struct BLOB
06f0: 20 7b 0a 09 55 4c 4f 4e 47 20 63 62 53 69 7a 65   {..ULONG cbSize
0700: 3b 0a 09 42 59 54 45 2a 20 70 42 6c 6f 62 44 61  ;..BYTE* pBlobDa
0710: 74 61 3b 0a 7d 0a 61 6c 69 61 73 20 42 4c 4f 42  ta;.}.alias BLOB
0720: 2a 20 50 42 4c 4f 42 2c 20 4c 50 42 4c 4f 42 3b  * PBLOB, LPBLOB;
0730: 0a 0a 73 74 72 75 63 74 20 53 45 52 56 49 43 45  ..struct SERVICE
0740: 5f 41 44 44 52 45 53 53 20 7b 0a 09 44 57 4f 52  _ADDRESS {..DWOR
0750: 44 20 64 77 41 64 64 72 65 73 73 54 79 70 65 3b  D dwAddressType;
0760: 0a 09 44 57 4f 52 44 20 64 77 41 64 64 72 65 73  ..DWORD dwAddres
0770: 73 46 6c 61 67 73 3b 0a 09 44 57 4f 52 44 20 64  sFlags;..DWORD d
0780: 77 41 64 64 72 65 73 73 4c 65 6e 67 74 68 3b 0a  wAddressLength;.
0790: 09 44 57 4f 52 44 20 64 77 50 72 69 6e 63 69 70  .DWORD dwPrincip
07a0: 61 6c 4c 65 6e 67 74 68 3b 0a 09 42 59 54 45 2a  alLength;..BYTE*
07b0: 20 6c 70 41 64 64 72 65 73 73 3b 0a 09 42 59 54   lpAddress;..BYT
07c0: 45 2a 20 6c 70 50 72 69 6e 63 69 70 61 6c 3b 0a  E* lpPrincipal;.
07d0: 7d 0a 0a 73 74 72 75 63 74 20 53 45 52 56 49 43  }..struct SERVIC
07e0: 45 5f 41 44 44 52 45 53 53 45 53 20 7b 0a 09 44  E_ADDRESSES {..D
07f0: 57 4f 52 44 20 20 20 20 20 20 20 20 20 20 20 64  WORD           d
0800: 77 41 64 64 72 65 73 73 43 6f 75 6e 74 3b 0a 09  wAddressCount;..
0810: 53 45 52 56 49 43 45 5f 41 44 44 52 45 53 53 20  SERVICE_ADDRESS 
0820: 5f 41 64 64 72 65 73 73 65 73 3b 0a 0a 09 53 45  _Addresses;...SE
0830: 52 56 49 43 45 5f 41 44 44 52 45 53 53 2a 20 41  RVICE_ADDRESS* A
0840: 64 64 72 65 73 73 65 73 28 29 20 7b 20 72 65 74  ddresses() { ret
0850: 75 72 6e 20 26 5f 41 64 64 72 65 73 73 65 73 3b  urn &_Addresses;
0860: 20 7d 0a 7d 0a 61 6c 69 61 73 20 53 45 52 56 49   }.}.alias SERVI
0870: 43 45 5f 41 44 44 52 45 53 53 45 53 2a 20 50 53  CE_ADDRESSES* PS
0880: 45 52 56 49 43 45 5f 41 44 44 52 45 53 53 45 53  ERVICE_ADDRESSES
0890: 2c 20 4c 50 53 45 52 56 49 43 45 5f 41 44 44 52  , LPSERVICE_ADDR
08a0: 45 53 53 45 53 3b 0a 0a 73 74 72 75 63 74 20 53  ESSES;..struct S
08b0: 45 52 56 49 43 45 5f 49 4e 46 4f 41 20 7b 0a 09  ERVICE_INFOA {..
08c0: 4c 50 47 55 49 44 20 6c 70 53 65 72 76 69 63 65  LPGUID lpService
08d0: 54 79 70 65 3b 0a 09 4c 50 53 54 52 20 20 6c 70  Type;..LPSTR  lp
08e0: 53 65 72 76 69 63 65 4e 61 6d 65 3b 0a 09 4c 50  ServiceName;..LP
08f0: 53 54 52 20 20 6c 70 43 6f 6d 6d 65 6e 74 3b 0a  STR  lpComment;.
0900: 09 4c 50 53 54 52 20 20 6c 70 4c 6f 63 61 6c 65  .LPSTR  lpLocale
0910: 3b 0a 09 44 57 4f 52 44 20 20 64 77 44 69 73 70  ;..DWORD  dwDisp
0920: 6c 61 79 48 69 6e 74 3b 0a 09 44 57 4f 52 44 20  layHint;..DWORD 
0930: 20 64 77 56 65 72 73 69 6f 6e 3b 0a 09 44 57 4f   dwVersion;..DWO
0940: 52 44 20 20 64 77 54 69 6d 65 3b 0a 09 4c 50 53  RD  dwTime;..LPS
0950: 54 52 20 20 6c 70 4d 61 63 68 69 6e 65 4e 61 6d  TR  lpMachineNam
0960: 65 3b 0a 09 4c 50 53 45 52 56 49 43 45 5f 41 44  e;..LPSERVICE_AD
0970: 44 52 45 53 53 45 53 20 6c 70 53 65 72 76 69 63  DRESSES lpServic
0980: 65 41 64 64 72 65 73 73 3b 0a 09 42 4c 4f 42 20  eAddress;..BLOB 
0990: 20 20 53 65 72 76 69 63 65 53 70 65 63 69 66 69    ServiceSpecifi
09a0: 63 49 6e 66 6f 3b 0a 7d 0a 61 6c 69 61 73 20 53  cInfo;.}.alias S
09b0: 45 52 56 49 43 45 5f 49 4e 46 4f 41 2a 20 4c 50  ERVICE_INFOA* LP
09c0: 53 45 52 56 49 43 45 5f 49 4e 46 4f 41 3b 0a 0a  SERVICE_INFOA;..
09d0: 73 74 72 75 63 74 20 53 45 52 56 49 43 45 5f 49  struct SERVICE_I
09e0: 4e 46 4f 57 20 7b 0a 09 4c 50 47 55 49 44 20 6c  NFOW {..LPGUID l
09f0: 70 53 65 72 76 69 63 65 54 79 70 65 3b 0a 09 4c  pServiceType;..L
0a00: 50 57 53 54 52 20 6c 70 53 65 72 76 69 63 65 4e  PWSTR lpServiceN
0a10: 61 6d 65 3b 0a 09 4c 50 57 53 54 52 20 6c 70 43  ame;..LPWSTR lpC
0a20: 6f 6d 6d 65 6e 74 3b 0a 09 4c 50 57 53 54 52 20  omment;..LPWSTR 
0a30: 6c 70 4c 6f 63 61 6c 65 3b 0a 09 44 57 4f 52 44  lpLocale;..DWORD
0a40: 20 20 64 77 44 69 73 70 6c 61 79 48 69 6e 74 3b    dwDisplayHint;
0a50: 0a 09 44 57 4f 52 44 20 20 64 77 56 65 72 73 69  ..DWORD  dwVersi
0a60: 6f 6e 3b 0a 09 44 57 4f 52 44 20 20 64 77 54 69  on;..DWORD  dwTi
0a70: 6d 65 3b 0a 09 4c 50 57 53 54 52 20 6c 70 4d 61  me;..LPWSTR lpMa
0a80: 63 68 69 6e 65 4e 61 6d 65 3b 0a 09 4c 50 53 45  chineName;..LPSE
0a90: 52 56 49 43 45 5f 41 44 44 52 45 53 53 45 53 20  RVICE_ADDRESSES 
0aa0: 6c 70 53 65 72 76 69 63 65 41 64 64 72 65 73 73  lpServiceAddress
0ab0: 3b 0a 09 42 4c 4f 42 20 20 20 53 65 72 76 69 63  ;..BLOB   Servic
0ac0: 65 53 70 65 63 69 66 69 63 49 6e 66 6f 3b 0a 7d  eSpecificInfo;.}
0ad0: 0a 61 6c 69 61 73 20 53 45 52 56 49 43 45 5f 49  .alias SERVICE_I
0ae0: 4e 46 4f 57 2a 20 4c 50 53 45 52 56 49 43 45 5f  NFOW* LPSERVICE_
0af0: 49 4e 46 4f 57 3b 0a 0a 61 6c 69 61 73 20 76 6f  INFOW;..alias vo
0b00: 69 64 2a 20 4c 50 53 45 52 56 49 43 45 5f 41 53  id* LPSERVICE_AS
0b10: 59 4e 43 5f 49 4e 46 4f 3b 0a 0a 65 78 74 65 72  YNC_INFO;..exter
0b20: 6e 20 28 57 69 6e 64 6f 77 73 29 20 7b 0a 09 49  n (Windows) {..I
0b30: 4e 54 20 53 65 74 53 65 72 76 69 63 65 41 28 44  NT SetServiceA(D
0b40: 57 4f 52 44 2c 20 44 57 4f 52 44 2c 20 44 57 4f  WORD, DWORD, DWO
0b50: 52 44 2c 20 4c 50 53 45 52 56 49 43 45 5f 49 4e  RD, LPSERVICE_IN
0b60: 46 4f 41 2c 0a 09 20 20 4c 50 53 45 52 56 49 43  FOA,..  LPSERVIC
0b70: 45 5f 41 53 59 4e 43 5f 49 4e 46 4f 2c 20 4c 50  E_ASYNC_INFO, LP
0b80: 44 57 4f 52 44 29 3b 0a 09 49 4e 54 20 53 65 74  DWORD);..INT Set
0b90: 53 65 72 76 69 63 65 57 28 44 57 4f 52 44 2c 20  ServiceW(DWORD, 
0ba0: 44 57 4f 52 44 2c 20 44 57 4f 52 44 2c 20 4c 50  DWORD, DWORD, LP
0bb0: 53 45 52 56 49 43 45 5f 49 4e 46 4f 57 2c 0a 09  SERVICE_INFOW,..
0bc0: 20 20 4c 50 53 45 52 56 49 43 45 5f 41 53 59 4e    LPSERVICE_ASYN
0bd0: 43 5f 49 4e 46 4f 2c 20 4c 50 44 57 4f 52 44 29  C_INFO, LPDWORD)
0be0: 3b 0a 09 49 4e 54 20 47 65 74 41 64 64 72 65 73  ;..INT GetAddres
0bf0: 73 42 79 4e 61 6d 65 41 28 44 57 4f 52 44 2c 20  sByNameA(DWORD, 
0c00: 4c 50 47 55 49 44 2c 20 4c 50 53 54 52 2c 20 4c  LPGUID, LPSTR, L
0c10: 50 49 4e 54 2c 20 44 57 4f 52 44 2c 0a 09 20 20  PINT, DWORD,..  
0c20: 4c 50 53 45 52 56 49 43 45 5f 41 53 59 4e 43 5f  LPSERVICE_ASYNC_
0c30: 49 4e 46 4f 2c 20 4c 50 56 4f 49 44 2c 20 4c 50  INFO, LPVOID, LP
0c40: 44 57 4f 52 44 2c 20 4c 50 53 54 52 2c 20 4c 50  DWORD, LPSTR, LP
0c50: 44 57 4f 52 44 29 3b 0a 09 49 4e 54 20 47 65 74  DWORD);..INT Get
0c60: 41 64 64 72 65 73 73 42 79 4e 61 6d 65 57 28 44  AddressByNameW(D
0c70: 57 4f 52 44 2c 20 4c 50 47 55 49 44 2c 20 4c 50  WORD, LPGUID, LP
0c80: 57 53 54 52 2c 20 4c 50 49 4e 54 2c 20 44 57 4f  WSTR, LPINT, DWO
0c90: 52 44 2c 0a 09 20 20 4c 50 53 45 52 56 49 43 45  RD,..  LPSERVICE
0ca0: 5f 41 53 59 4e 43 5f 49 4e 46 4f 2c 20 4c 50 56  _ASYNC_INFO, LPV
0cb0: 4f 49 44 2c 20 4c 50 44 57 4f 52 44 2c 20 4c 50  OID, LPDWORD, LP
0cc0: 57 53 54 52 2c 20 4c 50 44 57 4f 52 44 29 3b 0a  WSTR, LPDWORD);.
0cd0: 7d 0a 0a 76 65 72 73 69 6f 6e 20 28 55 6e 69 63  }..version (Unic
0ce0: 6f 64 65 29 20 7b 0a 09 61 6c 69 61 73 20 53 45  ode) {..alias SE
0cf0: 52 56 49 43 45 5f 49 4e 46 4f 57 20 53 45 52 56  RVICE_INFOW SERV
0d00: 49 43 45 5f 49 4e 46 4f 3b 0a 09 61 6c 69 61 73  ICE_INFO;..alias
0d10: 20 53 65 74 53 65 72 76 69 63 65 57 20 53 65 74   SetServiceW Set
0d20: 53 65 72 76 69 63 65 3b 0a 09 61 6c 69 61 73 20  Service;..alias 
0d30: 47 65 74 41 64 64 72 65 73 73 42 79 4e 61 6d 65  GetAddressByName
0d40: 57 20 47 65 74 41 64 64 72 65 73 73 42 79 4e 61  W GetAddressByNa
0d50: 6d 65 3b 0a 7d 20 65 6c 73 65 20 7b 0a 09 61 6c  me;.} else {..al
0d60: 69 61 73 20 53 45 52 56 49 43 45 5f 49 4e 46 4f  ias SERVICE_INFO
0d70: 41 20 53 45 52 56 49 43 45 5f 49 4e 46 4f 3b 0a  A SERVICE_INFO;.
0d80: 09 61 6c 69 61 73 20 53 65 74 53 65 72 76 69 63  .alias SetServic
0d90: 65 41 20 53 65 74 53 65 72 76 69 63 65 3b 0a 09  eA SetService;..
0da0: 61 6c 69 61 73 20 47 65 74 41 64 64 72 65 73 73  alias GetAddress
0db0: 42 79 4e 61 6d 65 41 20 47 65 74 41 64 64 72 65  ByNameA GetAddre
0dc0: 73 73 42 79 4e 61 6d 65 3b 0a 7d 0a 0a 61 6c 69  ssByName;.}..ali
0dd0: 61 73 20 53 45 52 56 49 43 45 5f 49 4e 46 4f 20  as SERVICE_INFO 
0de0: 5f 53 45 52 56 49 43 45 5f 49 4e 46 4f 3b 0a 61  _SERVICE_INFO;.a
0df0: 6c 69 61 73 20 53 45 52 56 49 43 45 5f 49 4e 46  lias SERVICE_INF
0e00: 4f 2a 20 4c 50 53 45 52 56 49 43 45 5f 49 4e 46  O* LPSERVICE_INF
0e10: 4f 3b 0a                                         O;.