- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We are using VF 6.6 and VC++ 6.0 with Visual Studio.
During last years,different programmers have described a problem occuring with the putenv() C function and the getenvQQ Fortran subroutine :
an environment variable set with putenv() is not correctly retrieved with getenvQQ
Having read the Release Notes of the 6.6 updates, no solution seems to be proposed for that bug.
Has somebody a work-around for this problem ?
Christian
Link Copied
8 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you be more specific? Are these calls to putenv and GETENVQQ in the same process?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, in the same process.
If you look at the following
http://softwareforums.intel.com/ids/board/message?board.id=15&message.id=3782#M3782
you will find, for example,the same problem but with VB function SetEnvironmentVariable in place of C function putenv
Christian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I can't find evidence that this was ever submitted to vf-support. I suggest that you submit a small, self-contained example to Intel Premier Support and we'll look at it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I can't see that this was ever submitted to CVF support in the past - at least I couldn't find it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As you asked (in march 2001) the submitter to send a short example, I supposed he did it.
Christian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If he did, I can't find it. I'll take another look.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was the last poster in that thread and did submit a report about the problem I mentioned. Unfortunately I have thrown out details of the report number etc., but it was aboue 3 April 2001. As I recall, the response to my report was that getenv and getenvqq refer to different lists of environment variables, one of which might be the list set up before a process starts. I believe the on-line documentation was changed totry to make the distiction between getenv and getenvqq clearer. Of course there is also the Win API routine GetEnvironmentVariable.
In this instance it might be worth trying these alternative routines in case they help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There are effectively some explanations in the on-line documentation of SETENVQQ and GETENVQQ but, for me, it's not clear enough.
It is explained that SETENVQQ uses _putenv() and GETENVQQ uses getenv().
But, I have aprogram where I use putenv() and getenv() and it works.
If I use GETENVQQ in place of getenv(), it fails.
So, where is the mistake ?
Christian

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page