But that's because environment variables are passed once to the process,
IIS, and after that it doesn't matter how many times a DLL is loaded into
the process because the process still has the same set of environment
variables as when it started. It's potentially even worse than that if you
are hosted from the IIS service because Windows Services don't pick up new
copies of environment variables until after a reboot. The thread "Updating
the System Path and IIS 6" in ...platformsdk.msi starting 12/18/2003 has
more on this.
--
Phil Wilson
[MVP Windows Installer]
[quoted text, click to view] "Alioop" <ali.hon-anderson@loanet.com> wrote in message
news:epyYK%239zDHA.1364@TK2MSFTNGP10.phx.gbl...
> Just wanted to clarify...
>
> The IIS process is calling an instantiated Active X DLL. The first time,
> environment variables are set and then first instantiated copy of the
Active
> X DLL picks up the environment variables.
>
> The next time another instantiation is done for the Active X DLL, new
> environment variables are set, but the prior environment variables are
> picked up by the second Active X object.
>
>
>
> "Phil Wilson" <phil.wilson@unisys.spamcom> wrote in message
> news:eF38DK9zDHA.1616@TK2MSFTNGP11.phx.gbl...
> > It's my understanding that a copy of the environment variables gets
passed
> once
> > to a process when it starts, so the DLL is always seeing the same copy.
> That's
> > Windows behavior, nothing to do with interop or .NET.
> > --
> > Phil Wilson [MVP Windows Installer]
> > ----
> > "Ali Hon-Anderson" <ali.hon-anderson@loanet.com> wrote in message
> > news:usxCw18zDHA.1684@TK2MSFTNGP12.phx.gbl...
> > > I have a C# web application that is "passing parameters" to a DLL via
> > > environment variables (that is how the DLL was written to receive
> > > arguments). The problem is that the DLL seems to be taking the first
set
> of
> > > environment variables I set in my C# code and saving them. Subsequent
> calls
> > > to the DLL with new environment variables all end up with the first
set
> of
> > > variables.
> > >
> > >
> > >
> > > Is the Interop assembly really "linking" or "shadowing" the initial
> object?
> > > What can I do to work around this?!!?
> > >
> > >
> > >
> > > Thank you.
> > >
> > >
> >
> >
>
>