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.

75 lines
3.0 KiB

  1. /*
  2. * comc.h - Shared routines description.
  3. */
  4. /* Types
  5. ********/
  6. /* input flags to MyExecute() */
  7. typedef enum myexecute_in_flags
  8. {
  9. /*
  10. * Adds double quotes around the given argument string on the generated
  11. * command line if the argument string contains any white space.
  12. */
  13. ME_IFL_QUOTE_ARGS = 0x0001,
  14. /* flag combinations */
  15. ALL_ME_IN_FLAGS = ME_IFL_QUOTE_ARGS
  16. }
  17. MYEXECUTE_IN_FLAGS;
  18. /* Global Variables
  19. *******************/
  20. /* comc.c */
  21. extern const char g_cszWhiteSpace[];
  22. extern const char g_cszSlashes[];
  23. extern const char g_cszPathSeparators[];
  24. extern const char g_cszEditFlags[];
  25. /* Prototypes
  26. *************/
  27. /* comc.c */
  28. extern BOOL DataCopy(PCBYTE pcbyteSrc, ULONG ulcbLen, PBYTE *ppbyteDest);
  29. extern BOOL StringCopy(PCSTR pcszSrc, PSTR *ppszCopy);
  30. extern BOOL GetMIMETypeSubKey(PCSTR pcszMIMEType, PSTR pszSubKeyBuf, UINT ucSubKeyBufLen);
  31. extern BOOL GetMIMEValue(PCSTR pcszMIMEType, PCSTR pcszValue, PDWORD pdwValueType, PBYTE pbyteValueBuf, PDWORD pdwcbValueBufLen);
  32. extern BOOL GetFileTypeValue(PCSTR pcszExtension, PCSTR pcszSubKey, PCSTR pcszValue, PDWORD pdwValueType, PBYTE pbyteValueBuf, PDWORD pdwcbValueBufLen);
  33. extern BOOL GetMIMEFileTypeValue(PCSTR pcszMIMEType, PCSTR pcszSubKey, PCSTR pcszValue, PDWORD pdwValueType, PBYTE pbyteValueBuf, PDWORD pdwcbValueBufLen);
  34. extern BOOL MIME_IsExternalHandlerRegistered(PCSTR pcszMIMEType);
  35. extern BOOL MIME_GetExtension(PCSTR pcszMIMEType, PSTR pszExtensionBuf, UINT ucExtensionBufLen);
  36. extern BOOL MIME_GetMIMETypeFromExtension(PCSTR pcszPath, PSTR pszMIMETypeBuf, UINT ucMIMETypeBufLen);
  37. extern void CatPath(PSTR pszPath, PCSTR pcszSubPath);
  38. extern void MyLStrCpyN(PSTR pszDest, PCSTR pcszSrc, int ncb);
  39. extern COMPARISONRESULT MapIntToComparisonResult(int nResult);
  40. extern void TrimWhiteSpace(PSTR pszTrimMe);
  41. extern void TrimSlashes(PSTR pszTrimMe);
  42. extern void TrimString(PSTR pszTrimMe, PCSTR pszTrimChars);
  43. extern PCSTR ExtractFileName(PCSTR pcszPathName);
  44. extern PCSTR ExtractExtension(PCSTR pcszName);
  45. extern LONG SetRegKeyValue(HKEY hkeyParent, PCSTR pcszSubKey, PCSTR pcszValue, DWORD dwType, PCBYTE lpcbyte, DWORD dwcb);;
  46. extern LONG GetRegKeyValue(HKEY hkeyParent, PCSTR pcszSubKey, PCSTR pcszValue, PDWORD pdwValueType, PBYTE pbyteBuf, PDWORD pdwcbBufLen);
  47. extern LONG GetRegKeyStringValue(HKEY hkeyParent, PCSTR pcszSubKey, PCSTR pcszValue, PSTR pszBuf, PDWORD pdwcbBufLen);
  48. extern LONG GetDefaultRegKeyValue(HKEY hkeyParent, PCSTR pcszSubKey, PSTR pszBuf, PDWORD pdwcbBufLen);
  49. extern HRESULT FullyQualifyPath(PCSTR pcszPath, PSTR pszFullyQualifiedPath, UINT ucFullyQualifiedPathBufLen);
  50. extern HRESULT MyExecute(PCSTR pcszApp, PCSTR pcszArgs, DWORD dwInFlags);
  51. extern BOOL GetClassDefaultVerb(PCSTR pcszClass, PSTR pszDefaultVerbBuf, UINT ucDefaultVerbBufLen);
  52. extern BOOL GetPathDefaultVerb(PCSTR pcszPath, PSTR pszDefaultVerbBuf, UINT ucDefaultVerbBufLen);
  53. extern BOOL ClassIsSafeToOpen(PCSTR pcszClass);
  54. extern BOOL SetClassEditFlags(PCSTR pcszClass, DWORD dwFlags, BOOL bSet);
  55. #ifdef DEBUG
  56. extern BOOL IsFullPath(PCSTR pcszPath);
  57. #endif /* DEBUG */