Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

104 lines
3.1 KiB

  1. //
  2. // This is the header file for simple conference name resolution
  3. //
  4. // Created: ClausGi 11-02-95
  5. //
  6. #ifndef _NAME_RES_H
  7. #define _NAME_RES_H
  8. // These are provisional
  9. #define NAMETYPE_UNKNOWN 0
  10. #define NAMETYPE_IP 1
  11. #define NAMETYPE_PSTN 2
  12. #define NAMETYPE_IPX 3
  13. #define NAMETYPE_NDS 4
  14. #define NAMETYPE_ULS 5
  15. #define NAMETYPE_NETBIOS 6
  16. #define NAMETYPE_COMM 7
  17. #define NAMETYPE_H323GTWY 8
  18. #define NAMETYPE_RAS 9
  19. #define NAMETYPE_ALIAS_ID 10
  20. #define NAMETYPE_ALIAS_E164 11
  21. #define NAMETYPE_CALLTO 12
  22. #define NAMETYPE_DEFAULT NAMETYPE_IP
  23. #define NUM_NAMETYPES 8
  24. #define MAX_UNRESOLVED_NAME 255
  25. #define MAX_RESOLVED_NAME 255
  26. #define MAX_DISPLAY_NAME 255
  27. // These must correspond to above BUGBUG localize?
  28. // These should not be used - check "Display Name" in the registry
  29. //
  30. // These are obsolete and not being used
  31. #define NAMESTRING_UNKNOWN "Unknown"
  32. #define NAMESTRING_IP "Network (IP)"
  33. #define NAMESTRING_PSTN "Telephone Number"
  34. #define NAMESTRING_IPX "Network (IPX)"
  35. #define NAMESTRING_NDS "Network (NDS)"
  36. #define NAMESTRING_ISP "Internet Name"
  37. #define NAMESTRING_NETBIOS "Network (NETBIOS)"
  38. // Name resolution return codes:
  39. #define RN_SUCCESS 0 // valid return
  40. #define RN_FAIL 1 // general error return
  41. #define RN_NAMERES_NOT_INIT 2 // name service not initialized
  42. #define RN_XPORT_DISABLED 3 // requested transport disabled
  43. #define RN_XPORT_NOTFUNC 4 // requested transport not functioning
  44. #define RN_TOO_AMBIGUOUS 5 // the unknown name type was too ambiguous
  45. #define RN_POOR_MATCH 6 // best syntax match not good enough
  46. #define RN_NO_SYNTAX_MATCH 7 // didn't match syntax for any active xport
  47. #define RN_ERROR 8 // internal ("unexpected") error
  48. #define RN_LOOPBACK 9 // address is identified as own
  49. #define RN_PENDING 10 // return of async request
  50. #define RN_INVALID_PARAMETER 11 // error in function parameters
  51. #define RN_NAMERES_BUSY 12 // Timed out on a mutex
  52. #define RN_ASYNC 13 // Name resolution is async
  53. #define RN_SERVER_SERVICE 14 // Specially designated for ULS (ILS_E_SERVER_SERVICE)
  54. // Name resolution callstruct dwFlags fields
  55. #define RNF_ASYNC 0x00000001 // Specifies async resolution
  56. #define RNF_CANCEL 0x00000002 // Cancels all async resolution ops
  57. #define RNF_FIRSTMATCH 0x00000004
  58. typedef DWORD (WINAPI * PRN_CALLBACK)(LPBYTE pRN_CS); //BUGBUG type
  59. typedef struct tag_ResolveNameCallstruct {
  60. DWORD IN dwFlags;
  61. DWORD IN OUT dwAsyncId;
  62. DWORD OUT dwAsyncError;
  63. PRN_CALLBACK pCallback;
  64. DWORD IN OUT dwNameType;
  65. TCHAR IN szName[MAX_UNRESOLVED_NAME+1];
  66. TCHAR OUT szResolvedName[MAX_RESOLVED_NAME+1];
  67. TCHAR OUT szDisplayName[MAX_DISPLAY_NAME+1];
  68. } RN_CS, * PRN_CS;
  69. // Functions:
  70. extern DWORD WINAPI ResolveName2 (
  71. IN OUT PRN_CS pRN_CS );
  72. extern DWORD WINAPI ResolveName (
  73. IN LPCSTR szName,
  74. IN OUT LPDWORD lpdwNameType,
  75. OUT LPBYTE lpResult,
  76. IN OUT LPDWORD lpdwResult,
  77. OUT LPSTR lpszDisplayName,
  78. IN OUT LPDWORD lpdwDisplayName,
  79. OUT LPUINT puAsyncRequest);
  80. extern BOOL InitializeNameServices(VOID);
  81. extern VOID DeInitializeNameServices(VOID);
  82. extern BOOL IsNameServiceInitialized(DWORD dwNameType);
  83. #endif //#ifndef _NAME_RES_H