Ignore:
Timestamp:
Dec 16, 2000, 10:09:53 PM (25 years ago)
Author:
umoeller
Message:

Miscellanous updates.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/helpers/dosh2.c

    r14 r17  
    714714            free(pEnv->papszVars);
    715715            pEnv->cVars = 0;
    716         }
    717     }
    718 
    719     return (arc);
    720 }
    721 
    722 /*
    723  *@@category: Helpers\Control program helpers\Module handling
    724  */
    725 
    726 /* ******************************************************************
    727  *
    728  *   Module handling helpers
    729  *
    730  ********************************************************************/
    731 
    732 /*
    733  *@@ doshResolveImports:
    734  *      this function loads the module called pszModuleName
    735  *      and resolves imports dynamically using DosQueryProcAddress.
    736  *
    737  *      To specify the functions to be imported, a RESOLVEFUNCTION
    738  *      array is used. In each of the array items, specify the
    739  *      name of the function and a pointer to a function pointer
    740  *      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 load
    746                           HMODULE *phmod,       // out: module handle
    747                           PRESOLVEFUNCTION paResolves, // in/out: function resolves
    748                           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, ignored
    764                                    (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;
    773716        }
    774717    }
Note: See TracChangeset for help on using the changeset viewer.