M
MuZZy
Hi,
I just wonder if someone can help me with this:
Consider this simple piece of code:
// ============ START CODE ==============================
internal class EncThread: Thread
{
public string WaveFileName;
}
void EncThreadFunction()
{
<...>
}
void SomeOtherFunction()
{
EncThread et = new EncThread(new ThreadStart(EncThreadFunction));
et.WaveFileName = "Blah.wav";
et.Start();
}
// ============ END CODE ==============================
In "SomeOtherFunction" i start a new thread which executes "EncThreadFunction".
So here's my question - with given structure is there a way to get a value of et.WaveFileName in the thread function "EncThreadFunction"?
I don't see any and think that i need to encapsulate the whole thing into a class, including the function,
but for 10 reasons i'd like to leave it as it is - working function should be in the main class body.
Any suggestions are appreciated!
Thank you
Andrey
I just wonder if someone can help me with this:
Consider this simple piece of code:
// ============ START CODE ==============================
internal class EncThread: Thread
{
public string WaveFileName;
}
void EncThreadFunction()
{
<...>
}
void SomeOtherFunction()
{
EncThread et = new EncThread(new ThreadStart(EncThreadFunction));
et.WaveFileName = "Blah.wav";
et.Start();
}
// ============ END CODE ==============================
In "SomeOtherFunction" i start a new thread which executes "EncThreadFunction".
So here's my question - with given structure is there a way to get a value of et.WaveFileName in the thread function "EncThreadFunction"?
I don't see any and think that i need to encapsulate the whole thing into a class, including the function,
but for 10 reasons i'd like to leave it as it is - working function should be in the main class body.
Any suggestions are appreciated!
Thank you
Andrey