Show copy icon in log message context menu
[TortoiseGit.git] / src / TortoiseShell / ShellCache.h
blobee9632c3a302b0de206a0eefe41333ba3786b355
1 // TortoiseGit - a Windows shell extension for easy version control
3 // Copyright (C) 2012-2014 - TortoiseGit
4 // Copyright (C) 2003-2008 - Stefan Kueng
6 // This program is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU General Public License
8 // as published by the Free Software Foundation; either version 2
9 // of the License, or (at your option) any later version.
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the Free Software Foundation,
18 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 #pragma once
21 #include "registry.h"
22 #include "Globals.h"
23 #include "GitAdminDir.h"
24 #include "Git.h"
26 #define REGISTRYTIMEOUT 2000
27 #define EXCLUDELISTTIMEOUT 5000
28 #define ADMINDIRTIMEOUT 10000
29 #define DRIVETYPETIMEOUT 300000 // 5 min
30 #define MENUTIMEOUT 100
32 #define DEFAULTMENUTOPENTRIES MENUSYNC|MENUCREATEREPOS|MENUCLONE|MENUCOMMIT
33 #define DEFAULTMENUEXTENTRIES MENUSVNIGNORE|MENUREFLOG|MENUREFBROWSE|MENUSTASHAPPLY|MENUSUBSYNC
35 typedef CComCritSecLock<CComCriticalSection> Locker;
37 /**
38 * \ingroup TortoiseShell
39 * Helper class which caches access to the registry. Also provides helper methods
40 * for checks against the settings stored in the registry.
42 class ShellCache
44 public:
45 enum CacheType
47 none,
48 exe,
49 dll,
50 dllFull,// same as dll except it uses commandline git tool with all status modes supported
52 ShellCache()
54 cachetype = CRegStdDWORD(_T("Software\\TortoiseGit\\CacheType"), GetSystemMetrics(SM_REMOTESESSION) ? dll : exe);
55 showrecursive = CRegStdDWORD(_T("Software\\TortoiseGit\\RecursiveOverlay"), TRUE);
56 folderoverlay = CRegStdDWORD(_T("Software\\TortoiseGit\\FolderOverlay"), TRUE);
57 driveremote = CRegStdDWORD(_T("Software\\TortoiseGit\\DriveMaskRemote"));
58 drivefixed = CRegStdDWORD(_T("Software\\TortoiseGit\\DriveMaskFixed"), TRUE);
59 drivecdrom = CRegStdDWORD(_T("Software\\TortoiseGit\\DriveMaskCDROM"));
60 driveremove = CRegStdDWORD(_T("Software\\TortoiseGit\\DriveMaskRemovable"));
61 drivefloppy = CRegStdDWORD(_T("Software\\TortoiseGit\\DriveMaskFloppy"));
62 driveram = CRegStdDWORD(_T("Software\\TortoiseGit\\DriveMaskRAM"));
63 driveunknown = CRegStdDWORD(_T("Software\\TortoiseGit\\DriveMaskUnknown"));
64 shellmenuaccelerators = CRegStdDWORD(_T("Software\\TortoiseGit\\ShellMenuAccelerators"), TRUE);
65 excludelist = CRegStdString(_T("Software\\TortoiseGit\\OverlayExcludeList"));
66 includelist = CRegStdString(_T("Software\\TortoiseGit\\OverlayIncludeList"));
67 simplecontext = CRegStdDWORD(_T("Software\\TortoiseGit\\SimpleContext"), FALSE);
68 unversionedasmodified = CRegStdDWORD(_T("Software\\TortoiseGit\\UnversionedAsModified"), FALSE);
69 hidemenusforunversioneditems = CRegStdDWORD(_T("Software\\TortoiseGit\\HideMenusForUnversionedItems"), FALSE);
70 showunversionedoverlay = CRegStdDWORD(_T("Software\\TortoiseGit\\ShowUnversionedOverlay"), TRUE);
71 showignoredoverlay = CRegStdDWORD(_T("Software\\TortoiseGit\\ShowIgnoredOverlay"), TRUE);
72 getlocktop = CRegStdDWORD(_T("Software\\TortoiseGit\\GetLockTop"), TRUE);
73 excludedasnormal = CRegStdDWORD(_T("Software\\TortoiseGit\\ShowExcludedAsNormal"), TRUE);
74 cachetypeticker = GetTickCount();
75 recursiveticker = cachetypeticker;
76 folderoverlayticker = cachetypeticker;
77 driveticker = cachetypeticker;
78 drivetypeticker = cachetypeticker;
79 langticker = cachetypeticker;
80 excludelistticker = cachetypeticker;
81 includelistticker = cachetypeticker;
82 simplecontextticker = cachetypeticker;
83 shellmenuacceleratorsticker = cachetypeticker;
84 unversionedasmodifiedticker = cachetypeticker;
85 showunversionedoverlayticker = cachetypeticker;
86 showignoredoverlayticker = cachetypeticker;
87 admindirticker = cachetypeticker;
88 getlocktopticker = cachetypeticker;
89 excludedasnormalticker = cachetypeticker;
90 hidemenusforunversioneditemsticker = cachetypeticker;
91 excontextticker = cachetypeticker;
93 unsigned __int64 entries = (DEFAULTMENUTOPENTRIES);
94 menulayoutlow = CRegStdDWORD(_T("Software\\TortoiseGit\\ContextMenuEntries"), entries&0xFFFFFFFF);
95 menulayouthigh = CRegStdDWORD(_T("Software\\TortoiseGit\\ContextMenuEntrieshigh"), entries>>32);
96 layoutticker = cachetypeticker;
98 unsigned __int64 ext = (DEFAULTMENUEXTENTRIES);
99 menuextlow = CRegStdDWORD(_T("Software\\TortoiseGit\\ContextMenuExtEntriesLow"), ext&0xFFFFFFFF );
100 menuexthigh = CRegStdDWORD(_T("Software\\TortoiseGit\\ContextMenuExtEntriesHigh"), ext>>32 );
101 exticker = cachetypeticker;
103 menumasklow_lm = CRegStdDWORD(_T("Software\\TortoiseGit\\ContextMenuEntriesMaskLow"), 0, FALSE, HKEY_LOCAL_MACHINE);
104 menumaskhigh_lm = CRegStdDWORD(_T("Software\\TortoiseGit\\ContextMenuEntriesMaskHigh"), 0, FALSE, HKEY_LOCAL_MACHINE);
105 menumasklow_cu = CRegStdDWORD(_T("Software\\TortoiseGit\\ContextMenuEntriesMaskLow"), 0);
106 menumaskhigh_cu = CRegStdDWORD(_T("Software\\TortoiseGit\\ContextMenuEntriesMaskHigh"), 0);
107 menumaskticker = cachetypeticker;
108 langid = CRegStdDWORD(_T("Software\\TortoiseGit\\LanguageID"), 1033);
109 blockstatus = CRegStdDWORD(_T("Software\\TortoiseGit\\BlockStatus"), 0);
110 blockstatusticker = cachetypeticker;
111 for (int i = 0; i < 27; ++i)
113 drivetypecache[i] = (UINT)-1;
115 // A: and B: are floppy disks
116 drivetypecache[0] = DRIVE_REMOVABLE;
117 drivetypecache[1] = DRIVE_REMOVABLE;
118 drivetypepathcache[0] = 0;
119 sAdminDirCacheKey.reserve(MAX_PATH); // MAX_PATH as buffer reservation ok.
120 nocontextpaths = CRegStdString(_T("Software\\TortoiseGit\\NoContextPaths"), _T(""));
121 m_critSec.Init();
123 void ForceRefresh()
125 cachetype.read();
126 showrecursive.read();
127 folderoverlay.read();
128 driveremote.read();
129 drivefixed.read();
130 drivecdrom.read();
131 driveremove.read();
132 drivefloppy.read();
133 driveram.read();
134 driveunknown.read();
135 excludelist.read();
136 includelist.read();
137 simplecontext.read();
138 shellmenuaccelerators.read();
139 unversionedasmodified.read();
140 showunversionedoverlay.read();
141 showignoredoverlay.read();
142 excludedasnormal.read();
143 hidemenusforunversioneditems.read();
144 menulayoutlow.read();
145 menulayouthigh.read();
146 langid.read();
147 blockstatus.read();
148 getlocktop.read();
149 menumasklow_lm.read();
150 menumaskhigh_lm.read();
151 menumasklow_cu.read();
152 menumaskhigh_cu.read();
153 nocontextpaths.read();
155 CacheType GetCacheType()
157 if ((GetTickCount() - REGISTRYTIMEOUT) > cachetypeticker)
159 cachetypeticker = GetTickCount();
160 cachetype.read();
162 return CacheType(DWORD((cachetype)));
164 DWORD BlockStatus()
166 if ((GetTickCount() - REGISTRYTIMEOUT) > blockstatusticker)
168 blockstatusticker = GetTickCount();
169 blockstatus.read();
171 return (blockstatus);
173 unsigned __int64 GetMenuLayout()
175 if ((GetTickCount() - REGISTRYTIMEOUT) > layoutticker)
177 layoutticker = GetTickCount();
178 menulayoutlow.read();
179 menulayouthigh.read();
181 unsigned __int64 temp = unsigned __int64(DWORD(menulayouthigh))<<32;
182 temp |= unsigned __int64(DWORD(menulayoutlow));
183 return temp;
186 unsigned __int64 GetMenuExt()
188 if ((GetTickCount() - REGISTRYTIMEOUT) > exticker)
190 exticker = GetTickCount();
191 menuextlow.read();
192 menuexthigh.read();
194 unsigned __int64 temp = unsigned __int64(DWORD(menuexthigh))<<32;
195 temp |= unsigned __int64(DWORD(menuextlow));
196 return temp;
199 unsigned __int64 GetMenuMask()
201 if ((GetTickCount() - REGISTRYTIMEOUT) > menumaskticker)
203 menumaskticker = GetTickCount();
204 menumasklow_lm.read();
205 menumaskhigh_lm.read();
206 menumasklow_cu.read();
207 menumaskhigh_cu.read();
209 DWORD low = (DWORD)menumasklow_lm | (DWORD)menumasklow_cu;
210 DWORD high = (DWORD)menumaskhigh_lm | (DWORD)menumaskhigh_cu;
211 unsigned __int64 temp = unsigned __int64(high)<<32;
212 temp |= unsigned __int64(low);
213 return temp;
215 BOOL IsRecursive()
217 if ((GetTickCount() - REGISTRYTIMEOUT)>recursiveticker)
219 recursiveticker = GetTickCount();
220 showrecursive.read();
222 return (showrecursive);
224 BOOL IsFolderOverlay()
226 if ((GetTickCount() - REGISTRYTIMEOUT)>folderoverlayticker)
228 folderoverlayticker = GetTickCount();
229 folderoverlay.read();
231 return (folderoverlay);
233 BOOL IsSimpleContext()
235 if ((GetTickCount() - REGISTRYTIMEOUT)>simplecontextticker)
237 simplecontextticker = GetTickCount();
238 simplecontext.read();
240 return (simplecontext!=0);
242 BOOL HasShellMenuAccelerators()
244 if ((GetTickCount() - shellmenuacceleratorsticker)>REGISTRYTIMEOUT)
246 shellmenuacceleratorsticker = GetTickCount();
247 shellmenuaccelerators.read();
249 return (shellmenuaccelerators!=0);
251 BOOL IsUnversionedAsModified()
253 if ((GetTickCount() - REGISTRYTIMEOUT)>unversionedasmodifiedticker)
255 unversionedasmodifiedticker = GetTickCount();
256 unversionedasmodified.read();
258 return (unversionedasmodified);
260 BOOL ShowUnversionedOverlay()
262 if ((GetTickCount() - REGISTRYTIMEOUT)>showunversionedoverlayticker)
264 showunversionedoverlayticker = GetTickCount();
265 showunversionedoverlay.read();
267 return (showunversionedoverlay);
269 BOOL ShowIgnoredOverlay()
271 if ((GetTickCount() - REGISTRYTIMEOUT)>showignoredoverlayticker)
273 showignoredoverlayticker = GetTickCount();
274 showignoredoverlay.read();
276 return (showignoredoverlay);
278 BOOL IsGetLockTop()
280 if ((GetTickCount() - REGISTRYTIMEOUT)>getlocktopticker)
282 getlocktopticker = GetTickCount();
283 getlocktop.read();
285 return (getlocktop);
287 BOOL ShowExcludedAsNormal()
289 if ((GetTickCount() - REGISTRYTIMEOUT)>excludedasnormalticker)
291 excludedasnormalticker = GetTickCount();
292 excludedasnormal.read();
294 return (excludedasnormal);
296 BOOL HideMenusForUnversionedItems()
298 if ((GetTickCount() - hidemenusforunversioneditemsticker)>REGISTRYTIMEOUT)
300 hidemenusforunversioneditemsticker = GetTickCount();
301 hidemenusforunversioneditems.read();
303 return (hidemenusforunversioneditems);
305 BOOL IsRemote()
307 DriveValid();
308 return (driveremote);
310 BOOL IsFixed()
312 DriveValid();
313 return (drivefixed);
315 BOOL IsCDRom()
317 DriveValid();
318 return (drivecdrom);
320 BOOL IsRemovable()
322 DriveValid();
323 return (driveremove);
325 BOOL IsRAM()
327 DriveValid();
328 return (driveram);
330 BOOL IsUnknown()
332 DriveValid();
333 return (driveunknown);
335 BOOL IsContextPathAllowed(LPCTSTR path)
337 Locker lock(m_critSec);
338 ExcludeContextValid();
339 for (std::vector<stdstring>::iterator I = excontextvector.begin(); I != excontextvector.end(); ++I)
341 if (I->empty())
342 continue;
343 if (I->size() && I->at(I->size()-1)=='*')
345 stdstring str = I->substr(0, I->size()-1);
346 if (_tcsnicmp(str.c_str(), path, str.size())==0)
347 return FALSE;
349 else if (_tcsicmp(I->c_str(), path)==0)
350 return FALSE;
352 return TRUE;
354 BOOL IsPathAllowed(LPCTSTR path)
356 Locker lock(m_critSec);
357 IncludeListValid();
358 for (std::vector<stdstring>::iterator I = invector.begin(); I != invector.end(); ++I)
360 if (I->empty())
361 continue;
362 if (I->at(I->size()-1)=='*')
364 stdstring str = I->substr(0, I->size()-1);
365 if (_tcsnicmp(str.c_str(), path, str.size())==0)
366 return TRUE;
367 if (!str.empty() && (str.at(str.size()-1) == '\\') && (_tcsnicmp(str.c_str(), path, str.size()-1)==0))
368 return TRUE;
370 else if (_tcsicmp(I->c_str(), path)==0)
371 return TRUE;
372 else if ((I->at(I->size()-1) == '\\') &&
373 ((_tcsnicmp(I->c_str(), path, I->size())==0) || (_tcsicmp(I->c_str(), path)==0)) )
374 return TRUE;
377 UINT drivetype = 0;
378 int drivenumber = PathGetDriveNumber(path);
379 if ((drivenumber >=0)&&(drivenumber < 25))
381 drivetype = drivetypecache[drivenumber];
382 if ((drivetype == -1)||((GetTickCount() - DRIVETYPETIMEOUT)>drivetypeticker))
384 if ((drivenumber == 0)||(drivenumber == 1))
385 drivetypecache[drivenumber] = DRIVE_REMOVABLE;
386 else
388 drivetypeticker = GetTickCount();
389 TCHAR pathbuf[MAX_PATH+4] = {0}; // MAX_PATH ok here. PathStripToRoot works with partial paths too.
390 _tcsncpy_s(pathbuf, MAX_PATH+4, path, MAX_PATH+3);
391 PathStripToRoot(pathbuf);
392 PathAddBackslash(pathbuf);
393 CTraceToOutputDebugString::Instance()(_T(__FUNCTION__) _T(": GetDriveType for %s, Drive %d\n"), pathbuf, drivenumber);
394 drivetype = GetDriveType(pathbuf);
395 drivetypecache[drivenumber] = drivetype;
399 else
401 TCHAR pathbuf[MAX_PATH+4] = {0}; // MAX_PATH ok here. PathIsUNCServer works with partial paths too.
402 _tcsncpy_s(pathbuf, MAX_PATH+4, path, MAX_PATH+3);
403 if (PathIsUNCServer(pathbuf))
404 drivetype = DRIVE_REMOTE;
405 else
407 PathStripToRoot(pathbuf);
408 PathAddBackslash(pathbuf);
409 if (_tcsncmp(pathbuf, drivetypepathcache, MAX_PATH-1)==0) // MAX_PATH ok.
410 drivetype = drivetypecache[26];
411 else
413 CTraceToOutputDebugString::Instance()(_T(__FUNCTION__) _T("GetDriveType for %s\n"), pathbuf);
414 drivetype = GetDriveType(pathbuf);
415 drivetypecache[26] = drivetype;
416 _tcsncpy_s(drivetypepathcache, MAX_PATH, pathbuf, MAX_PATH); // MAX_PATH ok.
420 if ((drivetype == DRIVE_REMOVABLE)&&(!IsRemovable()))
421 return FALSE;
422 if ((drivetype == DRIVE_REMOVABLE)&&(drivefloppy == 0)&&((drivenumber==0)||(drivenumber==1)))
423 return FALSE;
424 if ((drivetype == DRIVE_FIXED)&&(!IsFixed()))
425 return FALSE;
426 if (((drivetype == DRIVE_REMOTE)||(drivetype == DRIVE_NO_ROOT_DIR))&&(!IsRemote()))
427 return FALSE;
428 if ((drivetype == DRIVE_CDROM)&&(!IsCDRom()))
429 return FALSE;
430 if ((drivetype == DRIVE_RAMDISK)&&(!IsRAM()))
431 return FALSE;
432 if ((drivetype == DRIVE_UNKNOWN)&&(IsUnknown()))
433 return FALSE;
435 ExcludeListValid();
436 for (std::vector<stdstring>::iterator I = exvector.begin(); I != exvector.end(); ++I)
438 if (I->empty())
439 continue;
440 if (I->size() && I->at(I->size()-1)=='*')
442 stdstring str = I->substr(0, I->size()-1);
443 if (_tcsnicmp(str.c_str(), path, str.size())==0)
444 return FALSE;
446 else if (_tcsicmp(I->c_str(), path)==0)
447 return FALSE;
449 return TRUE;
451 DWORD GetLangID()
453 if ((GetTickCount() - REGISTRYTIMEOUT) > langticker)
455 langticker = GetTickCount();
456 langid.read();
458 return (langid);
460 BOOL HasGITAdminDir(LPCTSTR path, BOOL bIsDir, CString *ProjectTopDir = NULL)
462 size_t len = _tcslen(path);
463 std::unique_ptr<TCHAR[]> buf(new TCHAR[len + 1]);
464 _tcscpy_s(buf.get(), len + 1, path);
465 if (! bIsDir)
467 TCHAR * ptr = _tcsrchr(buf.get(), '\\');
468 if (ptr != 0)
470 *ptr = 0;
473 if ((GetTickCount() - ADMINDIRTIMEOUT) < admindirticker)
475 std::map<stdstring, AdminDir_s>::iterator iter;
476 sAdminDirCacheKey.assign(buf.get());
477 if ((iter = admindircache.find(sAdminDirCacheKey)) != admindircache.end())
479 if (ProjectTopDir && iter->second.bHasAdminDir)
480 *ProjectTopDir = iter->second.sProjectRoot.c_str();
481 return iter->second.bHasAdminDir;
484 CString sProjectRoot;
485 BOOL hasAdminDir = g_GitAdminDir.HasAdminDir(buf.get(), true, &sProjectRoot);
486 admindirticker = GetTickCount();
487 Locker lock(m_critSec);
489 AdminDir_s &ad = admindircache[buf.get()];
490 ad.bHasAdminDir = hasAdminDir;
491 if (hasAdminDir)
493 ad.sProjectRoot.assign(sProjectRoot);
495 if (ProjectTopDir)
496 *ProjectTopDir = sProjectRoot;
499 return hasAdminDir;
501 private:
502 void DriveValid()
504 if ((GetTickCount() - REGISTRYTIMEOUT)>driveticker)
506 driveticker = GetTickCount();
507 driveremote.read();
508 drivefixed.read();
509 drivecdrom.read();
510 driveremove.read();
511 drivefloppy.read();
514 void ExcludeContextValid()
516 if ((GetTickCount() - EXCLUDELISTTIMEOUT)>excontextticker)
518 Locker lock(m_critSec);
519 excontextticker = GetTickCount();
520 nocontextpaths.read();
521 if (excludecontextstr.compare((stdstring)nocontextpaths)==0)
522 return;
523 excludecontextstr = (stdstring)nocontextpaths;
524 excontextvector.clear();
525 size_t pos = 0, pos_ant = 0;
526 pos = excludecontextstr.find(_T("\n"), pos_ant);
527 while (pos != stdstring::npos)
529 stdstring token = excludecontextstr.substr(pos_ant, pos-pos_ant);
530 excontextvector.push_back(token);
531 pos_ant = pos+1;
532 pos = excludecontextstr.find(_T("\n"), pos_ant);
534 if (!excludecontextstr.empty())
536 excontextvector.push_back(excludecontextstr.substr(pos_ant, excludecontextstr.size()-1));
538 excludecontextstr = (stdstring)nocontextpaths;
541 void ExcludeListValid()
543 if ((GetTickCount() - EXCLUDELISTTIMEOUT)>excludelistticker)
545 Locker lock(m_critSec);
546 excludelistticker = GetTickCount();
547 excludelist.read();
548 if (excludeliststr.compare((stdstring)excludelist)==0)
549 return;
550 excludeliststr = (stdstring)excludelist;
551 exvector.clear();
552 size_t pos = 0, pos_ant = 0;
553 pos = excludeliststr.find(_T("\n"), pos_ant);
554 while (pos != stdstring::npos)
556 stdstring token = excludeliststr.substr(pos_ant, pos-pos_ant);
557 exvector.push_back(token);
558 pos_ant = pos+1;
559 pos = excludeliststr.find(_T("\n"), pos_ant);
561 if (!excludeliststr.empty())
563 exvector.push_back(excludeliststr.substr(pos_ant, excludeliststr.size()-1));
565 excludeliststr = (stdstring)excludelist;
568 void IncludeListValid()
570 if ((GetTickCount() - EXCLUDELISTTIMEOUT)>includelistticker)
572 Locker lock(m_critSec);
573 includelistticker = GetTickCount();
574 includelist.read();
575 if (includeliststr.compare((stdstring)includelist)==0)
576 return;
577 includeliststr = (stdstring)includelist;
578 invector.clear();
579 size_t pos = 0, pos_ant = 0;
580 pos = includeliststr.find(_T("\n"), pos_ant);
581 while (pos != stdstring::npos)
583 stdstring token = includeliststr.substr(pos_ant, pos-pos_ant);
584 invector.push_back(token);
585 pos_ant = pos+1;
586 pos = includeliststr.find(_T("\n"), pos_ant);
588 if (!includeliststr.empty())
590 invector.push_back(includeliststr.substr(pos_ant, includeliststr.size()-1));
592 includeliststr = (stdstring)includelist;
596 struct AdminDir_s
598 BOOL bHasAdminDir;
599 stdstring sProjectRoot;
601 public:
602 CRegStdDWORD cachetype;
603 CRegStdDWORD blockstatus;
604 CRegStdDWORD langid;
605 CRegStdDWORD showrecursive;
606 CRegStdDWORD folderoverlay;
607 CRegStdDWORD getlocktop;
608 CRegStdDWORD driveremote;
609 CRegStdDWORD drivefixed;
610 CRegStdDWORD drivecdrom;
611 CRegStdDWORD driveremove;
612 CRegStdDWORD drivefloppy;
613 CRegStdDWORD driveram;
614 CRegStdDWORD driveunknown;
615 CRegStdDWORD menulayoutlow; /* Fist level mask */
616 CRegStdDWORD menulayouthigh;
617 CRegStdDWORD shellmenuaccelerators;
618 CRegStdDWORD menuextlow; /* ext menu mask */
619 CRegStdDWORD menuexthigh;
620 CRegStdDWORD simplecontext;
621 CRegStdDWORD menumasklow_lm;
622 CRegStdDWORD menumaskhigh_lm;
623 CRegStdDWORD menumasklow_cu;
624 CRegStdDWORD menumaskhigh_cu;
625 CRegStdDWORD unversionedasmodified;
626 CRegStdDWORD showunversionedoverlay;
627 CRegStdDWORD showignoredoverlay;
628 CRegStdDWORD excludedasnormal;
629 CRegStdString excludelist;
630 CRegStdDWORD hidemenusforunversioneditems;
631 stdstring excludeliststr;
632 std::vector<stdstring> exvector;
633 CRegStdString includelist;
634 stdstring includeliststr;
635 std::vector<stdstring> invector;
636 DWORD cachetypeticker;
637 DWORD recursiveticker;
638 DWORD folderoverlayticker;
639 DWORD getlocktopticker;
640 DWORD driveticker;
641 DWORD drivetypeticker;
642 DWORD layoutticker;
643 DWORD exticker;
644 DWORD menumaskticker;
645 DWORD langticker;
646 DWORD blockstatusticker;
647 DWORD excludelistticker;
648 DWORD includelistticker;
649 DWORD simplecontextticker;
650 DWORD shellmenuacceleratorsticker;
651 DWORD unversionedasmodifiedticker;
652 DWORD showunversionedoverlayticker;
653 DWORD showignoredoverlayticker;
654 DWORD excludedasnormalticker;
655 DWORD hidemenusforunversioneditemsticker;
656 UINT drivetypecache[27];
657 TCHAR drivetypepathcache[MAX_PATH]; // MAX_PATH ok.
658 TCHAR szDecSep[5];
659 TCHAR szThousandsSep[5];
660 std::map<stdstring, AdminDir_s> admindircache;
661 stdstring sAdminDirCacheKey;
662 CRegStdString nocontextpaths;
663 stdstring excludecontextstr;
664 std::vector<stdstring> excontextvector;
665 DWORD excontextticker;
666 DWORD admindirticker;
667 CComCriticalSection m_critSec;