Changeset 17 for trunk/src/helpers/dosh2.c
- Timestamp:
- Dec 16, 2000, 10:09:53 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/helpers/dosh2.c
r14 r17 714 714 free(pEnv->papszVars); 715 715 pEnv->cVars = 0; 716 }717 }718 719 return (arc);720 }721 722 /*723 *@@category: Helpers\Control program helpers\Module handling724 */725 726 /* ******************************************************************727 *728 * Module handling helpers729 *730 ********************************************************************/731 732 /*733 *@@ doshResolveImports:734 * this function loads the module called pszModuleName735 * and resolves imports dynamically using DosQueryProcAddress.736 *737 * To specify the functions to be imported, a RESOLVEFUNCTION738 * array is used. In each of the array items, specify the739 * name of the function and a pointer to a function pointer740 * where to store the resolved address.741 *742 *@@added V0.9.3 (2000-04-29) [umoeller]743 */744 745 APIRET doshResolveImports(PSZ pszModuleName, // in: DLL to load746 HMODULE *phmod, // out: module handle747 PRESOLVEFUNCTION paResolves, // in/out: function resolves748 ULONG cResolves) // in: array item count (not array size!)749 {750 CHAR szName[CCHMAXPATH];751 APIRET arc = DosLoadModule(szName,752 sizeof(szName),753 pszModuleName,754 phmod);755 if (arc == NO_ERROR)756 {757 ULONG ul;758 for (ul = 0;759 ul < cResolves;760 ul++)761 {762 arc = DosQueryProcAddr(*phmod,763 0, // ordinal, ignored764 (PSZ)paResolves[ul].pcszFunctionName,765 paResolves[ul].ppFuncAddress);766 767 /* _Pmpf(("Resolved %s to 0x%lX, rc: %d",768 paResolves[ul].pcszFunctionName,769 *paResolves[ul].ppFuncAddress,770 arc)); */771 if (arc != NO_ERROR)772 break;773 716 } 774 717 }
Note:
See TracChangeset
for help on using the changeset viewer.