There were several methods tried for developing the GUI interface
including:
• Visual Basic and C++ hybrid (VB GUI and C++ DLL)
• Pure C++
• Pure C#
The design started with the VB C++ hybrid and moved on to the pure
C++ design because of problems and then again to C#. The problems
encountered with each are listed below.
Visual Basic and C++ hybrid
• Visual Basic could not find the functions in the C++ DLL
• Could not figure out how to get an array of strings between
the VB and C++
Pure C++
• Visual Studio .NET 2003 can not be setup to write applications
in C++ for Windows CE. Wanted to use VS .NET because it has C++
GUI building tools.
Pure C#
• Found out that the .NET Compact Framework does not contain
the functions necessary to interface with the service routine. Did
not have time to figure out how to do it another way.
Finally the problems with the VB C++ hybrid design were solved
and it was used. The first problem was solved by adding the “extern
“C”” directive to each function header being exported
in the DLL. This keeps the C++ compiler from adding decorations
to the function names which was keeping the VB GUI from finding
them. The second problem was solved by allowing the GUI to write
the configuration INI file. If any changes are made to the configuration
the GUI writes it to the file and then sends a command to the service
telling it that the configuration has changed. |