Click here to Skip to main content
15,912,400 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionSendMessage Inside a UI thread to the Main App.. Is this bad? Pin
Anonymous12-Nov-02 10:15
Anonymous12-Nov-02 10:15 
AnswerRe: SendMessage Inside a UI thread to the Main App.. Is this bad? Pin
Dave Bryant12-Nov-02 10:21
Dave Bryant12-Nov-02 10:21 
GeneralRe: SendMessage Inside a UI thread to the Main App.. Is this bad? Pin
Anonymous12-Nov-02 10:28
Anonymous12-Nov-02 10:28 
GeneralRe: SendMessage Inside a UI thread to the Main App.. Is this bad? Pin
Dave Bryant12-Nov-02 10:34
Dave Bryant12-Nov-02 10:34 
GeneralRe: SendMessage Inside a UI thread to the Main App.. Is this bad? Pin
Anonymous13-Nov-02 4:05
Anonymous13-Nov-02 4:05 
GeneralRe: SendMessage Inside a UI thread to the Main App.. Is this bad? Pin
PJ Arends12-Nov-02 10:40
professionalPJ Arends12-Nov-02 10:40 
GeneralAbstract base classes in .dll Pin
Aaron Schaefer12-Nov-02 9:46
Aaron Schaefer12-Nov-02 9:46 
GeneralRe: Abstract base classes in .dll Pin
Joaquín M López Muñoz12-Nov-02 10:48
Joaquín M López Muñoz12-Nov-02 10:48 
If using pure abstract classes, dllimport makes no sense at all, and you can safely omit it. As for the particular problem you were experiencing, probably the client DLL is "seeing" the DLL which holds IMyClass with dllexport, as DLL_API resolves to import/export depending on the _DLL macro (I guess). The default ctor, as you correctly point out, is never explicity called, but it does get called for classes derived from IMyClass.
Going the way of exporting classes through an abstract base, omit import/export qualifiers for IMyClass and declare a couple of functions like this:
IMyClass * DLL_API CreateMyClass();
DLL_API DestroyMyClass(IMyClass *);
You might be tempted to omit DestroyMyClass and use delete instead: this is a bad idea, since you're likely to run into incompatibility problems between the versions of the C run-time library used by the various components of the program.

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
GeneralRe: Abstract base classes in .dll Pin
Aaron Schaefer12-Nov-02 10:53
Aaron Schaefer12-Nov-02 10:53 
GeneralIE Icon RightClick Properties Menu.... Pin
JoeSox12-Nov-02 9:38
JoeSox12-Nov-02 9:38 
GeneralRe: IE Icon RightClick Properties Menu.... Pin
Chris Hambleton12-Nov-02 11:07
Chris Hambleton12-Nov-02 11:07 
GeneralRe: IE Icon RightClick Properties Menu.... Pin
JoeSox12-Nov-02 11:38
JoeSox12-Nov-02 11:38 
GeneralRe: IE Icon RightClick Properties Menu.... Pin
JoeSox12-Nov-02 12:17
JoeSox12-Nov-02 12:17 
GeneralTCP/IP Solutions... needed! Pin
Walote12-Nov-02 9:37
Walote12-Nov-02 9:37 
GeneralRe: TCP/IP Solutions... needed! Pin
Joaquín M López Muñoz12-Nov-02 10:59
Joaquín M López Muñoz12-Nov-02 10:59 
GeneralRe: TCP/IP Solutions... needed! Pin
Walote12-Nov-02 23:56
Walote12-Nov-02 23:56 
QuestionHow to Show Line Numbers in Visual C++ 6.0 Pin
Ehren12-Nov-02 9:19
Ehren12-Nov-02 9:19 
AnswerRe: How to Show Line Numbers in Visual C++ 6.0 Pin
Chris Hambleton12-Nov-02 11:10
Chris Hambleton12-Nov-02 11:10 
QuestionHow to add an icon to the tray where the clock is showed Pin
Anonymous12-Nov-02 8:27
Anonymous12-Nov-02 8:27 
AnswerRe: How to add an icon to the tray where the clock is showed Pin
User 665812-Nov-02 8:33
User 665812-Nov-02 8:33 
GeneralRe: How to add an icon to the tray where the clock is showed Pin
Dean Michaud12-Nov-02 9:17
Dean Michaud12-Nov-02 9:17 
AnswerRe: How to add an icon to the tray where the clock is showed Pin
Mazdak12-Nov-02 8:37
Mazdak12-Nov-02 8:37 
GeneralMSOffice-like toolbar Pin
Dean Michaud12-Nov-02 7:17
Dean Michaud12-Nov-02 7:17 
GeneralRe: MSOffice-like toolbar Pin
Chris Hambleton12-Nov-02 11:04
Chris Hambleton12-Nov-02 11:04 
GeneralSocket error checking Pin
Rickard Andersson2012-Nov-02 6:43
Rickard Andersson2012-Nov-02 6:43 

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.