J
John Brock
What is the simplest way for VBA code (in Excel) to send some sort
of signal to a .NET process and tell it to do something? The VBA
code knows the task ID of the .NET process, because it started that
process (a Windows Forms app) using Shell(). It isn't necessary
to pass any information either way (although that wouldn't hurt);
all that is needed is a way to poke at the .NET process so that it
wakes up and looks for an instruction file that has just been
written by Excel.
Right now the .NET process is polling the disk, looking for new
instruction files. This actually works fine, but since there can
be long intervals between new instruction files, it would be better
if there were some way for Excel to notify the .NET process directly
when a new file is written. I'm sure there's a way to do this
using sockets and threads, but I'd like to add as little complexity
as possible, so if anyone knows a simpler way I hope you will let
me know about it.
of signal to a .NET process and tell it to do something? The VBA
code knows the task ID of the .NET process, because it started that
process (a Windows Forms app) using Shell(). It isn't necessary
to pass any information either way (although that wouldn't hurt);
all that is needed is a way to poke at the .NET process so that it
wakes up and looks for an instruction file that has just been
written by Excel.
Right now the .NET process is polling the disk, looking for new
instruction files. This actually works fine, but since there can
be long intervals between new instruction files, it would be better
if there were some way for Excel to notify the .NET process directly
when a new file is written. I'm sure there's a way to do this
using sockets and threads, but I'd like to add as little complexity
as possible, so if anyone knows a simpler way I hope you will let
me know about it.