Jump to content

DosReplaceModule: Difference between revisions

From EDM2
Created page with "==DosReplaceModule== ==Syntax== rc = DosReplaceModule( pszModName, pszReplaceWith, pszBackupName ); ==Parameters== ;PSZ pszModName (input) : Name of module to replace ;PSZ p..."
 
Line 22: Line 22:


The prototype is APIRET APIENTRY DosReplaceModule(PSZ pszModName, PSZ pszReplaceWith, PSZ pszBackupName);
The prototype is APIRET APIENTRY DosReplaceModule(PSZ pszModName, PSZ pszReplaceWith, PSZ pszBackupName);
[[Category:The OS/2 API Project]]

Revision as of 22:27, 13 November 2012

DosReplaceModule

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

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);