1 // TortoiseGit - a Windows shell extension for easy version control
\r
3 // Copyright (C) 2003-2008 - Stefan Kueng
\r
5 // This program is free software; you can redistribute it and/or
\r
6 // modify it under the terms of the GNU General Public License
\r
7 // as published by the Free Software Foundation; either version 2
\r
8 // of the License, or (at your option) any later version.
\r
10 // This program is distributed in the hope that it will be useful,
\r
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
13 // GNU General Public License for more details.
\r
15 // You should have received a copy of the GNU General Public License
\r
16 // along with this program; if not, write to the Free Software Foundation,
\r
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
\r
20 #include "registry.h"
\r
21 #include "Globals.h"
\r
22 #include "GitAdminDir.h"
\r
25 #define REGISTRYTIMEOUT 2000
\r
26 #define EXCLUDELISTTIMEOUT 5000
\r
27 #define ADMINDIRTIMEOUT 10000
\r
28 #define DRIVETYPETIMEOUT 300000 // 5 min
\r
29 #define NUMBERFMTTIMEOUT 300000
\r
30 #define MENUTIMEOUT 100
\r
32 typedef CComCritSecLock<CComCriticalSection> Locker;
\r
35 * \ingroup TortoiseShell
\r
36 * Helper class which caches access to the registry. Also provides helper methods
\r
37 * for checks against the settings stored in the registry.
\r
50 cachetype = CRegStdWORD(_T("Software\\TortoiseGit\\CacheType"), GetSystemMetrics(SM_REMOTESESSION) ? dll : exe);
\r
51 showrecursive = CRegStdWORD(_T("Software\\TortoiseGit\\RecursiveOverlay"), TRUE);
\r
52 folderoverlay = CRegStdWORD(_T("Software\\TortoiseGit\\FolderOverlay"), TRUE);
\r
53 driveremote = CRegStdWORD(_T("Software\\TortoiseGit\\DriveMaskRemote"));
\r
54 drivefixed = CRegStdWORD(_T("Software\\TortoiseGit\\DriveMaskFixed"), TRUE);
\r
55 drivecdrom = CRegStdWORD(_T("Software\\TortoiseGit\\DriveMaskCDROM"));
\r
56 driveremove = CRegStdWORD(_T("Software\\TortoiseGit\\DriveMaskRemovable"));
\r
57 drivefloppy = CRegStdWORD(_T("Software\\TortoiseGit\\DriveMaskFloppy"));
\r
58 driveram = CRegStdWORD(_T("Software\\TortoiseGit\\DriveMaskRAM"));
\r
59 driveunknown = CRegStdWORD(_T("Software\\TortoiseGit\\DriveMaskUnknown"));
\r
60 excludelist = CRegStdString(_T("Software\\TortoiseGit\\OverlayExcludeList"));
\r
61 includelist = CRegStdString(_T("Software\\TortoiseGit\\OverlayIncludeList"));
\r
62 simplecontext = CRegStdWORD(_T("Software\\TortoiseGit\\SimpleContext"), FALSE);
\r
63 unversionedasmodified = CRegStdWORD(_T("Software\\TortoiseGit\\UnversionedAsModified"), FALSE);
\r
64 showunversionedoverlay = CRegStdWORD(_T("Software\\TortoiseGit\\ShowUnversionedOverlay"), TRUE);
\r
65 showignoredoverlay = CRegStdWORD(_T("Software\\TortoiseGit\\ShowIgnoredOverlay"), TRUE);
\r
66 getlocktop = CRegStdWORD(_T("Software\\TortoiseGit\\GetLockTop"), TRUE);
\r
67 excludedasnormal = CRegStdWORD(_T("Software\\TortoiseGit\\ShowExcludedAsNormal"), TRUE);
\r
68 cachetypeticker = GetTickCount();
\r
69 recursiveticker = cachetypeticker;
\r
70 folderoverlayticker = cachetypeticker;
\r
71 driveticker = cachetypeticker;
\r
72 drivetypeticker = cachetypeticker;
\r
73 langticker = cachetypeticker;
\r
74 columnrevformatticker = cachetypeticker;
\r
75 excludelistticker = cachetypeticker;
\r
76 includelistticker = cachetypeticker;
\r
77 simplecontextticker = cachetypeticker;
\r
78 unversionedasmodifiedticker = cachetypeticker;
\r
79 showunversionedoverlayticker = cachetypeticker;
\r
80 showignoredoverlayticker = cachetypeticker;
\r
81 admindirticker = cachetypeticker;
\r
82 columnseverywhereticker = cachetypeticker;
\r
83 getlocktopticker = cachetypeticker;
\r
84 excludedasnormalticker = cachetypeticker;
\r
85 excontextticker = cachetypeticker;
\r
86 menulayoutlow = CRegStdWORD(_T("Software\\TortoiseGit\\ContextMenuEntries"), MENUCREATEREPOS|MENUCLONE|MENUUPDATE|MENUCOMMIT);
\r
87 menulayouthigh = CRegStdWORD(_T("Software\\TortoiseGit\\ContextMenuEntrieshigh"), (MENUCREATEREPOS|MENUCLONE|MENUUPDATE|MENUCOMMIT)>>32);
\r
88 menumasklow_lm = CRegStdWORD(_T("Software\\TortoiseGit\\ContextMenuEntriesMaskLow"), 0, FALSE, HKEY_LOCAL_MACHINE);
\r
89 menumaskhigh_lm = CRegStdWORD(_T("Software\\TortoiseGit\\ContextMenuEntriesMaskHigh"), 0, FALSE, HKEY_LOCAL_MACHINE);
\r
90 menumasklow_cu = CRegStdWORD(_T("Software\\TortoiseGit\\ContextMenuEntriesMaskLow"), 0);
\r
91 menumaskhigh_cu = CRegStdWORD(_T("Software\\TortoiseGit\\ContextMenuEntriesMaskHigh"), 0);
\r
92 langid = CRegStdWORD(_T("Software\\TortoiseGit\\LanguageID"), 1033);
\r
93 blockstatus = CRegStdWORD(_T("Software\\TortoiseGit\\BlockStatus"), 0);
\r
94 columnseverywhere = CRegStdWORD(_T("Software\\TortoiseGit\\ColumnsEveryWhere"), FALSE);
\r
95 for (int i=0; i<27; i++)
\r
97 drivetypecache[i] = (UINT)-1;
\r
99 // A: and B: are floppy disks
\r
100 drivetypecache[0] = DRIVE_REMOVABLE;
\r
101 drivetypecache[1] = DRIVE_REMOVABLE;
\r
103 columnrevformatticker = GetTickCount();
\r
104 SecureZeroMemory(&columnrevformat, sizeof(NUMBERFMT));
\r
105 GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SDECIMAL, &szDecSep[0], sizeof(szDecSep));
\r
106 GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_STHOUSAND, &szThousandsSep[0], sizeof(szThousandsSep));
\r
107 columnrevformat.lpDecimalSep = szDecSep;
\r
108 columnrevformat.lpThousandSep = szThousandsSep;
\r
109 GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SGROUPING, &szBuffer[0], sizeof(szBuffer));
\r
110 columnrevformat.Grouping = _ttoi(szBuffer);
\r
111 GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_INEGNUMBER, &szBuffer[0], sizeof(szBuffer));
\r
112 columnrevformat.NegativeOrder = _ttoi(szBuffer);
\r
113 sAdminDirCacheKey.reserve(MAX_PATH); // MAX_PATH as buffer reservation ok.
\r
114 nocontextpaths = CRegStdString(_T("Software\\TortoiseGit\\NoContextPaths"), _T(""));
\r
117 void ForceRefresh()
\r
120 showrecursive.read();
\r
121 folderoverlay.read();
\r
122 driveremote.read();
\r
125 driveremove.read();
\r
126 drivefloppy.read();
\r
128 driveunknown.read();
\r
129 excludelist.read();
\r
130 includelist.read();
\r
131 simplecontext.read();
\r
132 unversionedasmodified.read();
\r
133 showunversionedoverlay.read();
\r
134 showignoredoverlay.read();
\r
135 excludedasnormal.read();
\r
136 menulayoutlow.read();
\r
137 menulayouthigh.read();
\r
139 blockstatus.read();
\r
140 columnseverywhere.read();
\r
142 menumasklow_lm.read();
\r
143 menumaskhigh_lm.read();
\r
144 menumasklow_cu.read();
\r
145 menumaskhigh_cu.read();
\r
146 nocontextpaths.read();
\r
148 CacheType GetCacheType()
\r
150 if ((GetTickCount() - REGISTRYTIMEOUT) > cachetypeticker)
\r
152 cachetypeticker = GetTickCount();
\r
155 //return CacheType(DWORD((cachetype)));
\r
156 /*TEMP: until TGitCache done*/
\r
157 // if(CGit::IsVista())
\r
159 return CacheType(DWORD((cachetype))) == exe ? dll : CacheType(DWORD((cachetype)));
\r
161 DWORD BlockStatus()
\r
163 if ((GetTickCount() - REGISTRYTIMEOUT) > blockstatusticker)
\r
165 blockstatusticker = GetTickCount();
\r
166 blockstatus.read();
\r
168 return (blockstatus);
\r
170 unsigned __int64 GetMenuLayout()
\r
172 if ((GetTickCount() - REGISTRYTIMEOUT) > layoutticker)
\r
174 layoutticker = GetTickCount();
\r
175 menulayoutlow.read();
\r
176 menulayouthigh.read();
\r
178 unsigned __int64 temp = unsigned __int64(DWORD(menulayouthigh))<<32;
\r
179 temp |= unsigned __int64(DWORD(menulayoutlow));
\r
182 unsigned __int64 GetMenuMask()
\r
184 if ((GetTickCount() - REGISTRYTIMEOUT) > menumaskticker)
\r
186 menumaskticker = GetTickCount();
\r
187 menumasklow_lm.read();
\r
188 menumaskhigh_lm.read();
\r
189 menumasklow_cu.read();
\r
190 menumaskhigh_cu.read();
\r
192 DWORD low = (DWORD)menumasklow_lm | (DWORD)menumasklow_cu;
\r
193 DWORD high = (DWORD)menumaskhigh_lm | (DWORD)menumaskhigh_cu;
\r
194 unsigned __int64 temp = unsigned __int64(high)<<32;
\r
195 temp |= unsigned __int64(low);
\r
200 if ((GetTickCount() - REGISTRYTIMEOUT)>recursiveticker)
\r
202 recursiveticker = GetTickCount();
\r
203 showrecursive.read();
\r
205 return (showrecursive);
\r
207 BOOL IsFolderOverlay()
\r
209 if ((GetTickCount() - REGISTRYTIMEOUT)>folderoverlayticker)
\r
211 folderoverlayticker = GetTickCount();
\r
212 folderoverlay.read();
\r
214 return (folderoverlay);
\r
216 BOOL IsSimpleContext()
\r
218 if ((GetTickCount() - REGISTRYTIMEOUT)>simplecontextticker)
\r
220 simplecontextticker = GetTickCount();
\r
221 simplecontext.read();
\r
223 return (simplecontext!=0);
\r
225 BOOL IsUnversionedAsModified()
\r
227 if ((GetTickCount() - REGISTRYTIMEOUT)>unversionedasmodifiedticker)
\r
229 unversionedasmodifiedticker = GetTickCount();
\r
230 unversionedasmodified.read();
\r
232 return (unversionedasmodified);
\r
234 BOOL ShowUnversionedOverlay()
\r
236 if ((GetTickCount() - REGISTRYTIMEOUT)>showunversionedoverlayticker)
\r
238 showunversionedoverlayticker = GetTickCount();
\r
239 showunversionedoverlay.read();
\r
241 return (showunversionedoverlay);
\r
243 BOOL ShowIgnoredOverlay()
\r
245 if ((GetTickCount() - REGISTRYTIMEOUT)>showignoredoverlayticker)
\r
247 showignoredoverlayticker = GetTickCount();
\r
248 showignoredoverlay.read();
\r
250 return (showignoredoverlay);
\r
252 BOOL IsGetLockTop()
\r
254 if ((GetTickCount() - REGISTRYTIMEOUT)>getlocktopticker)
\r
256 getlocktopticker = GetTickCount();
\r
259 return (getlocktop);
\r
261 BOOL ShowExcludedAsNormal()
\r
263 if ((GetTickCount() - REGISTRYTIMEOUT)>excludedasnormalticker)
\r
265 excludedasnormalticker = GetTickCount();
\r
266 excludedasnormal.read();
\r
268 return (excludedasnormal);
\r
273 return (driveremote);
\r
278 return (drivefixed);
\r
283 return (drivecdrom);
\r
288 return (driveremove);
\r
298 return (driveunknown);
\r
300 BOOL IsContextPathAllowed(LPCTSTR path)
\r
302 Locker lock(m_critSec);
\r
303 ExcludeContextValid();
\r
304 for (std::vector<stdstring>::iterator I = excontextvector.begin(); I != excontextvector.end(); ++I)
\r
308 if (I->size() && I->at(I->size()-1)=='*')
\r
310 stdstring str = I->substr(0, I->size()-1);
\r
311 if (_tcsnicmp(str.c_str(), path, str.size())==0)
\r
314 else if (_tcsicmp(I->c_str(), path)==0)
\r
319 BOOL IsPathAllowed(LPCTSTR path)
\r
321 Locker lock(m_critSec);
\r
322 IncludeListValid();
\r
323 for (std::vector<stdstring>::iterator I = invector.begin(); I != invector.end(); ++I)
\r
327 if (I->at(I->size()-1)=='*')
\r
329 stdstring str = I->substr(0, I->size()-1);
\r
330 if (_tcsnicmp(str.c_str(), path, str.size())==0)
\r
332 if (str.size() && (str.at(str.size()-1) == '\\') && (_tcsnicmp(str.c_str(), path, str.size()-1)==0))
\r
335 else if (_tcsicmp(I->c_str(), path)==0)
\r
337 else if ((I->at(I->size()-1) == '\\') &&
\r
338 ((_tcsnicmp(I->c_str(), path, I->size())==0) || (_tcsicmp(I->c_str(), path)==0)) )
\r
342 UINT drivetype = 0;
\r
343 int drivenumber = PathGetDriveNumber(path);
\r
344 if ((drivenumber >=0)&&(drivenumber < 25))
\r
346 drivetype = drivetypecache[drivenumber];
\r
347 if ((drivetype == -1)||((GetTickCount() - DRIVETYPETIMEOUT)>drivetypeticker))
\r
349 if ((drivenumber == 0)||(drivenumber == 1))
\r
350 drivetypecache[drivenumber] = DRIVE_REMOVABLE;
\r
353 drivetypeticker = GetTickCount();
\r
354 TCHAR pathbuf[MAX_PATH+4]; // MAX_PATH ok here. PathStripToRoot works with partial paths too.
\r
355 _tcsncpy_s(pathbuf, MAX_PATH+4, path, MAX_PATH+3);
\r
356 PathStripToRoot(pathbuf);
\r
357 PathAddBackslash(pathbuf);
\r
358 ATLTRACE2(_T("GetDriveType for %s, Drive %d\n"), pathbuf, drivenumber);
\r
359 drivetype = GetDriveType(pathbuf);
\r
360 drivetypecache[drivenumber] = drivetype;
\r
366 TCHAR pathbuf[MAX_PATH+4]; // MAX_PATH ok here. PathIsUNCServer works with partial paths too.
\r
367 _tcsncpy_s(pathbuf, MAX_PATH+4, path, MAX_PATH+3);
\r
368 if (PathIsUNCServer(pathbuf))
\r
369 drivetype = DRIVE_REMOTE;
\r
372 PathStripToRoot(pathbuf);
\r
373 PathAddBackslash(pathbuf);
\r
374 if (_tcsncmp(pathbuf, drivetypepathcache, MAX_PATH-1)==0) // MAX_PATH ok.
\r
375 drivetype = drivetypecache[26];
\r
378 ATLTRACE2(_T("GetDriveType for %s\n"), pathbuf);
\r
379 drivetype = GetDriveType(pathbuf);
\r
380 drivetypecache[26] = drivetype;
\r
381 _tcsncpy_s(drivetypepathcache, MAX_PATH, pathbuf, MAX_PATH); // MAX_PATH ok.
\r
385 if ((drivetype == DRIVE_REMOVABLE)&&(!IsRemovable()))
\r
387 if ((drivetype == DRIVE_REMOVABLE)&&(drivefloppy == 0)&&((drivenumber==0)||(drivenumber==1)))
\r
389 if ((drivetype == DRIVE_FIXED)&&(!IsFixed()))
\r
391 if (((drivetype == DRIVE_REMOTE)||(drivetype == DRIVE_NO_ROOT_DIR))&&(!IsRemote()))
\r
393 if ((drivetype == DRIVE_CDROM)&&(!IsCDRom()))
\r
395 if ((drivetype == DRIVE_RAMDISK)&&(!IsRAM()))
\r
397 if ((drivetype == DRIVE_UNKNOWN)&&(IsUnknown()))
\r
400 ExcludeListValid();
\r
401 for (std::vector<stdstring>::iterator I = exvector.begin(); I != exvector.end(); ++I)
\r
405 if (I->size() && I->at(I->size()-1)=='*')
\r
407 stdstring str = I->substr(0, I->size()-1);
\r
408 if (_tcsnicmp(str.c_str(), path, str.size())==0)
\r
411 else if (_tcsicmp(I->c_str(), path)==0)
\r
418 if ((GetTickCount() - REGISTRYTIMEOUT) > langticker)
\r
420 langticker = GetTickCount();
\r
425 NUMBERFMT * GetNumberFmt()
\r
427 if ((GetTickCount() - NUMBERFMTTIMEOUT) > columnrevformatticker)
\r
430 columnrevformatticker = GetTickCount();
\r
431 SecureZeroMemory(&columnrevformat, sizeof(NUMBERFMT));
\r
432 GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SDECIMAL, &szDecSep[0], sizeof(szDecSep));
\r
433 GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_STHOUSAND, &szThousandsSep[0], sizeof(szThousandsSep));
\r
434 columnrevformat.lpDecimalSep = szDecSep;
\r
435 columnrevformat.lpThousandSep = szThousandsSep;
\r
436 GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SGROUPING, &szBuffer[0], sizeof(szBuffer));
\r
437 columnrevformat.Grouping = _ttoi(szBuffer);
\r
438 GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_INEGNUMBER, &szBuffer[0], sizeof(szBuffer));
\r
439 columnrevformat.NegativeOrder = _ttoi(szBuffer);
\r
441 return &columnrevformat;
\r
443 BOOL HasSVNAdminDir(LPCTSTR path, BOOL bIsDir, CString *ProjectTopDir = NULL)
\r
445 size_t len = _tcslen(path);
\r
446 TCHAR * buf = new TCHAR[len+1];
\r
447 _tcscpy_s(buf, len+1, path);
\r
450 TCHAR * ptr = _tcsrchr(buf, '\\');
\r
456 if ((GetTickCount() - ADMINDIRTIMEOUT) < admindirticker)
\r
458 std::map<stdstring, AdminDir_s>::iterator iter;
\r
459 sAdminDirCacheKey.assign(buf);
\r
460 if ((iter = admindircache.find(sAdminDirCacheKey)) != admindircache.end())
\r
463 if (ProjectTopDir && iter->second.bHasAdminDir)
\r
464 *ProjectTopDir = iter->second.sProjectRoot.c_str();
\r
465 return iter->second.bHasAdminDir;
\r
468 CString sProjectRoot;
\r
469 BOOL hasAdminDir = g_GitAdminDir.HasAdminDir(buf, true, &sProjectRoot);
\r
470 admindirticker = GetTickCount();
\r
471 Locker lock(m_critSec);
\r
473 AdminDir_s &ad = admindircache[buf];
\r
474 ad.bHasAdminDir = hasAdminDir;
\r
477 ad.sProjectRoot.assign(sProjectRoot);
\r
480 *ProjectTopDir = sProjectRoot;
\r
484 return hasAdminDir;
\r
486 bool IsColumnsEveryWhere()
\r
488 if ((GetTickCount() - REGISTRYTIMEOUT) > columnseverywhereticker)
\r
490 columnseverywhereticker = GetTickCount();
\r
491 columnseverywhere.read();
\r
493 return !!(DWORD)columnseverywhere;
\r
498 if ((GetTickCount() - REGISTRYTIMEOUT)>driveticker)
\r
500 driveticker = GetTickCount();
\r
501 driveremote.read();
\r
504 driveremove.read();
\r
505 drivefloppy.read();
\r
508 void ExcludeContextValid()
\r
510 if ((GetTickCount() - EXCLUDELISTTIMEOUT)>excontextticker)
\r
512 Locker lock(m_critSec);
\r
513 excontextticker = GetTickCount();
\r
514 nocontextpaths.read();
\r
515 if (excludecontextstr.compare((stdstring)nocontextpaths)==0)
\r
517 excludecontextstr = (stdstring)nocontextpaths;
\r
518 excontextvector.clear();
\r
519 size_t pos = 0, pos_ant = 0;
\r
520 pos = excludecontextstr.find(_T("\n"), pos_ant);
\r
521 while (pos != stdstring::npos)
\r
523 stdstring token = excludecontextstr.substr(pos_ant, pos-pos_ant);
\r
524 excontextvector.push_back(token);
\r
526 pos = excludecontextstr.find(_T("\n"), pos_ant);
\r
528 if (!excludecontextstr.empty())
\r
530 excontextvector.push_back(excludecontextstr.substr(pos_ant, excludecontextstr.size()-1));
\r
532 excludecontextstr = (stdstring)nocontextpaths;
\r
535 void ExcludeListValid()
\r
537 if ((GetTickCount() - EXCLUDELISTTIMEOUT)>excludelistticker)
\r
539 Locker lock(m_critSec);
\r
540 excludelistticker = GetTickCount();
\r
541 excludelist.read();
\r
542 if (excludeliststr.compare((stdstring)excludelist)==0)
\r
544 excludeliststr = (stdstring)excludelist;
\r
546 size_t pos = 0, pos_ant = 0;
\r
547 pos = excludeliststr.find(_T("\n"), pos_ant);
\r
548 while (pos != stdstring::npos)
\r
550 stdstring token = excludeliststr.substr(pos_ant, pos-pos_ant);
\r
551 exvector.push_back(token);
\r
553 pos = excludeliststr.find(_T("\n"), pos_ant);
\r
555 if (!excludeliststr.empty())
\r
557 exvector.push_back(excludeliststr.substr(pos_ant, excludeliststr.size()-1));
\r
559 excludeliststr = (stdstring)excludelist;
\r
562 void IncludeListValid()
\r
564 if ((GetTickCount() - EXCLUDELISTTIMEOUT)>includelistticker)
\r
566 Locker lock(m_critSec);
\r
567 includelistticker = GetTickCount();
\r
568 includelist.read();
\r
569 if (includeliststr.compare((stdstring)includelist)==0)
\r
571 includeliststr = (stdstring)includelist;
\r
573 size_t pos = 0, pos_ant = 0;
\r
574 pos = includeliststr.find(_T("\n"), pos_ant);
\r
575 while (pos != stdstring::npos)
\r
577 stdstring token = includeliststr.substr(pos_ant, pos-pos_ant);
\r
578 invector.push_back(token);
\r
580 pos = includeliststr.find(_T("\n"), pos_ant);
\r
582 if (!includeliststr.empty())
\r
584 invector.push_back(includeliststr.substr(pos_ant, includeliststr.size()-1));
\r
586 includeliststr = (stdstring)includelist;
\r
593 stdstring sProjectRoot;
\r
596 CRegStdWORD cachetype;
\r
597 CRegStdWORD blockstatus;
\r
598 CRegStdWORD langid;
\r
599 CRegStdWORD showrecursive;
\r
600 CRegStdWORD folderoverlay;
\r
601 CRegStdWORD getlocktop;
\r
602 CRegStdWORD driveremote;
\r
603 CRegStdWORD drivefixed;
\r
604 CRegStdWORD drivecdrom;
\r
605 CRegStdWORD driveremove;
\r
606 CRegStdWORD drivefloppy;
\r
607 CRegStdWORD driveram;
\r
608 CRegStdWORD driveunknown;
\r
609 CRegStdWORD menulayoutlow;
\r
610 CRegStdWORD menulayouthigh;
\r
611 CRegStdWORD simplecontext;
\r
612 CRegStdWORD menumasklow_lm;
\r
613 CRegStdWORD menumaskhigh_lm;
\r
614 CRegStdWORD menumasklow_cu;
\r
615 CRegStdWORD menumaskhigh_cu;
\r
616 CRegStdWORD unversionedasmodified;
\r
617 CRegStdWORD showunversionedoverlay;
\r
618 CRegStdWORD showignoredoverlay;
\r
619 CRegStdWORD excludedasnormal;
\r
620 CRegStdString excludelist;
\r
621 CRegStdWORD columnseverywhere;
\r
622 stdstring excludeliststr;
\r
623 std::vector<stdstring> exvector;
\r
624 CRegStdString includelist;
\r
625 stdstring includeliststr;
\r
626 std::vector<stdstring> invector;
\r
627 DWORD cachetypeticker;
\r
628 DWORD recursiveticker;
\r
629 DWORD folderoverlayticker;
\r
630 DWORD getlocktopticker;
\r
632 DWORD drivetypeticker;
\r
633 DWORD layoutticker;
\r
634 DWORD menumaskticker;
\r
636 DWORD blockstatusticker;
\r
637 DWORD columnrevformatticker;
\r
638 DWORD excludelistticker;
\r
639 DWORD includelistticker;
\r
640 DWORD simplecontextticker;
\r
641 DWORD unversionedasmodifiedticker;
\r
642 DWORD showunversionedoverlayticker;
\r
643 DWORD showignoredoverlayticker;
\r
644 DWORD excludedasnormalticker;
\r
645 DWORD columnseverywhereticker;
\r
646 UINT drivetypecache[27];
\r
647 TCHAR drivetypepathcache[MAX_PATH]; // MAX_PATH ok.
\r
648 NUMBERFMT columnrevformat;
\r
650 TCHAR szThousandsSep[5];
\r
651 std::map<stdstring, AdminDir_s> admindircache;
\r
652 stdstring sAdminDirCacheKey;
\r
653 CRegStdString nocontextpaths;
\r
654 stdstring excludecontextstr;
\r
655 std::vector<stdstring> excontextvector;
\r
656 DWORD excontextticker;
\r
657 DWORD admindirticker;
\r
658 CComCriticalSection m_critSec;
\r