pszName (PSZ) - output

      The address of a buffer into which the name of an object that contributed to the failure of DosLoadModule is to be placed.

      The name of the object is usually the name of a dynamic link library that either could not be found or could not be loaded.

    cbName (ULONG) - input

      The length, in bytes, of the buffer described by pszName.

    pszModname (PSZ) - input

      The address of an ASCIIZ name string that contains the dynamic link module name.

      The file-name extension used for dynamic link libraries is .DLL.

      When a request is made to load a module and a fully-qualified path is specified, the system loads that .DLL, if it exists. If a fully-qualified path is not specified, the system checks if the .DLL is already loaded. If it is loaded, that .DLL is the one that is used; otherwise, the system searches the paths in the LIBPATH string in the "CONFIG.SYS" file and uses the first instance of the specified .DLL it finds. If the current directory is not specified in the LIBPATH, the system does not check that directory to see if a different version exists. Consequently, if two processes started from different directories use the same DLL, but different versions of that DLL exist in both directories, the version of the DLL loaded by the first process is the one used by both processes.

    phmod (PHMODULE) - output

      Pointer to an HMODULE in which the handle for the dynamic link module is returned.

    ulrc (APIRET) - returns

      Return Code.

      DosLoadModule returns one of the following values:

    • NO_ERROR 2
        ERROR_FILE_NOT_FOUND
      3
        ERROR_PATH_NOT_FOUND
      4
        ERROR_TOO_MANY_OPEN_FILES
      5
        ERROR_ACCESS_DENIED
      8
        ERROR_NOT_ENOUGH_MEMORY
      11
        ERROR_BAD_FORMAT
      26
        ERROR_NOT_DOS_DISK
      32
        ERROR_SHARING_VIOLATION
      33
        ERROR_LOCK_VIOLATION
      36
        ERROR_SHARING_BUFFER_EXCEEDED
      95
        ERROR_INTERRUPT
      108
        ERROR_DRIVE_LOCKED
      123
        ERROR_INVALID_NAME
      127
        ERROR_PROC_NOT_FOUND
      180
        ERROR_INVALID_SEGMENT_NUMBER
      182
        ERROR_INVALID_ORDINAL
      190
        ERROR_INVALID_MODULETYPE
      191
        ERROR_INVALID_EXE_SIGNATURE
      192
        ERROR_EXE_MARKED_INVALID (this error code is not valid in OS/2 Warp PowerPC Edition)
      194
        ERROR_ITERATED_DATA_EXCEEDS_64K
      195
        ERROR_INVALID_MINALLOCSIZE
      196
        ERROR_DYNLINK_FROM_INVALID_RING
      198
        ERROR_INVALID_SEGDPL
      199
        ERROR_AUTODATASEG_EXCEEDS_64K
      201
        ERROR_RELOCSRC_CHAIN_EXCEEDS_SEGLIMIT
      206
        ERROR_FILENAME_EXCED_RANGE
      295
        ERROR_INIT_ROUTINE_FAILED
      For a full list of error codes, see Errors.


    [Back] [Next]