Click here to Skip to main content
15,922,015 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: importing template classes from dll Pin
Bob Stanneveld11-Nov-05 7:35
Bob Stanneveld11-Nov-05 7:35 
AnswerRe: importing template classes from dll Pin
cmk11-Nov-05 13:18
cmk11-Nov-05 13:18 
Questionvc & dll help Pin
bocbe11-Nov-05 4:47
bocbe11-Nov-05 4:47 
AnswerRe: vc & dll help Pin
Blake Miller11-Nov-05 5:29
Blake Miller11-Nov-05 5:29 
GeneralRe: vc & dll help Pin
Chris Losinger11-Nov-05 8:42
professionalChris Losinger11-Nov-05 8:42 
QuestionRe: vc & dll help Pin
David Crow11-Nov-05 8:47
David Crow11-Nov-05 8:47 
AnswerRe: vc & dll help Pin
bocbe11-Nov-05 21:42
bocbe11-Nov-05 21:42 
QuestionHow can I call COM from MakeFile Project in C++ Pin
ashok12311-Nov-05 4:29
ashok12311-Nov-05 4:29 
Hi All,
I have a makefile project and I want to call COM (ActiveX control) in the project.

The code to call COM in makefile is as follows:
Files included for COM support are:

#include <objbase.h>
#include <comdef.h>
#include <rpc.h>
#include <rpcndr.h>
#include <basetyps.h>

//I am just putting the COM calling code let me know if I m doing the right way.

HRESULT hr = CoInitialize(NULL);
if(FAILED(hr))
{
printf("CoInitialize Failed\n");
return 0;
}
IMyInterface* pInt = NULL;
hr = CoCreateInstance(CLSID_MyInterface, NULL, CLSCTX_INPROC_SERVER, IID_IMyInterface, reinterpret_cast<void**> (&pInt));
if(SUCCEEDED(hr))
pInt->Connect(); //This is the COM funtion that I want to use
pInt->Release();
CoUninitialize();

It compiles fine but when I try to build it gives me Linking Error...

MyClass.OBJ : error LNK2001: unresolved external symbol __imp__CoUninitialize@0
MyClass.OBJ : error LNK2001: unresolved external symbol __imp__CoCreateInstance@20
MyClass.OBJ : error LNK2001: unresolved external symbol __imp__CoInitialize@4
MyApplication.EXE : fatal error LNK1120: 3 unresolved externals
NMAKE : fatal error U1077: 'link' : return code '0x460'

Please help me on this. Thanks in advance.


Ashok
AnswerRe: How can I call COM from MakeFile Project in C++ Pin
douglasjordan13-Nov-05 15:35
douglasjordan13-Nov-05 15:35 
QuestionWrite to clipboard? Pin
bosfan11-Nov-05 3:14
bosfan11-Nov-05 3:14 
AnswerRe: Write to clipboard? Pin
Chris Losinger11-Nov-05 3:44
professionalChris Losinger11-Nov-05 3:44 
QuestionWindow MDI problem Pin
Lampros Giampouras11-Nov-05 3:13
Lampros Giampouras11-Nov-05 3:13 
AnswerRe: Window MDI problem Pin
AkiraOne11-Nov-05 3:24
AkiraOne11-Nov-05 3:24 
GeneralRe: Window MDI problem Pin
Lampros Giampouras11-Nov-05 3:35
Lampros Giampouras11-Nov-05 3:35 
QuestionCrystalReport replace parameter with RDC Pin
AkiraOne11-Nov-05 3:02
AkiraOne11-Nov-05 3:02 
QuestionVisual C++ Windows Forms Pin
Ciprian Cana11-Nov-05 1:22
Ciprian Cana11-Nov-05 1:22 
AnswerRe: Visual C++ Windows Forms Pin
jhwurmbach11-Nov-05 1:34
jhwurmbach11-Nov-05 1:34 
QuestionAccelerator keys are not working Pin
chakri1610-Nov-05 23:50
chakri1610-Nov-05 23:50 
AnswerRe: Accelerator keys are not working Pin
Roger Allen11-Nov-05 1:30
Roger Allen11-Nov-05 1:30 
QuestionWrite into Video Memory ? Far Pointer Pin
RadioOpa10-Nov-05 21:34
RadioOpa10-Nov-05 21:34 
AnswerRe: Write into Video Memory ? Far Pointer Pin
S. Senthil Kumar11-Nov-05 0:46
S. Senthil Kumar11-Nov-05 0:46 
AnswerRe: Write into Video Memory ? Far Pointer Pin
David Crow11-Nov-05 3:04
David Crow11-Nov-05 3:04 
GeneralRe: Write into Video Memory ? Far Pointer Pin
basementman11-Nov-05 8:36
basementman11-Nov-05 8:36 
Questioncan't capture captions of buttons in Win98 Pin
Elif Erkul10-Nov-05 21:33
Elif Erkul10-Nov-05 21:33 
AnswerRe: can't capture captions of buttons in Win98 Pin
Roger Allen11-Nov-05 1:32
Roger Allen11-Nov-05 1:32 

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.