Leaked source code of windows server 2003
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.

68 lines
2.9 KiB

  1. // CDINST.H
  2. // macro definitions
  3. #define REMOVE_QUOTES 0x01
  4. #define IGNORE_QUOTES 0x02
  5. #define MAX_BUF_LEN (32 * 1024) // 32K - 1 is the size limit for a section in an INF
  6. #define IsSpace(c) ((c) == ' ' || (c) == '\t' || (c) == '\r' || (c) == '\n' || (c) == '\v' || (c) == '\f')
  7. #define PathIsFullPath(p) ((p)[1] == ':' && (p)[2] == '\\')
  8. #define PathIsUNC(p) ((p)[0] == '\\' && (p)[1] == '\\')
  9. // type definitions
  10. typedef HRESULT (WINAPI * EXTRACTFILES)(LPCSTR pszCabName, LPCSTR pszExpandDir, DWORD dwFlags,
  11. LPCSTR pszFileList, LPVOID lpReserved, DWORD dwReserved);
  12. // prototype declarations for functions in cdinst.cpp
  13. BOOL EnoughDiskSpace(LPCSTR pcszSrcRootDir, LPCSTR pcszDstRootDir, LPCSTR pcszIniFile, LPDWORD pdwSpaceReq, LPDWORD pdwSpaceFree);
  14. BOOL GetFreeDiskSpace(LPCSTR pcszDir, LPDWORD pdwFreeSpace, LPDWORD pdwFlags);
  15. DWORD FindSpaceRequired(LPCSTR pcszSrcDir, LPCSTR pcszFile, LPCSTR pcszDstDir);
  16. VOID ParseIniLine(LPSTR pszLine, LPSTR *ppszFile, LPSTR *ppszSrcDir, LPSTR *ppszDstDir);
  17. LPSTR GetDirPath(LPCSTR pcszRootDir, LPCSTR pcszSubDir, CHAR szDirPath[], DWORD cchBuffer, LPCSTR pcszIniFile);
  18. DWORD ReplacePlaceholders(LPCSTR pszSrc, LPCSTR pszIns, LPSTR pszBuffer, DWORD cchBuffer);
  19. VOID SetAttribsToNormal(LPCSTR pcszFile, LPCSTR pcszDir);
  20. VOID CopyFiles(LPCSTR pcszSrcDir, LPCSTR pcszFile, LPCSTR pcszDstDir, BOOL fQuiet);
  21. VOID DelFiles(LPCSTR pcszFile, LPCSTR pcszDstDir);
  22. VOID ExtractFiles(LPCSTR pcszSrcDir, LPCSTR pcszFile, LPCSTR pcszDstDir, EXTRACTFILES pfnExtractFiles);
  23. VOID MoveFiles(LPCSTR pcszSrcDir, LPCSTR pcszFile, LPCSTR pcszDstDir);
  24. // prototype declarations for functions in utils.cpp
  25. VOID ParseCmdLine(LPSTR pszCmdLine);
  26. DWORD ReadSectionFromInf(LPCSTR pcszSecName, LPSTR *ppszBuf, PDWORD pdwBufLen, LPCSTR pcszInfName);
  27. BOOL PathExists(LPCSTR pcszDir);
  28. BOOL FileExists(LPCSTR pcszFileName);
  29. DWORD FileSize(LPCSTR pcszFile);
  30. LPSTR AddPath(LPSTR pszPath, LPCSTR pcszFileName);
  31. BOOL PathIsUNCServer(LPCSTR pcszPath);
  32. BOOL PathIsUNCServerShare(LPCSTR pcszPath);
  33. BOOL PathCreatePath(LPCSTR pcszPathToCreate);
  34. VOID ErrorMsg(UINT uStringID);
  35. VOID ErrorMsg(UINT uStringID, LPCSTR pcszParam1, LPCSTR pcszParam2);
  36. INT ErrorMsg(UINT uStringID, DWORD dwParam1, DWORD dwParam2);
  37. LPSTR FormatMessageString(UINT uStringID, LPCSTR pcszParam1, LPCSTR pcszParam2);
  38. LPSTR FormatMessageString(UINT uStringID, DWORD dwParam1, DWORD dwParam2);
  39. LPSTR FormatString(LPCSTR pcszFormatString, ...);
  40. LPSTR GetNextField(LPSTR *ppszData, LPCSTR pcszDeLims, DWORD dwFlags);
  41. LPSTR Trim(LPSTR pszData);
  42. LPSTR FAR ANSIStrChr(LPCSTR lpStart, WORD wMatch);
  43. LPSTR FAR ANSIStrRChr(LPCSTR lpStart, WORD wMatch);
  44. __inline BOOL ChrCmpA_inline(WORD w1, WORD wMatch);
  45. // extern declaration of global variables
  46. extern HINSTANCE g_hInst;
  47. extern CHAR g_szTitle[];
  48. extern CHAR g_szSrcDir[], g_szDstDir[];