I have compiled and linked my code written in C and C++ and calling certain Windows APIs to a Win32 .dll using MinGW in Code::Blocks runnings on Windows XP. My code has also been compiled to and linked to create a Win32 .exe, which works successfully whilst communicating serially from PC to a motherboard through either physical port COM1 or COM2, as selected by a .ini file.
I have some open source C# code, whose GUI identifies the available physical or virtual COM ports and allows selection of any for serial port communications. I can use the .ini file to use the selected COM port in the Win32 .dll. I can then call the Win 32 .dll into the rewritten C# code using a p/invoke call and use SharpDevelop to compile and link my code to create an executable which runs on the Windows .Net framework.
Is there any advantage to doing this rather than using the Win32 .exe and using the blue tooth connection software to connect the virtual COM port being used for serial communications to the physical COM port (COM1 or COM2) being used by my Win32 .exe (This had been proved to work), please?