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.

31 lines
1.2 KiB

  1. // zero fill functions
  2. #define ZERO_INIT_CLASS(base_class) \
  3. ClearMemory((PBYTE) ((base_class*) this) + sizeof(base_class*), \
  4. sizeof(*this) - sizeof(base_class*));
  5. #define ZERO_STRUCTURE(foo) ClearMemory(&foo, sizeof(foo))
  6. #define ClearMemory(p, cb) memset(p, 0, cb)
  7. // memory functions
  8. #define lcMalloc(x) malloc((size_t)x)
  9. #define lcFree(x) free((void*)x)
  10. // message box functions
  11. int MsgBox(int idString, UINT nType = MB_OK );
  12. int MsgBox(PCSTR pszMsg, UINT nType = MB_OK );
  13. PCSTR FindFilePortion( PCSTR pszFile );
  14. int JulianDate(int nDay, int nMonth, int nYear);
  15. HRESULT FileTimeToDateTimeString( FILETIME FileTime, LPTSTR pszDateTime );
  16. int FileTimeToJulianDate( FILETIME FileTime );
  17. // system directory functions
  18. typedef UINT (WINAPI *PFN_GETWINDOWSDIRECTORY)( LPTSTR lpBuffer, UINT uSize );
  19. typedef enum { HH_SYSTEM_WINDOWS_DIRECTORY, HH_USERS_WINDOWS_DIRECTORY } SYSDIRTYPES;
  20. UINT HHGetWindowsDirectory( LPSTR lpBuffer, UINT uSize, UINT uiType = HH_SYSTEM_WINDOWS_DIRECTORY );
  21. UINT HHGetHelpDirectory( LPSTR lpBuffer, UINT uSize );
  22. UINT HHGetGlobalCollectionPathname( LPTSTR lpBuffer, UINT uSize , BOOL *pbNewPath);
  23. HRESULT HHGetHelpDataPath( LPSTR pszPath );
  24. BOOL IsDirectory( LPCSTR lpszPathname );
  25. DWORD CreatePath(PSTR pszPath);