-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 269817d
Showing
33 changed files
with
2,404 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
*.url | ||
CopyLocation.dll | ||
CopyLocation-Bill-*.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
I rebuilt this in VS2005 to get a version for x64. | ||
|
||
I changed the source to turn off the bitmaps on the menu items. | ||
|
||
http://www.codeproject.com/shell/copylocation.asp | ||
http://grebulon.com/software/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
CopyLocation.cpp | ||
Line 73: Use SetStringValue instead of SetValue and swap the parameter order: | ||
New: lRet = reg.SetStringValue(_T("{A7847D3E-09F3-11D4-8F6D-0080AD87DD41}"), _T("CopyLocationShl extension") ); | ||
|
||
CopyLocation.def | ||
Remove @n on each line. | ||
|
||
CopyLocationShl.cpp | ||
Line 13: Comment out m_hCopyBmp assignment. | ||
Line 106: Change GetCommandString�s first parameter (idCmd) from UINT to UINT_PTR. | ||
Line 197: Change size variable to SIZE_T instead of long. | ||
Line 221: Change pos variable to SIZE_T instead of long. | ||
|
||
CopyLocationShl.h | ||
Line 39: Change GetCommandString�s first parameter (idCmd) from UINT to UINT_PTR. | ||
|
||
StdAfx.cpp | ||
Remove #include <statreg.cpp> and #include <atlimpl.cpp>. | ||
|
||
StdAfx.h | ||
Add #include <shlguid.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
// CopyLocation.cpp : Implementation of DLL Exports. | ||
|
||
|
||
// Note: Proxy/Stub Information | ||
// To build a separate proxy/stub DLL, | ||
// run nmake -f CopyLocationps.mk in the project directory. | ||
|
||
#include "stdafx.h" | ||
#include "resource.h" | ||
#include <initguid.h> | ||
#include "CopyLocation.h" | ||
|
||
#include "CopyLocation_i.c" | ||
#include "CopyLocationShl.h" | ||
|
||
|
||
CComModule _Module; | ||
|
||
BEGIN_OBJECT_MAP(ObjectMap) | ||
OBJECT_ENTRY(CLSID_CopyLocationShl, CCopyLocationShl) | ||
END_OBJECT_MAP() | ||
|
||
///////////////////////////////////////////////////////////////////////////// | ||
// DLL Entry Point | ||
|
||
extern "C" | ||
BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpReserved*/) | ||
{ | ||
if (dwReason == DLL_PROCESS_ATTACH) | ||
{ | ||
_Module.Init(ObjectMap, hInstance, &LIBID_COPYLOCATIONLib); | ||
DisableThreadLibraryCalls(hInstance); | ||
} | ||
else if (dwReason == DLL_PROCESS_DETACH) | ||
_Module.Term(); | ||
return TRUE; // ok | ||
} | ||
|
||
///////////////////////////////////////////////////////////////////////////// | ||
// Used to determine whether the DLL can be unloaded by OLE | ||
|
||
STDAPI DllCanUnloadNow(void) | ||
{ | ||
return (_Module.GetLockCount()==0) ? S_OK : S_FALSE; | ||
} | ||
|
||
///////////////////////////////////////////////////////////////////////////// | ||
// Returns a class factory to create an object of the requested type | ||
|
||
STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv) | ||
{ | ||
return _Module.GetClassObject(rclsid, riid, ppv); | ||
} | ||
|
||
///////////////////////////////////////////////////////////////////////////// | ||
// DllRegisterServer - Adds entries to the system registry | ||
|
||
STDAPI DllRegisterServer(void) | ||
{ | ||
// If we're on NT, add ourselves to the list of approved shell extensions | ||
if (0 == (GetVersion() & 0x80000000UL)) | ||
{ | ||
CRegKey reg; | ||
LONG lRet; | ||
|
||
lRet = reg.Open(HKEY_LOCAL_MACHINE, | ||
_T("Software\\Microsoft\\Windows\\CurrentVersion\\Shell Extensions\\Approved"), | ||
KEY_SET_VALUE); | ||
|
||
if (ERROR_SUCCESS != lRet) | ||
return E_ACCESSDENIED; | ||
|
||
lRet = reg.SetStringValue(_T("{A7847D3E-09F3-11D4-8F6D-0080AD87DD41}"), _T("CopyLocationShl extension") ); | ||
|
||
if (ERROR_SUCCESS != lRet) | ||
return E_ACCESSDENIED; | ||
} | ||
|
||
// registers object, typelib and all interfaces in typelib | ||
return _Module.RegisterServer(TRUE); | ||
} | ||
|
||
///////////////////////////////////////////////////////////////////////////// | ||
// DllUnregisterServer - Removes entries from the system registry | ||
|
||
STDAPI DllUnregisterServer(void) | ||
{ | ||
// If we're on NT, remove ourselves from the list of approved shell extensions. | ||
// Note that if we get an error along the way, I don't bail out since I want | ||
// to do the normal ATL unregistration stuff too. | ||
if (0 == (GetVersion() & 0x80000000UL)) | ||
{ | ||
CRegKey reg; | ||
LONG lRet; | ||
|
||
lRet = reg.Open(HKEY_LOCAL_MACHINE, | ||
_T("Software\\Microsoft\\Windows\\CurrentVersion\\Shell Extensions\\Approved"), | ||
KEY_SET_VALUE); | ||
|
||
if (ERROR_SUCCESS == lRet) | ||
{ | ||
lRet = reg.DeleteValue(_T("CopyLocationShl extension")); | ||
} | ||
} | ||
|
||
return _Module.UnregisterServer(TRUE); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
; CopyLocation.def : Declares the module parameters. | ||
|
||
LIBRARY "CopyLocation.DLL" | ||
|
||
EXPORTS | ||
DllCanUnloadNow PRIVATE | ||
DllGetClassObject PRIVATE | ||
DllRegisterServer PRIVATE | ||
DllUnregisterServer PRIVATE |
Oops, something went wrong.