title: Self-Hosted WCF Service for 32 bit dll access
body: <p>I have a Visual Studio Solution for a Windows Forms application with some Class Libraries that are my Application Modules. My application run under "Any CPU" and can't be changed to "x86" because it uses lots of 64 bit dll references.</p>
  
  <p><strong>I have a Native C++ 32 bit dll</strong> that I need to use inside of one of the app modules but it's quite impossible and dont want to use Wrappers, so I have read that the easiest is to use a Self-Hosted WCF Service.</p>
  
  <p>The approach that I was thinking is to create a Console Application (32 bit) project, that will be referencing the Native C++ 32 bit dll, within my solution and that will host the WCF Service, then when the user opens the app module, I will call a <strong>Process.Start(the self hosted wcf console app.exe)</strong> so my WCF service starts and then from my windows form application I can access the methods, etc.. and then I will be able to use the native 32 bit dll methods.</p>
  
  <p>I think this is known as Out-of Process application.</p>
  
  <p>Does anyone think there is a better way to do this? I really dont like to have to .EXE apps (the main app exe and the self hosted wcf.exe), can I have the self hosted wcf 32 bit project to live inside my main app.exe 64 bit project? if its possible, how can I call it?</p>
  
  <p>Thanks in advance</p>