C++ Dll

This is a discussion on C++ Dll within the Windows Programming forums, part of the Platform Specific Boards category; Hi all, I have been writing DLL's in C, procedural style - however I am about to start a large ...

  1. #1
    Registered User filler_bunny's Avatar
    Join Date
    Feb 2003
    Posts
    87

    C++ Dll

    Hi all,

    I have been writing DLL's in C, procedural style - however I am about to start a large project (in MFC) and I would like to do the dll's in an object oriented manner. I have been doing some research and it appears it may not be as simple as I thought. Particularly to do with instantiating classes that have been declared in a dll.

    Are there are any gotchas that I should be aware of with writing C++ OOP dll's?

    Also - anyone know how to ensure that MSVC++ .net does not create projects added to a workspace in a subdirectory? You used to be able to edit this in MSVC++ 6.0 but the directory is not editable in the new IDE.. ARGH!

    Thanks.

    FB
    Last edited by filler_bunny; 02-18-2003 at 03:36 AM.
    Visual C++ .net
    Windows XP profesional

  2. #2
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,789
    You can export classes in VC++ with the __declspec(dllexport) directive. MFC uses this and it works pretty well......just be aware that you are tied to compilers with that dll

  3. #3
    Registered User filler_bunny's Avatar
    Join Date
    Feb 2003
    Posts
    87
    Cheers.
    Visual C++ .net
    Windows XP profesional

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. non-MFC DLL with MFC app question.
    By Kempelen in forum Windows Programming
    Replies: 10
    Last Post: 08-20-2008, 08:11 AM
  2. dll communicating between each other
    By cloudy in forum C++ Programming
    Replies: 5
    Last Post: 06-17-2005, 03:20 AM
  3. DLL and std::string woes!
    By Magos in forum C++ Programming
    Replies: 7
    Last Post: 09-08-2004, 01:34 PM
  4. Using class with DLL
    By greg2 in forum C++ Programming
    Replies: 2
    Last Post: 09-12-2003, 06:24 AM
  5. .lib vs .h vs .dll
    By Shadow12345 in forum C++ Programming
    Replies: 13
    Last Post: 01-01-2003, 05:29 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21