Browse Prior Art Database

A method for copying executable files and all load-time dynamically linked libraries in another directory.

IP.com Disclosure Number: IPCOM000016185D
Original Publication Date: 2002-Nov-17
Included in the Prior Art Database: 2003-Jun-21
Document File: 2 page(s) / 48K

Publishing Venue

IBM

Abstract

A method for copying executable files and all load-time dynamically linked libraries in another directory. The application disclosed describes an OS shell extension named "Copy with libraries", which is a clipboard copy function that, once invoked on an executable file, will allow to copy in the clipboard not only the file itself, but also all the load-time dinamically linked libraries used by that executable. Executable files (the ones with .exe extension in Windows*) usually don't contain in themselves all the executable code they need to perform. Instead, they use DLLs (Dynamic Link Libraries) as containers of shared code. Such libraries are loaded at run-time and mapped in the address space of the executable process, in such a way the executable can directly call the exported functions in the DLL.. There are two ways in which an executable can link to a DLL:

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 52% of the total text.

Page 1 of 2

A method for copying executable files and all load-time dynamically linked

libraries in another directory.

The application disclosed describes an OS shell extension named "Copy with libraries", which is a clipboard copy function that, once invoked on an executable file, will allow to copy in the clipboard not only the file itself, but also all the load-time dinamically linked libraries used by that executable.

     Executable files (the ones with .exe extension in Windows*) usually don't contain in themselves all the executable code they need to perform. Instead, they use DLLs (Dynamic Link Libraries) as containers of shared code. Such libraries are loaded at run-time and mapped in the address space of the executable process, in such a way the executable can directly call the exported functions in the DLL.. There are two ways in which an executable can link to a DLL:

Load-time dynamic linking : When the system starts a program that uses load-time dynamic linking, it uses the information in the file to locate the names of the required DLL(s). The system then searches for the DLLs in the following locations, in sequence:
1. The directory from which the application loaded.
2. The current directory.
3. The OS directory
4. The directories that are listed in the PATH environment variable Run-Time Dynamic Linking : When the application calls explicitly some library-loading functions (LoadLibrary or LoadLibraryEx, in Windows) , the system attempts to locate the DLL using the same search sequence used in load-time dynamic linking.

     Very often, it is necessary to move executable files from one directory to another, and in most cases the DLL used by the executable are contained in the same directory as the executable. However, since the names of the load-time-linked DLLs are not visible by the users, moving only the .exe file will result in the application not to work, because it will no longer be able to find load-time-linked DLLs in the new directory (since they were not moved t...