Question : Serial Port DLL C++

I'm looking to create a C/C++ dll for customers to use to connect to my company's hardware. I have no issue with the communication portion, I looking for a little guidance on how to construct the dll so that when the client programmer links to the dll, it creates an object that is created on linking, exposed methods like add and subtract that are public and available while the dll is linked. Once the WEP is called, the connection is closed and the object is destroyed.

Any and all suggestions are welcome. Thanks!

Answer : Serial Port DLL C++

Constructing the DLL

File/New/Project

New Project
=========
On the left, Select Visual C++ Projects
On the right, Select Win32 Console Project
Type in the project name etc
Click OK

Win32 Application Wizard
==================
click Application Settings

Win32 Application Wizard
==================
Select DLL
Select Export Symbols
Click Finish

What you'll get is an example header and source which exports symbols for  
   o  a class
   o  a variable
   o  a function.

And that's it.  The rest of the stuff like precompiled headers and code generation types you probably already know.

Not sure if you're having problems with the design of the behavioural bits of your DLL
Random Solutions  
 
programming4us programming4us