Microsoft KB Archive/137197

{|
 * width="100%"|

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

 * }

Q137197

-

The information in this article applies to:


 * Microsoft Win32 Application Programming Interface (API), included with:
 * Microsoft Windows 95

-

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 query words: 4.00 Windows 95

Keywords : kbKernBase kbThread kbGrpDSKernBase

Issue type :

Technology : kbAudDeveloper kbWin32sSearch kbWin32API