c# console application sharing variables with visual basic
-
Hello all and thanks for reading me. I have a simple console application in c# that gets a continuous stream from a camera. the pseudo code is
bool takepicture = false
while (true)
{
Stream
Stream some more
if (takepicture)
{
capture and save the image to a file
takepicture=false
}
}In the end what i would like to do is for a Visual Basic !!!!!!!! program to be able to call my c# console app and when something happens in the visual basic (like press a button) it will change the variable takepicture to true. I don't even know if this is possible and if it is what should i be searching for? Thanks again.
-
Hello all and thanks for reading me. I have a simple console application in c# that gets a continuous stream from a camera. the pseudo code is
bool takepicture = false
while (true)
{
Stream
Stream some more
if (takepicture)
{
capture and save the image to a file
takepicture=false
}
}In the end what i would like to do is for a Visual Basic !!!!!!!! program to be able to call my c# console app and when something happens in the visual basic (like press a button) it will change the variable takepicture to true. I don't even know if this is possible and if it is what should i be searching for? Thanks again.
Yes, it's possible alright. You're talking about inter-process communication. Why do you want to use VB though? Also, because both C# and VB.NET compile down to the same thing you could probably just reference the C# assembly from your VB code if it could run in-process.
Regards, Rob Philpott.
-
Hello all and thanks for reading me. I have a simple console application in c# that gets a continuous stream from a camera. the pseudo code is
bool takepicture = false
while (true)
{
Stream
Stream some more
if (takepicture)
{
capture and save the image to a file
takepicture=false
}
}In the end what i would like to do is for a Visual Basic !!!!!!!! program to be able to call my c# console app and when something happens in the visual basic (like press a button) it will change the variable takepicture to true. I don't even know if this is possible and if it is what should i be searching for? Thanks again.
A possible solution could be to have the VB application update a text / xml etc file, which would be polled by the c# console app to check if the user wants to take a snapshot. Maybe !
Everyone dies - but not everyone lives