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.

109 lines
4.6 KiB

  1. /*******************************************************************************
  2. *
  3. * utildll.h
  4. *
  5. * UTILDLL WinStation utility support functions header file (export stuff)
  6. *
  7. *
  8. *******************************************************************************/
  9. #ifdef __cplusplus
  10. extern "C" {
  11. #endif
  12. /*
  13. * UTILDLL defines and typedefs
  14. */
  15. typedef struct _ELAPSEDTIME {
  16. USHORT days;
  17. USHORT hours;
  18. USHORT minutes;
  19. USHORT seconds;
  20. } ELAPSEDTIME, * PELAPSEDTIME;
  21. #define MAX_PROCESSNAME 18
  22. #define UTILDLL_NAME TEXT("UTILDLL.DLL")
  23. #define SYSTEM_MESSAGE_MAX 528
  24. #define MAX_ELAPSED_TIME_LENGTH 13
  25. #define MAX_DATE_TIME_LENGTH 56
  26. #define NO_ERROR_TEXT_LENGTH 100
  27. #define STANDARD_ERROR_TEXT_LENGTH 100
  28. /*
  29. * UTILDLL function prototypes
  30. */
  31. void WINAPIV StandardErrorMessage( LPCTSTR pszAppName,
  32. HWND hwndApp,
  33. HINSTANCE hinstApp,
  34. ULONG LogonId,
  35. UINT nId,
  36. int nErrorMessageLength,
  37. int nArgumentListLength,
  38. int nErrorResourceID, ...);
  39. LPWSTR WINAPI GetSystemMessageW( ULONG LogonId, UINT nId /*, LPWSTR chBuffer, int chBuffSize*/ );
  40. LPSTR WINAPI GetSystemMessageA( ULONG LogonId, UINT nId /*, LPSTR chBuffer, int chBuffSize*/ );
  41. #ifdef UNICODE
  42. #define GetSystemMessage GetSystemMessageW
  43. #else
  44. #define GetSystemMessage GetSystemMessageA
  45. #endif
  46. PPDPARAMS WINAPI WinEnumerateDevices( HWND hWnd,
  47. PPDCONFIG3 pPdConfig,
  48. PULONG pEntries,
  49. BOOL bInSetup );
  50. BOOL WINAPI NetworkDeviceEnumerate( PPDCONFIG3, PULONG, PPDPARAMS,
  51. PULONG, BOOL );
  52. BOOL WINAPI QueryCurrentWinStation( PWINSTATIONNAME pWSName, LPTSTR pUserName,
  53. PULONG pLogonId, PULONG pWSFlags );
  54. LONG WINAPI RegGetNetworkDeviceName( HANDLE hServer, PPDCONFIG3 pPdConfig,
  55. PPDPARAMS pPdParams, LPTSTR szDeviceName,
  56. int nDeviceName );
  57. LONG WINAPI RegGetNetworkServiceName( HANDLE hServer,
  58. LPTSTR szServiceKey,
  59. LPTSTR szServiceName,
  60. int nServiceName );
  61. BOOL WINAPI AsyncDeviceEnumerate( PPDCONFIG3, PULONG, PPDPARAMS,
  62. PULONG, BOOL );
  63. BOOL WINAPI NetBIOSDeviceEnumerate( PPDCONFIG3, PULONG, PPDPARAMS,
  64. PULONG, BOOL );
  65. void WINAPI FormDecoratedAsyncDeviceName( LPTSTR pDeviceName,
  66. PASYNCCONFIG pAsyncConfig );
  67. void WINAPI ParseDecoratedAsyncDeviceName( LPCTSTR pDeviceName,
  68. PASYNCCONFIG pAsyncConfig );
  69. void WINAPI SetupAsyncCdConfig( PASYNCCONFIG pAsyncConfig,
  70. PCDCONFIG pCdConfig );
  71. BOOL WINAPI InstallModem( HWND hwndOwner );
  72. BOOL WINAPI ConfigureModem( LPCTSTR pModemName, HWND hwndOwner );
  73. BOOL GetAssociatedPortName(char *szKeyName, WCHAR *wszPortName);
  74. void WINAPI InitializeAnonymousUserCompareList( const WCHAR *pszServer );
  75. BOOL WINAPI HaveAnonymousUsersChanged();
  76. void WINAPI GetUserFromSid( PSID pSid, LPTSTR pUserName, DWORD cbUserName );
  77. void WINAPI CachedGetUserFromSid( PSID pSid, PWCHAR pUserName, PULONG cbUserName );
  78. BOOL WINAPI TestUserForAdmin( BOOL dom );
  79. BOOL WINAPI IsPartOfDomain( VOID );
  80. LPCTSTR WINAPI StrSdClass( SDCLASS SdClass );
  81. LPCTSTR WINAPI StrConnectState( WINSTATIONSTATECLASS ConnectState,
  82. BOOL bShortString );
  83. LPCTSTR WINAPI StrProcessState( ULONG State );
  84. LPCTSTR WINAPI StrSystemWaitReason( ULONG WaitReason );
  85. LPCTSTR WINAPI GetUnknownString();
  86. void WINAPI CalculateElapsedTime( LARGE_INTEGER *pTime,
  87. ELAPSEDTIME *pElapsedTime );
  88. int WINAPI CompareElapsedTime( ELAPSEDTIME *pElapsedTime1,
  89. ELAPSEDTIME *pElapsedTime2,
  90. BOOL bCompareSeconds );
  91. void WINAPI ElapsedTimeString( ELAPSEDTIME *pElapsedTime,
  92. BOOL bIncludeSeconds,
  93. LPTSTR pString );
  94. void WINAPI DateTimeString( LARGE_INTEGER *pTime, LPTSTR pString );
  95. void WINAPI CurrentDateTimeString( LPTSTR pString );
  96. LARGE_INTEGER WINAPI CalculateDiffTime( LARGE_INTEGER, LARGE_INTEGER );
  97. LPWSTR WINAPI EnumerateMultiUserServers( LPWSTR pDomain );
  98. BOOL CtxGetAnyDCName( PWCHAR pServer, PWCHAR pDomain, PWCHAR pBuffer );
  99. #ifdef __cplusplus
  100. }
  101. #endif