1 // TortoiseGit - a Windows shell extension for easy version control
3 // Copyright (C) 2012-2013 - 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.
23 #include "GitAdminDir.h"
26 #define REGISTRYTIMEOUT 2000
27 #define EXCLUDELISTTIMEOUT 5000
28 #define ADMINDIRTIMEOUT 10000
29 #define DRIVETYPETIMEOUT 300000 // 5 min
30 #define NUMBERFMTTIMEOUT 300000
31 #define MENUTIMEOUT 100
33 #define DEFAULTMENUTOPENTRIES MENUSYNC|MENUCREATEREPOS|MENUCLONE|MENUCOMMIT
34 #define DEFAULTMENUEXTENTRIES MENUSVNIGNORE|MENUREFLOG|MENUREFBROWSE|MENUSTASHAPPLY|MENUSUBSYNC
36 typedef CComCritSecLock
<CComCriticalSection
> Locker
;
39 * \ingroup TortoiseShell
40 * Helper class which caches access to the registry. Also provides helper methods
41 * for checks against the settings stored in the registry.
51 dllFull
,// same as dll except it uses commandline git tool with all status modes supported
55 cachetype
= CRegStdDWORD(_T("Software\\TortoiseGit\\CacheType"), GetSystemMetrics(SM_REMOTESESSION
) ? dll
: exe
);
56 showrecursive
= CRegStdDWORD(_T("Software\\TortoiseGit\\RecursiveOverlay"), TRUE
);
57 folderoverlay
= CRegStdDWORD(_T("Software\\TortoiseGit\\FolderOverlay"), TRUE
);
58 driveremote
= CRegStdDWORD(_T("Software\\TortoiseGit\\DriveMaskRemote"));
59 drivefixed
= CRegStdDWORD(_T("Software\\TortoiseGit\\DriveMaskFixed"), TRUE
);
60 drivecdrom
= CRegStdDWORD(_T("Software\\TortoiseGit\\DriveMaskCDROM"));
61 driveremove
= CRegStdDWORD(_T("Software\\TortoiseGit\\DriveMaskRemovable"));
62 drivefloppy
= CRegStdDWORD(_T("Software\\TortoiseGit\\DriveMaskFloppy"));
63 driveram
= CRegStdDWORD(_T("Software\\TortoiseGit\\DriveMaskRAM"));
64 driveunknown
= CRegStdDWORD(_T("Software\\TortoiseGit\\DriveMaskUnknown"));
65 shellmenuaccelerators
= CRegStdDWORD(_T("Software\\TortoiseGit\\ShellMenuAccelerators"), TRUE
);
66 excludelist
= CRegStdString(_T("Software\\TortoiseGit\\OverlayExcludeList"));
67 includelist
= CRegStdString(_T("Software\\TortoiseGit\\OverlayIncludeList"));
68 simplecontext
= CRegStdDWORD(_T("Software\\TortoiseGit\\SimpleContext"), FALSE
);
69 unversionedasmodified
= CRegStdDWORD(_T("Software\\TortoiseGit\\UnversionedAsModified"), FALSE
);
70 hidemenusforunversioneditems
= CRegStdDWORD(_T("Software\\TortoiseGit\\HideMenusForUnversionedItems"), FALSE
);
71 showunversionedoverlay
= CRegStdDWORD(_T("Software\\TortoiseGit\\ShowUnversionedOverlay"), TRUE
);
72 showignoredoverlay
= CRegStdDWORD(_T("Software\\TortoiseGit\\ShowIgnoredOverlay"), TRUE
);
73 getlocktop
= CRegStdDWORD(_T("Software\\TortoiseGit\\GetLockTop"), TRUE
);
74 excludedasnormal
= CRegStdDWORD(_T("Software\\TortoiseGit\\ShowExcludedAsNormal"), TRUE
);
75 cachetypeticker
= GetTickCount();
76 recursiveticker
= cachetypeticker
;
77 folderoverlayticker
= cachetypeticker
;
78 driveticker
= cachetypeticker
;
79 drivetypeticker
= cachetypeticker
;
80 langticker
= cachetypeticker
;
81 columnrevformatticker
= cachetypeticker
;
82 excludelistticker
= cachetypeticker
;
83 includelistticker
= cachetypeticker
;
84 simplecontextticker
= cachetypeticker
;
85 shellmenuacceleratorsticker
= cachetypeticker
;
86 unversionedasmodifiedticker
= cachetypeticker
;
87 showunversionedoverlayticker
= cachetypeticker
;
88 showignoredoverlayticker
= cachetypeticker
;
89 admindirticker
= cachetypeticker
;
90 columnseverywhereticker
= cachetypeticker
;
91 getlocktopticker
= cachetypeticker
;
92 excludedasnormalticker
= cachetypeticker
;
93 hidemenusforunversioneditemsticker
= cachetypeticker
;
94 excontextticker
= cachetypeticker
;
96 unsigned __int64 entries
= (DEFAULTMENUTOPENTRIES
);
97 menulayoutlow
= CRegStdDWORD(_T("Software\\TortoiseGit\\ContextMenuEntries"), entries
&0xFFFFFFFF);
98 menulayouthigh
= CRegStdDWORD(_T("Software\\TortoiseGit\\ContextMenuEntrieshigh"), entries
>>32);
100 unsigned __int64 ext
= (DEFAULTMENUEXTENTRIES
);
101 menuextlow
= CRegStdDWORD(_T("Software\\TortoiseGit\\ContextMenuExtEntriesLow"), ext
&0xFFFFFFFF );
102 menuexthigh
= CRegStdDWORD(_T("Software\\TortoiseGit\\ContextMenuExtEntriesHigh"), ext
>>32 );
104 menumasklow_lm
= CRegStdDWORD(_T("Software\\TortoiseGit\\ContextMenuEntriesMaskLow"), 0, FALSE
, HKEY_LOCAL_MACHINE
);
105 menumaskhigh_lm
= CRegStdDWORD(_T("Software\\TortoiseGit\\ContextMenuEntriesMaskHigh"), 0, FALSE
, HKEY_LOCAL_MACHINE
);
106 menumasklow_cu
= CRegStdDWORD(_T("Software\\TortoiseGit\\ContextMenuEntriesMaskLow"), 0);
107 menumaskhigh_cu
= CRegStdDWORD(_T("Software\\TortoiseGit\\ContextMenuEntriesMaskHigh"), 0);
108 langid
= CRegStdDWORD(_T("Software\\TortoiseGit\\LanguageID"), 1033);
109 blockstatus
= CRegStdDWORD(_T("Software\\TortoiseGit\\BlockStatus"), 0);
110 columnseverywhere
= CRegStdDWORD(_T("Software\\TortoiseGit\\ColumnsEveryWhere"), FALSE
);
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
;
119 columnrevformatticker
= GetTickCount();
120 SecureZeroMemory(&columnrevformat
, sizeof(NUMBERFMT
));
121 GetLocaleInfo(LOCALE_USER_DEFAULT
, LOCALE_SDECIMAL
, &szDecSep
[0], _countof(szDecSep
));
122 GetLocaleInfo(LOCALE_USER_DEFAULT
, LOCALE_STHOUSAND
, &szThousandsSep
[0], _countof(szThousandsSep
));
123 columnrevformat
.lpDecimalSep
= szDecSep
;
124 columnrevformat
.lpThousandSep
= szThousandsSep
;
125 GetLocaleInfo(LOCALE_USER_DEFAULT
, LOCALE_SGROUPING
, &szBuffer
[0], _countof(szBuffer
));
126 columnrevformat
.Grouping
= _ttoi(szBuffer
);
127 GetLocaleInfo(LOCALE_USER_DEFAULT
, LOCALE_INEGNUMBER
, &szBuffer
[0], _countof(szBuffer
));
128 columnrevformat
.NegativeOrder
= _ttoi(szBuffer
);
129 sAdminDirCacheKey
.reserve(MAX_PATH
); // MAX_PATH as buffer reservation ok.
130 nocontextpaths
= CRegStdString(_T("Software\\TortoiseGit\\NoContextPaths"), _T(""));
136 showrecursive
.read();
137 folderoverlay
.read();
147 simplecontext
.read();
148 shellmenuaccelerators
.read();
149 unversionedasmodified
.read();
150 showunversionedoverlay
.read();
151 showignoredoverlay
.read();
152 excludedasnormal
.read();
153 hidemenusforunversioneditems
.read();
154 menulayoutlow
.read();
155 menulayouthigh
.read();
158 columnseverywhere
.read();
160 menumasklow_lm
.read();
161 menumaskhigh_lm
.read();
162 menumasklow_cu
.read();
163 menumaskhigh_cu
.read();
164 nocontextpaths
.read();
166 CacheType
GetCacheType()
168 if ((GetTickCount() - REGISTRYTIMEOUT
) > cachetypeticker
)
170 cachetypeticker
= GetTickCount();
173 return CacheType(DWORD((cachetype
)));
177 if ((GetTickCount() - REGISTRYTIMEOUT
) > blockstatusticker
)
179 blockstatusticker
= GetTickCount();
182 return (blockstatus
);
184 unsigned __int64
GetMenuLayout()
186 if ((GetTickCount() - REGISTRYTIMEOUT
) > layoutticker
)
188 layoutticker
= GetTickCount();
189 menulayoutlow
.read();
190 menulayouthigh
.read();
192 unsigned __int64 temp
= unsigned __int64(DWORD(menulayouthigh
))<<32;
193 temp
|= unsigned __int64(DWORD(menulayoutlow
));
197 unsigned __int64
GetMenuExt()
199 if ((GetTickCount() - REGISTRYTIMEOUT
) > exticker
)
201 exticker
= GetTickCount();
205 unsigned __int64 temp
= unsigned __int64(DWORD(menuexthigh
))<<32;
206 temp
|= unsigned __int64(DWORD(menuextlow
));
210 unsigned __int64
GetMenuMask()
212 if ((GetTickCount() - REGISTRYTIMEOUT
) > menumaskticker
)
214 menumaskticker
= GetTickCount();
215 menumasklow_lm
.read();
216 menumaskhigh_lm
.read();
217 menumasklow_cu
.read();
218 menumaskhigh_cu
.read();
220 DWORD low
= (DWORD
)menumasklow_lm
| (DWORD
)menumasklow_cu
;
221 DWORD high
= (DWORD
)menumaskhigh_lm
| (DWORD
)menumaskhigh_cu
;
222 unsigned __int64 temp
= unsigned __int64(high
)<<32;
223 temp
|= unsigned __int64(low
);
228 if ((GetTickCount() - REGISTRYTIMEOUT
)>recursiveticker
)
230 recursiveticker
= GetTickCount();
231 showrecursive
.read();
233 return (showrecursive
);
235 BOOL
IsFolderOverlay()
237 if ((GetTickCount() - REGISTRYTIMEOUT
)>folderoverlayticker
)
239 folderoverlayticker
= GetTickCount();
240 folderoverlay
.read();
242 return (folderoverlay
);
244 BOOL
IsSimpleContext()
246 if ((GetTickCount() - REGISTRYTIMEOUT
)>simplecontextticker
)
248 simplecontextticker
= GetTickCount();
249 simplecontext
.read();
251 return (simplecontext
!=0);
253 BOOL
ShellCache::HasShellMenuAccelerators()
255 if ((GetTickCount() - shellmenuacceleratorsticker
)>REGISTRYTIMEOUT
)
257 shellmenuacceleratorsticker
= GetTickCount();
258 shellmenuaccelerators
.read();
260 return (shellmenuaccelerators
!=0);
262 BOOL
IsUnversionedAsModified()
264 if ((GetTickCount() - REGISTRYTIMEOUT
)>unversionedasmodifiedticker
)
266 unversionedasmodifiedticker
= GetTickCount();
267 unversionedasmodified
.read();
269 return (unversionedasmodified
);
271 BOOL
ShowUnversionedOverlay()
273 if ((GetTickCount() - REGISTRYTIMEOUT
)>showunversionedoverlayticker
)
275 showunversionedoverlayticker
= GetTickCount();
276 showunversionedoverlay
.read();
278 return (showunversionedoverlay
);
280 BOOL
ShowIgnoredOverlay()
282 if ((GetTickCount() - REGISTRYTIMEOUT
)>showignoredoverlayticker
)
284 showignoredoverlayticker
= GetTickCount();
285 showignoredoverlay
.read();
287 return (showignoredoverlay
);
291 if ((GetTickCount() - REGISTRYTIMEOUT
)>getlocktopticker
)
293 getlocktopticker
= GetTickCount();
298 BOOL
ShowExcludedAsNormal()
300 if ((GetTickCount() - REGISTRYTIMEOUT
)>excludedasnormalticker
)
302 excludedasnormalticker
= GetTickCount();
303 excludedasnormal
.read();
305 return (excludedasnormal
);
307 BOOL
HideMenusForUnversionedItems()
309 if ((GetTickCount() - hidemenusforunversioneditemsticker
)>REGISTRYTIMEOUT
)
311 hidemenusforunversioneditemsticker
= GetTickCount();
312 hidemenusforunversioneditems
.read();
314 return (hidemenusforunversioneditems
);
319 return (driveremote
);
334 return (driveremove
);
344 return (driveunknown
);
346 BOOL
IsContextPathAllowed(LPCTSTR path
)
348 Locker
lock(m_critSec
);
349 ExcludeContextValid();
350 for (std::vector
<stdstring
>::iterator I
= excontextvector
.begin(); I
!= excontextvector
.end(); ++I
)
354 if (I
->size() && I
->at(I
->size()-1)=='*')
356 stdstring str
= I
->substr(0, I
->size()-1);
357 if (_tcsnicmp(str
.c_str(), path
, str
.size())==0)
360 else if (_tcsicmp(I
->c_str(), path
)==0)
365 BOOL
IsPathAllowed(LPCTSTR path
)
367 Locker
lock(m_critSec
);
369 for (std::vector
<stdstring
>::iterator I
= invector
.begin(); I
!= invector
.end(); ++I
)
373 if (I
->at(I
->size()-1)=='*')
375 stdstring str
= I
->substr(0, I
->size()-1);
376 if (_tcsnicmp(str
.c_str(), path
, str
.size())==0)
378 if (!str
.empty() && (str
.at(str
.size()-1) == '\\') && (_tcsnicmp(str
.c_str(), path
, str
.size()-1)==0))
381 else if (_tcsicmp(I
->c_str(), path
)==0)
383 else if ((I
->at(I
->size()-1) == '\\') &&
384 ((_tcsnicmp(I
->c_str(), path
, I
->size())==0) || (_tcsicmp(I
->c_str(), path
)==0)) )
389 int drivenumber
= PathGetDriveNumber(path
);
390 if ((drivenumber
>=0)&&(drivenumber
< 25))
392 drivetype
= drivetypecache
[drivenumber
];
393 if ((drivetype
== -1)||((GetTickCount() - DRIVETYPETIMEOUT
)>drivetypeticker
))
395 if ((drivenumber
== 0)||(drivenumber
== 1))
396 drivetypecache
[drivenumber
] = DRIVE_REMOVABLE
;
399 drivetypeticker
= GetTickCount();
400 TCHAR pathbuf
[MAX_PATH
+4]; // MAX_PATH ok here. PathStripToRoot works with partial paths too.
401 _tcsncpy_s(pathbuf
, MAX_PATH
+4, path
, MAX_PATH
+3);
402 PathStripToRoot(pathbuf
);
403 PathAddBackslash(pathbuf
);
404 ATLTRACE2(_T("GetDriveType for %s, Drive %d\n"), pathbuf
, drivenumber
);
405 drivetype
= GetDriveType(pathbuf
);
406 drivetypecache
[drivenumber
] = drivetype
;
412 TCHAR pathbuf
[MAX_PATH
+4]; // MAX_PATH ok here. PathIsUNCServer works with partial paths too.
413 _tcsncpy_s(pathbuf
, MAX_PATH
+4, path
, MAX_PATH
+3);
414 if (PathIsUNCServer(pathbuf
))
415 drivetype
= DRIVE_REMOTE
;
418 PathStripToRoot(pathbuf
);
419 PathAddBackslash(pathbuf
);
420 if (_tcsncmp(pathbuf
, drivetypepathcache
, MAX_PATH
-1)==0) // MAX_PATH ok.
421 drivetype
= drivetypecache
[26];
424 ATLTRACE2(_T("GetDriveType for %s\n"), pathbuf
);
425 drivetype
= GetDriveType(pathbuf
);
426 drivetypecache
[26] = drivetype
;
427 _tcsncpy_s(drivetypepathcache
, MAX_PATH
, pathbuf
, MAX_PATH
); // MAX_PATH ok.
431 if ((drivetype
== DRIVE_REMOVABLE
)&&(!IsRemovable()))
433 if ((drivetype
== DRIVE_REMOVABLE
)&&(drivefloppy
== 0)&&((drivenumber
==0)||(drivenumber
==1)))
435 if ((drivetype
== DRIVE_FIXED
)&&(!IsFixed()))
437 if (((drivetype
== DRIVE_REMOTE
)||(drivetype
== DRIVE_NO_ROOT_DIR
))&&(!IsRemote()))
439 if ((drivetype
== DRIVE_CDROM
)&&(!IsCDRom()))
441 if ((drivetype
== DRIVE_RAMDISK
)&&(!IsRAM()))
443 if ((drivetype
== DRIVE_UNKNOWN
)&&(IsUnknown()))
447 for (std::vector
<stdstring
>::iterator I
= exvector
.begin(); I
!= exvector
.end(); ++I
)
451 if (I
->size() && I
->at(I
->size()-1)=='*')
453 stdstring str
= I
->substr(0, I
->size()-1);
454 if (_tcsnicmp(str
.c_str(), path
, str
.size())==0)
457 else if (_tcsicmp(I
->c_str(), path
)==0)
464 if ((GetTickCount() - REGISTRYTIMEOUT
) > langticker
)
466 langticker
= GetTickCount();
471 NUMBERFMT
* GetNumberFmt()
473 if ((GetTickCount() - NUMBERFMTTIMEOUT
) > columnrevformatticker
)
476 columnrevformatticker
= GetTickCount();
477 SecureZeroMemory(&columnrevformat
, sizeof(NUMBERFMT
));
478 GetLocaleInfo(LOCALE_USER_DEFAULT
, LOCALE_SDECIMAL
, &szDecSep
[0], _countof(szDecSep
));
479 GetLocaleInfo(LOCALE_USER_DEFAULT
, LOCALE_STHOUSAND
, &szThousandsSep
[0], _countof(szThousandsSep
));
480 columnrevformat
.lpDecimalSep
= szDecSep
;
481 columnrevformat
.lpThousandSep
= szThousandsSep
;
482 GetLocaleInfo(LOCALE_USER_DEFAULT
, LOCALE_SGROUPING
, &szBuffer
[0], _countof(szBuffer
));
483 columnrevformat
.Grouping
= _ttoi(szBuffer
);
484 GetLocaleInfo(LOCALE_USER_DEFAULT
, LOCALE_INEGNUMBER
, &szBuffer
[0], _countof(szBuffer
));
485 columnrevformat
.NegativeOrder
= _ttoi(szBuffer
);
487 return &columnrevformat
;
489 BOOL
HasGITAdminDir(LPCTSTR path
, BOOL bIsDir
, CString
*ProjectTopDir
= NULL
)
491 size_t len
= _tcslen(path
);
492 std::unique_ptr
<TCHAR
[]> buf(new TCHAR
[len
+ 1]);
493 _tcscpy_s(buf
.get(), len
+ 1, path
);
496 TCHAR
* ptr
= _tcsrchr(buf
.get(), '\\');
502 if ((GetTickCount() - ADMINDIRTIMEOUT
) < admindirticker
)
504 std::map
<stdstring
, AdminDir_s
>::iterator iter
;
505 sAdminDirCacheKey
.assign(buf
.get());
506 if ((iter
= admindircache
.find(sAdminDirCacheKey
)) != admindircache
.end())
508 if (ProjectTopDir
&& iter
->second
.bHasAdminDir
)
509 *ProjectTopDir
= iter
->second
.sProjectRoot
.c_str();
510 return iter
->second
.bHasAdminDir
;
513 CString sProjectRoot
;
514 BOOL hasAdminDir
= g_GitAdminDir
.HasAdminDir(buf
.get(), true, &sProjectRoot
);
515 admindirticker
= GetTickCount();
516 Locker
lock(m_critSec
);
518 AdminDir_s
&ad
= admindircache
[buf
.get()];
519 ad
.bHasAdminDir
= hasAdminDir
;
522 ad
.sProjectRoot
.assign(sProjectRoot
);
525 *ProjectTopDir
= sProjectRoot
;
530 bool IsColumnsEveryWhere()
532 if ((GetTickCount() - REGISTRYTIMEOUT
) > columnseverywhereticker
)
534 columnseverywhereticker
= GetTickCount();
535 columnseverywhere
.read();
537 return !!(DWORD
)columnseverywhere
;
542 if ((GetTickCount() - REGISTRYTIMEOUT
)>driveticker
)
544 driveticker
= GetTickCount();
552 void ExcludeContextValid()
554 if ((GetTickCount() - EXCLUDELISTTIMEOUT
)>excontextticker
)
556 Locker
lock(m_critSec
);
557 excontextticker
= GetTickCount();
558 nocontextpaths
.read();
559 if (excludecontextstr
.compare((stdstring
)nocontextpaths
)==0)
561 excludecontextstr
= (stdstring
)nocontextpaths
;
562 excontextvector
.clear();
563 size_t pos
= 0, pos_ant
= 0;
564 pos
= excludecontextstr
.find(_T("\n"), pos_ant
);
565 while (pos
!= stdstring::npos
)
567 stdstring token
= excludecontextstr
.substr(pos_ant
, pos
-pos_ant
);
568 excontextvector
.push_back(token
);
570 pos
= excludecontextstr
.find(_T("\n"), pos_ant
);
572 if (!excludecontextstr
.empty())
574 excontextvector
.push_back(excludecontextstr
.substr(pos_ant
, excludecontextstr
.size()-1));
576 excludecontextstr
= (stdstring
)nocontextpaths
;
579 void ExcludeListValid()
581 if ((GetTickCount() - EXCLUDELISTTIMEOUT
)>excludelistticker
)
583 Locker
lock(m_critSec
);
584 excludelistticker
= GetTickCount();
586 if (excludeliststr
.compare((stdstring
)excludelist
)==0)
588 excludeliststr
= (stdstring
)excludelist
;
590 size_t pos
= 0, pos_ant
= 0;
591 pos
= excludeliststr
.find(_T("\n"), pos_ant
);
592 while (pos
!= stdstring::npos
)
594 stdstring token
= excludeliststr
.substr(pos_ant
, pos
-pos_ant
);
595 exvector
.push_back(token
);
597 pos
= excludeliststr
.find(_T("\n"), pos_ant
);
599 if (!excludeliststr
.empty())
601 exvector
.push_back(excludeliststr
.substr(pos_ant
, excludeliststr
.size()-1));
603 excludeliststr
= (stdstring
)excludelist
;
606 void IncludeListValid()
608 if ((GetTickCount() - EXCLUDELISTTIMEOUT
)>includelistticker
)
610 Locker
lock(m_critSec
);
611 includelistticker
= GetTickCount();
613 if (includeliststr
.compare((stdstring
)includelist
)==0)
615 includeliststr
= (stdstring
)includelist
;
617 size_t pos
= 0, pos_ant
= 0;
618 pos
= includeliststr
.find(_T("\n"), pos_ant
);
619 while (pos
!= stdstring::npos
)
621 stdstring token
= includeliststr
.substr(pos_ant
, pos
-pos_ant
);
622 invector
.push_back(token
);
624 pos
= includeliststr
.find(_T("\n"), pos_ant
);
626 if (!includeliststr
.empty())
628 invector
.push_back(includeliststr
.substr(pos_ant
, includeliststr
.size()-1));
630 includeliststr
= (stdstring
)includelist
;
637 stdstring sProjectRoot
;
640 CRegStdDWORD cachetype
;
641 CRegStdDWORD blockstatus
;
643 CRegStdDWORD showrecursive
;
644 CRegStdDWORD folderoverlay
;
645 CRegStdDWORD getlocktop
;
646 CRegStdDWORD driveremote
;
647 CRegStdDWORD drivefixed
;
648 CRegStdDWORD drivecdrom
;
649 CRegStdDWORD driveremove
;
650 CRegStdDWORD drivefloppy
;
651 CRegStdDWORD driveram
;
652 CRegStdDWORD driveunknown
;
653 CRegStdDWORD menulayoutlow
; /* Fist level mask */
654 CRegStdDWORD menulayouthigh
;
655 CRegStdDWORD shellmenuaccelerators
;
656 CRegStdDWORD menuextlow
; /* ext menu mask */
657 CRegStdDWORD menuexthigh
;
658 CRegStdDWORD simplecontext
;
659 CRegStdDWORD menumasklow_lm
;
660 CRegStdDWORD menumaskhigh_lm
;
661 CRegStdDWORD menumasklow_cu
;
662 CRegStdDWORD menumaskhigh_cu
;
663 CRegStdDWORD unversionedasmodified
;
664 CRegStdDWORD showunversionedoverlay
;
665 CRegStdDWORD showignoredoverlay
;
666 CRegStdDWORD excludedasnormal
;
667 CRegStdString excludelist
;
668 CRegStdDWORD hidemenusforunversioneditems
;
669 CRegStdDWORD columnseverywhere
;
670 stdstring excludeliststr
;
671 std::vector
<stdstring
> exvector
;
672 CRegStdString includelist
;
673 stdstring includeliststr
;
674 std::vector
<stdstring
> invector
;
675 DWORD cachetypeticker
;
676 DWORD recursiveticker
;
677 DWORD folderoverlayticker
;
678 DWORD getlocktopticker
;
680 DWORD drivetypeticker
;
683 DWORD menumaskticker
;
685 DWORD blockstatusticker
;
686 DWORD columnrevformatticker
;
687 DWORD excludelistticker
;
688 DWORD includelistticker
;
689 DWORD simplecontextticker
;
690 DWORD shellmenuacceleratorsticker
;
691 DWORD unversionedasmodifiedticker
;
692 DWORD showunversionedoverlayticker
;
693 DWORD showignoredoverlayticker
;
694 DWORD excludedasnormalticker
;
695 DWORD hidemenusforunversioneditemsticker
;
696 DWORD columnseverywhereticker
;
697 UINT drivetypecache
[27];
698 TCHAR drivetypepathcache
[MAX_PATH
]; // MAX_PATH ok.
699 NUMBERFMT columnrevformat
;
701 TCHAR szThousandsSep
[5];
702 std::map
<stdstring
, AdminDir_s
> admindircache
;
703 stdstring sAdminDirCacheKey
;
704 CRegStdString nocontextpaths
;
705 stdstring excludecontextstr
;
706 std::vector
<stdstring
> excontextvector
;
707 DWORD excontextticker
;
708 DWORD admindirticker
;
709 CComCriticalSection m_critSec
;