32/64-bit detection
The Codebase of RichCopy version 4.0 is completely different from version 3.x. RichCopy 3.x consists of COM components, and the UI is a just an interface for COM components. It supports automation and shell scripting; however component registration is required, and it is not light enough on Vista because of UAC. RichCopy version 4.0 is designed to run standalone and actually without updating registries or installing multiple components. If you copy RichCopy.exe or RichCopy64.exe into your working directory, and then it should run.
32/64-bit detection: RichCopy.exe determines whether the platform is 32-bit or 64-bit. On a 64-bit platform and RichCopy64.exe is present, and then RichCopy64.exe is executed instead. Here is actual code RichCopy uses.
hKernel32 = GetModuleHandle(TEXT("kernel32.dll"));
if (hKernel32)
{
pIsWow64Process = (LPISWOW64PROCESS)GetProcAddress(hKernel32, (LPCSTR)"IsWow64Process");
pGetNativeSystemInfo = (LPGETNATIVESYSTEMINFO)GetProcAddress(hKernel32, (LPCSTR)"GetNativeSystemInfo");
if (pIsWow64Process)
(*pIsWow64Process)(GetCurrentProcess(), &fWow64);
if (pGetNativeSystemInfo)
(*pGetNativeSystemInfo)(&si); FreeModule(hKernel32);
}
else
{
GetSystemInfo(&si);
} .....
if ((sizeof(LONG_PTR) == sizeof(DWORD)) &&
(si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64))
{
Comments
Anonymous
January 01, 2003
Great to see more information on this awesome tool. I was wondering if you might cover anything on how to actually use it as a scheduled task? :)Anonymous
January 01, 2003
The comment has been removedAnonymous
January 01, 2003
PingBack from http://www.netdeluxo.com/blog/blogs/ken-tamarus-blog-3264-bit-detection/Anonymous
February 04, 2011
A bug in RichCopy's 64-bit support: If doesn't find and load RichCopy64.exe unless it's started with a full path (i.e. click on the Start Menu item) or run "C:Program Files (x86)Microsoft Rich ToolsRichCopy 4.0RichCopy.exe). Try CDing to the directory with RichCopy and RichCopy64 your current directory and type just RichCopy on a 64-bit machine and it will fail to launch RichCopy 64.