[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

Use ActiveX dll in console C++ application

Posted on 1999-12-07
1
Medium Priority
?
682 Views
Last Modified: 2008-02-20
The ActiveX  contains one automation class MyRegistry, so I am using the wizard to import this
Class to regular Mfc application , and then just copy this .cpp and .h to console application.

The .h file is looking like this:

class IMyRegistry : public COleDispatchDriver
{
public:
      IMyRegistry() {}            // Calls COleDispatchDriver default constructor
      IMyRegistry(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}
      IMyRegistry(const IMyRegistry& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}

// Attributes
public:

// Operations
public:

};

The .c file is looking like this:

CString IMyRegistry::GetTranslationDirName()
{
      CString result;
      InvokeHelper(0x1, DISPATCH_METHOD, VT_BSTR, (void*)&result, NULL);
      return result;
}

The problem is  in the link:

uafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __endthreadex
uafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __beginthreadex

What is the solution for this link error?

Is it possible to use ActiveX control in console application ?

0
Comment
Question by:Ritaf
1 Comment
 
LVL 32

Accepted Solution

by:
jhance earned 200 total points
ID: 2261435
You are  linking with the DEBUG single-threaded library instead of the DEBUG multi-threaded one.

Go to the Project Settings, and the C/C++ tab.  Choose Category Code Generation and select  "Debug Multi-threaded" in the "User run time library" setting.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the modern office, employees tend to move around the workplace a lot more freely. Conferences, collaborative groups, flexible seating and working from home require a new level of mobility. Technology has not only changed the behavior and the expe…
Backups and Disaster RecoveryIn this post, we’ll look at strategies for backups and disaster recovery.
Kernel Data Recovery is a renowned Data Recovery solution provider which offers wide range of softwares for both enterprise and home users with its cost-effective solutions. Let's have a quick overview of the journey and data recovery tools range he…
How to fix display issue, screen flickering issue when I plug in power cord to the machine. Before I start explaining the solution lets check out once the issue how it looks like after I connect the power cord. most of you also have faced this…
Suggested Courses

591 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question