This is completely outside my experience so excuse me if this is dumb question. I've spent a couple of hours on Google looking for an answer to this and I can't find one that seems to apply directly to my situation.
I'm working with a group that has a Solution XYZ. The Solution has two Projects: XYZ and XYZOrchestrator. They bundle up the BIN folders from both Projects and deploy it to one folder on the server. XYZOrchestrator does nothing but figure out how many copies of XYZ.exe it needs and spins off that many threads each invoking XYZ.exe:
private Process m_pProcess = new Process();
this.m_pNotify = pNotify;
ProcessStartInfo pInfo = new ProcessStartInfo("XYZ.exe");
pInfo.Arguments = m_pProcessId.ToString() + " " + m_pDataFile + " " + m_pLogFile + " " + m_pReportFile + " " + m_pErrorFile;
pInfo.WindowStyle = ProcessWindowStyle.Hidden;
m_pProcess.StartInfo = pInfo;
m_pProcess.Start();
They also have a references to XYZ.exe in XYZOrchestrator and call methods within XYZ.exe like it was a DLL. So my question is: Could XYZ.exe be built instead as a DLL? Can you execute a thread as above using a DLL instead of an EXE? If I could change this to a DLL it would fit nicely into our build/deployment automation model.