[ Home | Alpha index | Topic index | Tutorials | Download | Feedback ]

The OS/2 API Project

DosReplaceModule

[ Syntax | Params | Returns | Include | Usage | Structs | Gotchas | Code | Also ]

Syntax

rc = DosReplaceModule( pszModName, pszReplaceWith, pszBackupName );

Parameters

PSZ pszModName (input)
Name of module to replace
PSZ pszReplaceWith (input)
Name of module to replace the above with
PSZ pszBackupName (input)
Name to back up the old module with (if specified)

Returns

APIRET rc

Include Info

Usage Explanation

This API is undocumented, but the entry point is located in the OS2386.LIB file.

This API allows you to replace a DLL that is in use. Apparently, this API checks to see whether the DLL named in pszModName is currently being used. If it is not, the API returns with an error. If it is, the O/S loads the entire module into memory, and releases the filesystem's hold on the file. It will then copy the pszReplaceWith file over the pszModName file, and optionally back up pszModName to pszBackupName.

No guarantees...

The prototype is APIRET APIENTRY DosReplaceModule(PSZ pszModName, PSZ pszReplaceWith, PSZ pszBackupName);

Relevant Structures

Gotchas

Sample Code

See Also

Author

Oscar Gustafsson - oscar@lysator.liu.se

Additions

Carsten Whimster - timur@vnet.ibm.com

Last modified September 21/1996
Please send all errors, comments, and suggestions to: timur@vnet.ibm.com

The OS/2 API Project

DosReplaceModule