Click here to Skip to main content
16,015,658 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Question32 bits processor and single bit bitmap Pin
Vaclav_5-Nov-14 6:10
Vaclav_5-Nov-14 6:10 
AnswerRe: 32 bits processor and single bit bitmap Pin
Albert Holguin5-Nov-14 8:38
professionalAlbert Holguin5-Nov-14 8:38 
AnswerRe: 32 bits processor and single bit bitmap Pin
Richard MacCutchan5-Nov-14 22:20
mveRichard MacCutchan5-Nov-14 22:20 
GeneralRe: 32 bits processor and single bit bitmap Pin
Albert Holguin6-Nov-14 4:42
professionalAlbert Holguin6-Nov-14 4:42 
GeneralRe: 32 bits processor and single bit bitmap Pin
Richard MacCutchan6-Nov-14 7:16
mveRichard MacCutchan6-Nov-14 7:16 
QuestionDLL for communication class Pin
Drugodrf4-Nov-14 7:56
Drugodrf4-Nov-14 7:56 
AnswerRe: DLL for communication class Pin
Derek Tortonian6-Nov-14 9:35
Derek Tortonian6-Nov-14 9:35 
AnswerRe: DLL for communication class Pin
Orjan Westin6-Nov-14 22:58
professionalOrjan Westin6-Nov-14 22:58 
You have two alternatives, using COM or a C interface. Which one suits you best depends on what sort of data and parameters you have, and how complex your interface is.

Putting a C interface on your classes means that you don't export any C++ classes or functions, and use no MFC or C++ classes in your interface. This tend to require a bit more work on the side of the user of the functions. For instance, instead of creating an instance of a class and call functions on that, you would call a free function that creates one internally, and gives you a handle to it. You then use that handle in subsequent function calls (in MFC, all CWnd classes wraps a HWND handle - for this you'd do the opposite).

If you want to keep the class interactions, you have do duplicate them in COM. Keep the classes you have, but wrap them in COM class interfaces. This tends to be more work for the library writer, as you have to create and register interfaces and do marshalling and type conversions, but it will let VB, C# and Delphi to work with the COM classes rather than a C function interface.

Both methods work for VB, C# and Delphi - it's just a matter of choosing where the pain is. Smile | :)
GeneralRe: DLL for communication class Pin
Drugodrf7-Nov-14 3:02
Drugodrf7-Nov-14 3:02 
Questionpatience sort project Pin
Member 109981454-Nov-14 5:42
Member 109981454-Nov-14 5:42 
AnswerRe: patience sort project Pin
Richard MacCutchan4-Nov-14 5:44
mveRichard MacCutchan4-Nov-14 5:44 
AnswerRe: patience sort project Pin
jeron14-Nov-14 5:45
jeron14-Nov-14 5:45 
GeneralRe: patience sort project Pin
PIEBALDconsult4-Nov-14 6:22
mvePIEBALDconsult4-Nov-14 6:22 
GeneralRe: patience sort project Pin
ZurdoDev4-Nov-14 6:24
professionalZurdoDev4-Nov-14 6:24 
GeneralRe: patience sort project Pin
PIEBALDconsult4-Nov-14 6:26
mvePIEBALDconsult4-Nov-14 6:26 
GeneralRe: patience sort project Pin
Snorri Kristjansson10-Nov-14 22:35
professionalSnorri Kristjansson10-Nov-14 22:35 
QuestionIAccessible, enable/disable, ... Pin
Castorix3-Nov-14 4:15
Castorix3-Nov-14 4:15 
SuggestionRe: IAccessible, enable/disable, ... Pin
Albert Holguin4-Nov-14 5:01
professionalAlbert Holguin4-Nov-14 5:01 
GeneralRe: IAccessible, enable/disable, ... Pin
Castorix4-Nov-14 6:45
Castorix4-Nov-14 6:45 
GeneralRe: IAccessible, enable/disable, ... Pin
Albert Holguin4-Nov-14 7:46
professionalAlbert Holguin4-Nov-14 7:46 
GeneralRe: IAccessible, enable/disable, ... Pin
Castorix4-Nov-14 22:30
Castorix4-Nov-14 22:30 
GeneralRe: IAccessible, enable/disable, ... Pin
Albert Holguin5-Nov-14 4:34
professionalAlbert Holguin5-Nov-14 4:34 
QuestionStatic linking Pin
Member 112017882-Nov-14 22:27
Member 112017882-Nov-14 22:27 
AnswerRe: Static linking Pin
Garth J Lancaster2-Nov-14 22:37
professionalGarth J Lancaster2-Nov-14 22:37 
AnswerRe: Static linking Pin
Richard MacCutchan2-Nov-14 23:09
mveRichard MacCutchan2-Nov-14 23:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.