Changeset 705
- Timestamp:
- 12/2/2008 1:36:14 PM (4 years ago)
- Location:
- branches/erasershellext/cpp
- Files:
-
- 6 edited
-
CtxMenu.cpp (modified) (5 diffs)
-
CtxMenu.h (modified) (1 diff)
-
DllMain.cpp (modified) (4 diffs)
-
DllMain.idl (modified) (1 diff)
-
ShellExt.rc (modified) (3 diffs)
-
stdafx.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/erasershellext/cpp/CtxMenu.cpp
r700 r705 91 91 92 92 HRESULT hr = S_OK; 93 WCHAR buffer[MAX_PATH] = {0}; 94 for (UINT i = 0; i < uNumFiles; i++) 93 WCHAR buffer[MAX_PATH] = {0}; 94 for (UINT i = 0; i < uNumFiles; i++) 95 95 { 96 96 UINT charsWritten = DragQueryFile(hDrop, i, buffer, sizeof(buffer) / sizeof(buffer[0])); … … 132 132 133 133 //First, create and populate a submenu. 134 UINT uID = uidFirstCmd; 135 HMENU hSubmenu = CreatePopupMenu(); 134 UINT uID = uidFirstCmd; 135 HMENU hSubmenu = CreatePopupMenu(); 136 136 137 137 //Create the submenu, following the order defined in the CEraserLPVERB enum, creating … … 159 159 if (uID - uidFirstCmd > 0) 160 160 InsertMenuItem(hSubmenu, CERASER_SEPERATOR_1, TRUE, GetSeparator()); 161 InsertMenu (hSubmenu, CERASER_SECURE_MOVE, MF_BYPOSITION, uID++, _T("Secure &Move")); 161 InsertMenu (hSubmenu, CERASER_SECURE_MOVE, MF_BYPOSITION, uID++, _T("Secure &Move")); 162 162 VerbMenuIndices.push_back(CERASER_SECURE_MOVE); 163 163 } … … 317 317 318 318 //If Explorer is asking for a help string, copy our string into the supplied buffer. 319 if (!(uFlags & GCS_HELPTEXT)) 319 if (!(uFlags & GCS_HELPTEXT)) 320 320 return E_INVALIDARG; 321 321 … … 536 536 MENUITEMINFO* CCtxMenu::GetSeparator() 537 537 { 538 MENUITEMINFO *mii = new MENUITEMINFO(); 538 MENUITEMINFO *mii = new MENUITEMINFO(); 539 539 mii->cbSize = sizeof(MENUITEMINFO); 540 540 mii->fMask = MIIM_TYPE; -
branches/erasershellext/cpp/CtxMenu.h
r704 r705 33 33 #include <string> 34 34 35 namespace Eraser 35 namespace Eraser 36 36 { 37 37 typedef std::wstring string_type; -
branches/erasershellext/cpp/DllMain.cpp
r704 r705 43 43 STDAPI DllCanUnloadNow(void) 44 44 { 45 AFX_MANAGE_STATE(AfxGetStaticModuleState());46 return (AfxDllCanUnloadNow()==S_OK && _AtlModule.GetLockCount()==0) ? S_OK : S_FALSE;45 AFX_MANAGE_STATE(AfxGetStaticModuleState()); 46 return (AfxDllCanUnloadNow()==S_OK && _AtlModule.GetLockCount()==0) ? S_OK : S_FALSE; 47 47 } 48 48 … … 51 51 STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv) 52 52 { 53 return _AtlModule.DllGetClassObject(rclsid, riid, ppv);53 return _AtlModule.DllGetClassObject(rclsid, riid, ppv); 54 54 } 55 55 … … 58 58 STDAPI DllRegisterServer(void) 59 59 { 60 // registers object, typelib and all interfaces in typelib61 HRESULT hr = _AtlModule.DllRegisterServer();60 // registers object, typelib and all interfaces in typelib 61 HRESULT hr = _AtlModule.DllRegisterServer(); 62 62 return hr; 63 63 } … … 72 72 73 73 //DllInstall - Adds/Removes entries to the system registry per user 74 // per machine. 74 // per machine. 75 75 STDAPI DllInstall(BOOL bInstall, LPCWSTR pszCmdLine) 76 76 { 77 HRESULT hr = E_FAIL;78 static const wchar_t szUserSwitch[] = _T("user");77 HRESULT hr = E_FAIL; 78 static const wchar_t szUserSwitch[] = _T("user"); 79 79 80 if (pszCmdLine != NULL)81 {82 if (_wcsnicmp(pszCmdLine, szUserSwitch, _countof(szUserSwitch)) == 0)83 {84 AtlSetPerUserRegistration(true);85 }86 }80 if (pszCmdLine != NULL) 81 { 82 if (_wcsnicmp(pszCmdLine, szUserSwitch, _countof(szUserSwitch)) == 0) 83 { 84 AtlSetPerUserRegistration(true); 85 } 86 } 87 87 88 if (bInstall)89 { 90 hr = DllRegisterServer();91 if (FAILED(hr))92 { 93 DllUnregisterServer();94 }95 }96 else97 {98 hr = DllUnregisterServer();99 }88 if (bInstall) 89 { 90 hr = DllRegisterServer(); 91 if (FAILED(hr)) 92 { 93 DllUnregisterServer(); 94 } 95 } 96 else 97 { 98 hr = DllUnregisterServer(); 99 } 100 100 101 101 return hr; -
branches/erasershellext/cpp/DllMain.idl
r704 r705 21 21 22 22 import "oaidl.idl"; 23 import "ocidl.idl"; 23 import "ocidl.idl"; 24 24 25 25 [ -
branches/erasershellext/cpp/ShellExt.rc
r704 r705 50 50 // 51 51 52 1 TEXTINCLUDE 52 1 TEXTINCLUDE 53 53 BEGIN 54 54 "resource.h\0" 55 55 END 56 56 57 2 TEXTINCLUDE 57 2 TEXTINCLUDE 58 58 BEGIN 59 59 "#ifndef APSTUDIO_INVOKED\r\n" … … 64 64 END 65 65 66 3 TEXTINCLUDE 66 3 TEXTINCLUDE 67 67 BEGIN 68 68 "1 TYPELIB ""EraserShellExt.tlb""\r\n" … … 124 124 // 125 125 126 STRINGTABLE 126 STRINGTABLE 127 127 BEGIN 128 128 IDS_PROJNAME "EraserShellExt" -
branches/erasershellext/cpp/stdafx.cpp
r696 r705 20 20 */ 21 21 22 #include "stdafx.h" 22 #include "stdafx.h"
Note: See TracChangeset
for help on using the changeset viewer.
