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.

108 lines
3.9 KiB

  1. //
  2. // NConn16.h
  3. //
  4. #ifndef __NCONN16_H__
  5. #define __NCONN16_H__
  6. #ifndef EXTERN_C
  7. #ifdef __cplusplus
  8. #define EXTERN_C extern "C"
  9. #else
  10. #define EXTERN_C
  11. #endif
  12. #endif
  13. typedef DWORD DEVNODE, DEVINST;
  14. #ifndef WIN32
  15. typedef LONG HRESULT;
  16. #define S_OK ((HRESULT)0x00000000L)
  17. #define S_FALSE ((HRESULT)0x00000001L)
  18. //#define E_FAIL ((HRESULT)0x80004005L)
  19. //#define E_POINTER ((HRESULT)0x80004003L)
  20. //#define E_INVALIDARG ((HRESULT)0x80000003L)
  21. #else
  22. #define VCP_ERROR 300
  23. enum _ERR_VCP
  24. {
  25. ERR_VCP_IOFAIL = (VCP_ERROR + 1), // File I/O failure
  26. ERR_VCP_STRINGTOOLONG, // String length limit exceeded
  27. ERR_VCP_NOMEM, // Insufficient memory to comply
  28. ERR_VCP_QUEUEFULL, // Trying to add a node to a maxed-out queue
  29. ERR_VCP_NOVHSTR, // No string handles available
  30. ERR_VCP_OVERFLOW, // Reference count would overflow
  31. ERR_VCP_BADARG, // Invalid argument to function
  32. ERR_VCP_UNINIT, // String library not initialized
  33. ERR_VCP_NOTFOUND , // String not found in string table
  34. ERR_VCP_BUSY, // Can't do that now
  35. ERR_VCP_INTERRUPTED, // User interrupted operation
  36. ERR_VCP_BADDEST, // Invalid destination directory
  37. ERR_VCP_SKIPPED, // User skipped operation
  38. ERR_VCP_IO, // Hardware error encountered
  39. ERR_VCP_LOCKED, // List is locked
  40. ERR_VCP_WRONGDISK, // The wrong disk is in the drive
  41. ERR_VCP_CHANGEMODE, //
  42. ERR_VCP_LDDINVALID, // Logical Disk ID Invalid.
  43. ERR_VCP_LDDFIND, // Logical Disk ID not found.
  44. ERR_VCP_LDDUNINIT, // Logical Disk Descriptor Uninitialized.
  45. ERR_VCP_LDDPATH_INVALID,
  46. ERR_VCP_NOEXPANSION, // Failed to load expansion dll
  47. ERR_VCP_NOTOPEN, // Copy session not open
  48. ERR_VCP_NO_DIGITAL_SIGNATURE_CATALOG, // Catalog is not digitally signed
  49. ERR_VCP_NO_DIGITAL_SIGNATURE_FILE, // A file is not digitally signed
  50. };
  51. // Return error codes for NDI_ messages.
  52. #define NDI_ERROR (1200)
  53. enum _ERR_NET_DEVICE_INSTALL
  54. {
  55. ERR_NDI_ERROR = NDI_ERROR, // generic failure
  56. ERR_NDI_INVALID_HNDI,
  57. ERR_NDI_INVALID_DEVICE_INFO,
  58. ERR_NDI_INVALID_DRIVER_PROC,
  59. ERR_NDI_LOW_MEM,
  60. ERR_NDI_REG_API,
  61. ERR_NDI_NOTBOUND,
  62. ERR_NDI_NO_MATCH,
  63. ERR_NDI_INVALID_NETCLASS,
  64. ERR_NDI_INSTANCE_ONCE,
  65. ERR_NDI_CANCEL,
  66. ERR_NDI_NO_DEFAULT,
  67. };
  68. #endif
  69. //
  70. // Exported functions
  71. //
  72. EXTERN_C BOOL WINAPI RestartWindowsQuickly16(VOID);
  73. EXTERN_C DWORD WINAPI CallClassInstaller16(HWND hwndParent, LPCSTR lpszClassName, LPCSTR lpszDeviceID);
  74. EXTERN_C DWORD WINAPI InstallAdapter(HWND hwndParent, LPCSTR lpszClassName, LPCSTR szDeviceID, LPCSTR szDriverPath);
  75. EXTERN_C HRESULT WINAPI FindClassDev16(HWND hwndParent, LPCSTR pszClass, LPCSTR pszDeviceID);
  76. EXTERN_C HRESULT WINAPI LookupDevNode16(HWND hwndParent, LPCSTR pszClass, LPCSTR pszEnumKey, DEVNODE FAR* pDevNode, DWORD FAR* pdwFreePointer);
  77. EXTERN_C HRESULT WINAPI FreeDevNode16(DWORD dwFreePointer);
  78. EXTERN_C HRESULT WINAPI IcsUninstall16(void);
  79. //
  80. // CallClassInstaller16 (a.k.a. InstallComponent) return codes
  81. //
  82. #define ICERR_ERROR 0x80000000 // High bit indicates error condition
  83. #define ICERR_DI_ERROR 0xC0000000 // These bits are set on DI errors
  84. // Custom status return values (no error)
  85. #define ICERR_OK 0x00000000
  86. #define ICERR_NEED_RESTART 0x00000001
  87. #define ICERR_NEED_REBOOT 0x00000002
  88. // Custom error return values
  89. #define ICERR_INVALID_PARAMETER 0x80000001
  90. #endif // !__NCONN16_H__