DOCERR: LoadModule with segEnv=0 Does Not Work as Expected

Last reviewed: January 29, 1996
Article ID: Q137197
The information in this article applies to:
  • Microsoft Win32 Application Programming Interface (API) included with: Microsoft Windows 95 version 4.0

SUMMARY

The documentation gives the following incomplete description of the segEnv field of the LOADPARMS32 structure used by LoadModule:

   segEnv Specifies whether the child application receives a copy of
          the parent application's environment or a new environment
          created by the parent application. If this member is zero,
          the child application receives an exact duplicate of the
          parent application's environment block. If the member is
          nonzero, the value entered must be the segment address of
          a memory object containing a copy of the new environment
          for the child application.

MORE INFORMATION

Under Windows 95, if segEnv is zero, the child application does not inherit the parent's exact environment, but insteads receives a copy of the global MS-DOS environment. Use segEnv to pass a pointer to the parent's environment, instead of using zero. This allows the child to get a copy of the parent's environment.


Additional reference words: 4.00 Windows 95
KBCategory: kbprg kbdocerr
KBSubcategory: BseProcThrd


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: January 29, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.