Thank you.
Lamont Norman
Idea Integration
Lamont...@Idea.com
"For every complex problem, there is a solution that is simple, neat,
and wrong." H.L. Mencken
"Lamont Norman" <Lamont...@Idea.Com> wrote in message
news:498d2970.02081...@posting.google.com...
// SelectWinDerived.cpp: implementation of the CSelectWinDerived
class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "DataWindow.h"
#include "SelectWinDerived.h"
#include <stdlib.h>
#include <windows.h>
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
.
.
.
void
CSelectWinDerived::pdmTopicCreate(CDialog* parent) // IDEA Widget
widget, XtPointer, XtPointer)
/*
Description:
Create logic for the pull down menu on topics, used to define
the items which will be in this menu.
Args:
Standard.
Returns:
nothing.
*/
{
char sSql[MAXPATHLEN]; // SQL Statement
int nStatus = 0; // Generic status indicator.
RWCString sErrorMessage; // Error message method return
int user_type; // user type from support table
int nLoop; // loop variable
CDataWindowDlg* Parent = (CDataWindowDlg*) parent;
//
// Update the topics option menu.
//
TRACE0( pdmTopicCreate begin );
//
// Get the list of "subtopics" for this "topic"
//
//int r = putenv("USER_TYPE=1");
CString ut = getenv("USER_TYPE");
user_type = 1;//atoi(getenv("USER_TYPE"));
I can use putenv to set USER_TYPE and retrieve it successfully.
However, the settings I have made via Windows 2000 are not read.
"Igor Tandetnik" <itand...@whenu.com> wrote in message news:<uySOoh7RCHA.1496@tkmsftngp11>...
"For every complex problem, there is a solution that is simple, neat,
and wrong." H.L. Mencken
"Lamont Norman" <Lamont...@idea.Com> wrote in message
news:45b2c550.02082...@posting.google.com...
ALLUSERSPROFILE=C:\Documents and Settings\All Users.WINNT
APPDATA=C:\Documents and Settings\lnorman.IDEA\Application Data
APRESSTMPDIR=C:\DOCUME~1\LNORMA~1.IDE\LOCALS~1\Temp
ARCHOME=C:\arcgis\arcexe81
ARCHOME_USER=C:\arcgis\arcexe81
ARCINFOFONTNAME=Courier New
ARCINFOFONTSIZE=8
ATHOME=C:\arcgis\arcexe81\arctools
CommonProgramFiles=C:\Program Files\Common Files
COMPUTERNAME=CO034WS2KPROD17
ComSpec=C:\WINNT\system32\cmd.exe
HOMEDRIVE=Z:
HOMEPATH=\
HOMESHARE=\\co007dc2kprod01\users\lnorman
include=C:\Program Files\Microsoft Visual
Studio\VC98\atl\include;C:\Program Files\Microsoft Visual
Studio\VC98\mfc\include;C:\Program Files\Microsoft Visual
Studio\VC98\include
lib=C:\Program Files\Microsoft Visual Studio\VC98\mfc\lib;C:\Program
Files\Microsoft Visual Studio\VC98\lib
LOGONSERVER=\\CO007DC2KPROD02
MSDevDir=C:\Program Files\Microsoft Visual Studio\Common\MSDev98
NUMBER_OF_PROCESSORS=1
OS=Windows_NT
Os2LibPath=C:\WINNT\system32\os2\dll;
Path=C:\oracle\ora81\bin;C:\Program
Files\Oracle\jre\1.1.7\bin;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\Program
Files\Microsoft SQL Server\80\Tools\BINN;C:\ArcGIS\ArcSDE\sqlexe\bin;C:\arcgis\arcexe81\bin;C:\Program
Files\Microsoft Visual Studio\Common\Tools\WinNT;C:\Program
Files\Microsoft Visual Studio\Common\MSDev98\Bin;C:\Program
Files\Microsoft Visual Studio\Common\Tools;C:\Program Files\Microsoft
Visual Studio\VC98\bin
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 6 Model 8 Stepping 3, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=0803
ProgramFiles=C:\Program Files
PROMPT=$P$G
SDEHOME=C:\ArcGIS\ArcSDE\sqlexe\
SystemDrive=C:
SystemRoot=C:\WINNT
TEMP=C:\DOCUME~1\LNORMA~1.IDE\LOCALS~1\Temp
TMP=C:\DOCUME~1\LNORMA~1.IDE\LOCALS~1\Temp
USERDNSDOMAIN=idea.com
USERDOMAIN=IDEA
USERNAME=lnorman
USERPROFILE=C:\Documents and Settings\lnorman.IDEA
USER_TYPE=1 <=========================================== This looks
correct!!!!
WF_RESOURCES=C:\oracle\ora81\WF\RES\WFUS.RES
windir=C:\WINNT
"Igor Tandetnik" <itand...@whenu.com> wrote in message news:<uxY9owFSCHA.4328@tkmsftngp09>...
#include <stdlib.h>
#include <stdio.h>
int main()
{
printf("USER_TYPE=%s\n", getenv("USER_TYPE"));
return 0;
}
I have just added USER_TYPE variable via Control Panel | System |
Advanced | Environment Variables | User Variables for... I had to
restart Visual Studio for it to notice the new setting, after which the
program started working happily.
Try also this program:
#include <stdlib.h>
#include <stdio.h>
int main()
{
for (char** p = _environ; *p; ++p)
{
printf("%s\n", *p);
}
return 0;
}
It prints all environment variables it knows about.
--
With best wishes,
Igor Tandetnik
"For every complex problem, there is a solution that is simple, neat,
and wrong." H.L. Mencken
"Lamont Norman" <Lamont...@Idea.com> wrote in message
news:498da190.02082...@posting.google.com...