Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
Article ID: 217111 - Last Review: July 14, 2004 - Revision: 3.2
PRB: Calling getenv() in COM Objects Does Not Work Under Active Server Pages
This article was previously published under Q217111
When calling a method of a COM component that uses the getenv() function, the function returns a NULL value for the environment variable passed to it as parameter.
The environment variable passed to getenv() is a user environment variable. Calling getenv() under Active Server Pages (ASP) can access only the system environment block.
Add the environment variable to the system environment block if you need to retrieve the variable from ASP.
- Right-click on the My Computer icon on the desktop.
- Click Properties.
-
In the System Properties dialog box, click the Environment tab.
- Select an item from the System variables list.
- Enter the variable name in the Variable text box.
- Enter the value of the variable in the Value text box.
- Click Set.
This behavior is by design.
APPLIES TO
- Microsoft Active Server Pages 4.0, when used with:
- Microsoft Internet Information Services 5.0
- Microsoft Internet Information Server 4.0
- Microsoft Internet Information Services 5.0
| kbprb kbsecurity KB217111 |
Community Feedback System
Very often, it takes hours to solve a problem. Very often, you've looked high
and low, and have tried a lot of solutions. When you finally found it, chances
are, it was because someone else helped you. Here's your chance to give back.
Use our community feedback tool to let others know what worked for you and what
didn't.
Please also understand that the community feedback system is not warranted to be
correct, it's simply a system that we've built to let people try and help each
other. If something in a feedback response doesn't make sense to you, or you're
not comfortable making changes that the feedback talks about (like registry
edits), please consult a professional.
Thank you for using kbAlertz.com Feedback System.
-- Scott Cate