Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
R

Rems Kris

@Rems Kris
About
Posts
5
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • How to create log file and how it use?
    R Rems Kris

    You can use std::basic_fstream for creating a log file. You can use open(), write() etc to write to the file. If multiple applications will use the log file, use some synchronization objects, for eg: Mutex.

    C / C++ / MFC c++ tutorial question

  • How to create and use a lib file ?
    R Rems Kris

    Include the library in your project settings and specify its path in Additional lib path.

    C / C++ / MFC c++ debugging help tutorial question

  • error LNK2001
    R Rems Kris

    Yes.lib is available..Header everything is ok..

    C / C++ / MFC help c++ com docker question

  • error LNK2001
    R Rems Kris

    Thanks for your response. I've already added the lib.

    C / C++ / MFC help c++ com docker question

  • error LNK2001
    R Rems Kris

    Hi, I've created an ActiveX control. The Control class (***Ctl) in it should be derived from a class in another dll (which is also created by me). I want to load the ActiveX control dynamically in a container exe and check if the Ctl class is derived from the base class in the dll (This container is also created by me). The base class in the dll is called TusMacroOcxBase and it is derived from COleControl. The Ctl class in the ActiveX control which is derived from TusMacroOcxBase is called CTusSampleOcxCtrl. I decided to make use of CRuntime class's methods to check the class type information (Since COleControl is already derived from CObject). So I proceeded by using the DECLARE_DYNAMIC/DECLARE_DYNCREATE and IMPLEMENT_DYNAMIC/IMPLEMENT_DYNCREATE macros. I also enabled RTTI in the container exe. My problem is that when I write IMPLEMENT_DYNCREATE(CTusSampleOcxCtrl, TusMacroOcxBase) in CTusSampleOcxCtrl class's .cpp file, it gives error LNK2001. The error message is given below. TusSampleOcxCtl.obj : error LNK2001: unresolved external symbol "public: static struct CRuntimeClass const TusMacroOcxBase::classTusMacroOcxBase" (?classTusMacroOcxBase@TusMacroOcxBase@@2UCRuntimeClass@@B) Here is the code snippet: Base class - .h class _declspec(dllexport) TusMacroOcxBase : public COleControl { public: DECLARE_DYNAMIC(TusMacroOcxBase) .... Base class - .cpp IMPLEMENT_DYNAMIC( TusMacroOcxBase, COleControl ) Derived class - .h class CTusSampleOcxCtrl : public TusMacroOcxBase { DECLARE_DYNCREATE(CTusSampleOcxCtrl) .... Derived class - .cpp IMPLEMENT_DYNCREATE(CTusSampleOcxCtrl, TusMacroOcxBase) I can solve the error easily by replacing IMPLEMENT_DYNCREATE(CTusSampleOcxCtrl, TusMacroOcxBase) with IMPLEMENT_DYNCREATE(CTusSampleOcxCtrl, COleControl), but I cant do that since I need to get the exact base class of CTusSampleOcxCtrl in the container exe. If I give COleControl there, I will get the base class as COleControl only. Is there any other way? I've tried different combinations of DECLARE_DYNAMIC/DECLARE_DYNCREATE and IMPLEMENT_DYNAMIC/IMPLEMENT_DYNCREATE also. Any help will be greatly appreciated. Thanks in advance, Rems.

    C / C++ / MFC help c++ com docker question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups