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.

77 lines
2.5 KiB

  1. #ifdef _CHICAGO_
  2. #define REGSTR_SHELLFOLDERS TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders")
  3. #else
  4. #define REGSTR_SHELLFOLDERS TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders")
  5. #endif // _CHICAGO_
  6. #define REGSTR_CURRENTVERSION TEXT("SOFTWARE\\Microsoft\\Windows\\CurrentVersion")
  7. #define RUNKEY TEXT("Run")
  8. #define RUNONCEKEY TEXT("RunOnce")
  9. #define RUNSERVICESKEY TEXT("RunServices")
  10. #define RUNSERVICESONCEKEY TEXT("RunServicesOnce")
  11. #define HELPIDSIZE 10
  12. #define MAXRUNSTR 300
  13. #define MAXENVPATHLEN 300
  14. #define INPTYPE_FOLDER 0x0007
  15. #define INPTYPE_INIFILE 0x0038
  16. #define INPTYPE_REGISTRY 0x03C0
  17. #define RESET_FLAG 0xFFFF
  18. #define FOLDER 101
  19. #define INIFILE 102
  20. #define REGISTRY 103
  21. #define WININISTR "WIN.INI, Run/Load="
  22. #define REGRUNSTR "REGISTRY: Run"
  23. #define REGRUNSERVICESSTR "REGISTRY: RunServices"
  24. #define REGRUNONCESTR "REGISTRY: RunOnce"
  25. #define REGRUNSERVICESONCESTR "REGISTRY: RunServicesOnce"
  26. typedef struct tnode
  27. {
  28. HANDLE hDirHandle;
  29. struct tnode *lpSrchDirNext;
  30. } HSEARCHDIR, *LPHSEARCHDIR;
  31. typedef struct
  32. {
  33. DWORD dwWalkFlags;
  34. DWORD dwCurrentFlag;
  35. LPHSEARCHDIR lpSrchDirListHead;
  36. LPHSEARCHDIR lpSrchDirListTail;
  37. LPTSTR lpszIniString;
  38. LPTSTR lpszNextFile;
  39. LPTSTR lpszFolder;
  40. } WALKHEADER, *LPWALKHEADER;
  41. INT GetFileHandle(LPLINKINFO lpLnkInfo, LPWALKHEADER lpWalk, LPTSTR lpPath);
  42. ERR GetLnkInfo(LPWALKHEADER lpWalk, LPLINKINFO lpLnkInfo, LPTSTR lpPath);
  43. ERR ResolveLnk(LPCTSTR pszShortcutFile, LPTSTR lpszLnkPath, LPWIN32_FIND_DATA lpwfdExeData, LPTSTR tszArgs);
  44. ERR AddToList(HANDLE hDir, LPWALKHEADER lpWalk);
  45. ERR RemoveFromList(LPWALKHEADER lpWalk);
  46. ERR GetExeVersion(LPLINKINFO lpLnkInfo);
  47. void SetLnkInfo(LPLINKINFO lpLinkInfo);
  48. BOOL CheckFileExists(LPTSTR szFullName, LPVOID ftLAD);
  49. INT GetInputType(LPWALKHEADER lpWalk);
  50. ERR GetFolder(LPTSTR lpszFolder, LPWALKHEADER lpWalk);
  51. ERR GetIniString(LPWALKHEADER lpWalk, LPLINKINFO lpLnkInfo);
  52. ERR GetRegistryString(LPWALKHEADER lpWalk, LPLINKINFO lpLnkInfo);
  53. ERR GetNextFileFromString(LPWALKHEADER lpWalk, LPLINKINFO lpLnkInfo);
  54. BOOL GetFileLAD(LPLINKINFO lpLnkInfo);
  55. BOOL InSkipList(LPTSTR lpszFileName);
  56. void GetDrivePath(LPTSTR lpszExePath, LPTSTR lpszDrPath);
  57. DWORD ReverseDWord(DWORD dwIn);
  58. #ifdef _DEBUG
  59. #define FAILMEMA TRUE
  60. #define FAILMEMF TRUE
  61. HGLOBAL MyGlobalAlloc(BOOL FAILMEM, DWORD dwBytes);
  62. HGLOBAL MyGlobalFree(HGLOBAL hGlobal, BOOL FAILMEM);
  63. INT g_MemAlloced = 0;
  64. #endif