| 76 | }; |
| 77 | |
| 78 | class CcppcryptfsApp : public CWinApp |
| 79 | { |
| 80 | public: |
| 81 | // List of all languages found in EXE resources |
| 82 | std::vector<LanguageOption> m_vAvailableLangs; |
| 83 | |
| 84 | // Localization management methods |
| 85 | void ScanResourcesForLanguages(); |
| 86 | bool IsLanguageAvailable(WORD wLangID); |
| 87 | CString GetStringForLang(HMODULE hInst, UINT nID, WORD wLang); |
| 88 | |
| 89 | // Working with the registry |
| 90 | void SaveLanguageToRegistry(WORD wLangID); |
| 91 | WORD LoadLanguageFromRegistry(); |
| 92 | |
| 93 | private: |
| 94 | bool m_bIsRunningAsAdministrator = false; |
| 95 | bool m_bIsReallyAdministrator = false; |
| 96 | public: |
| 97 | void SendCmdArgsToSelf(HANDLE hPipe); |
| 98 | public: |
| 99 | CcppcryptfsApp(); |
| 100 | HICON m_hIcon = NULL; |
| 101 | DWORD m_mountedLetters = 0; // used for tracking mounted (by cpppcryptfs) drive letters |
| 102 | std::shared_ptr<CMenuTrayIcon> m_system_tray_icon; |
| 103 | // Overrides |
| 104 | public: |
| 105 | virtual BOOL InitInstance() override; |
| 106 | |
| 107 | virtual BOOL WriteProfileInt(LPCWSTR section, LPCWSTR entry, INT val) override; |
| 108 | virtual BOOL WriteProfileString(LPCWSTR section, LPCWSTR entry, LPCWSTR val) override; |
| 109 | virtual BOOL WriteProfileBinary(LPCWSTR section, LPCWSTR entry, LPBYTE pData, UINT nBytes) override; |
| 110 | |
| 111 | void RecreateSystemTrayIcon(); |
| 112 | |
| 113 | bool IsRunningAsAdministrator() { return m_bIsRunningAsAdministrator; } |
| 114 | bool IsReallyAdministrator() { return m_bIsReallyAdministrator; } |
| 115 | // Implementation |
| 116 | |
| 117 | DECLARE_MESSAGE_MAP() |
| 118 | }; |
| 119 | |
| 120 | extern CcppcryptfsApp theApp; |
nothing calls this directly
no outgoing calls
no test coverage detected