Click here to Skip to main content
15,913,320 members
Home / Discussions / COM
   

COM

 
GeneralUsing a flash ActiveX control in Win32 Pin
Pablo Hernandez Valdes18-May-04 16:58
Pablo Hernandez Valdes18-May-04 16:58 
GeneralRe: Using a flash ActiveX control in Win32 Pin
Andrew Quinn AUS19-May-04 0:54
Andrew Quinn AUS19-May-04 0:54 
GeneralRegistering a COM server dll Pin
Robertcoder18-May-04 7:50
Robertcoder18-May-04 7:50 
GeneralRe: Registering a COM server dll Pin
Giles18-May-04 8:15
Giles18-May-04 8:15 
GeneralRe: Registering a COM server dll Pin
Robertcoder18-May-04 8:23
Robertcoder18-May-04 8:23 
GeneralRe: Registering a COM server dll Pin
Bob Wood19-May-04 1:13
Bob Wood19-May-04 1:13 
GeneralRe: Registering a COM server dll Pin
Robertcoder19-May-04 4:15
Robertcoder19-May-04 4:15 
Generalcall a managed COM object from an unmanaged c++ Pin
SamDav18-May-04 0:14
sussSamDav18-May-04 0:14 
Hello, I’m trying to call a managed COM object from an unmanaged c++ program. I get this one link error. Any ideas?

Compiling...
asam.cpp
Linking...
Creating library Debug/MyCPrj.lib and object Debug/MyCPrj.exp
asam.obj : error LNK2019: unresolved external symbol "void __stdcall _com_issue_errorex(long,struct IUnknown *,struct _GUID const &)" (?_com_issue_errorex@@YGXJPAUIUnknown@@ABU_GUID@@@Z) referenced in function "public: long __thiscall IClassfincom::print(void)" (?print@IClassfincom@@QAEJXZ)
Debug/MyCPrj.dll : fatal error LNK1120: 1 unresolved externals

The same c++ program, works well in a standalone c++ project.

The listing:
#include "stdafx.h"
#include "asam.h"
#pragma warning (disable: 4278)
#import <mscorlib.tlb> raw_interfaces_only
#import "D:\Documents and Settings\Sam\My Documents\Visual Studio Projects\finalCOM\finalCOM\bin\Debug\finalCOM.tlb" no_namespace named_guids

extern void sammain(void)
{

IClassfincom *cpi = NULL;


// Initialize COM and create an instance of the InterfaceImplementation class:
CoInitialize(NULL);

HRESULT hr = CoCreateInstance(CLSID_Classfincom,
NULL,
CLSCTX_INPROC_SERVER,
IID_IClassfincom,
reinterpret_cast<void**>(&cpi));

if (FAILED(hr))
{
printf("Couldn't create the instance!... 0x%x\n", hr);
}
else
{

cpi->print();

cpi->Release();
cpi = NULL;
}

// Be a good citizen and clean up COM:
CoUninitialize();

}
Generali cannot register activeX control on registry. Pin
ekklesia14-May-04 20:01
ekklesia14-May-04 20:01 
GeneralRe: i cannot register activeX control on registry. Pin
Andrew Quinn AUS17-May-04 5:48
Andrew Quinn AUS17-May-04 5:48 
GeneralQueryInterface() Pin
skruss14-May-04 13:40
skruss14-May-04 13:40 
GeneralRe: QueryInterface() Pin
ekklesia15-May-04 5:44
ekklesia15-May-04 5:44 
GeneralRe: QueryInterface() Pin
skruss25-May-04 11:59
skruss25-May-04 11:59 
GeneralRe: QueryInterface() Pin
Jörgen Sigvardsson15-May-04 13:21
Jörgen Sigvardsson15-May-04 13:21 
GeneralBeginning with COM or COM+ Pin
Mekong River13-May-04 15:48
Mekong River13-May-04 15:48 
GeneralUSES_CONVERSION Pin
monrobot1313-May-04 11:35
monrobot1313-May-04 11:35 
GeneralRe: USES_CONVERSION Pin
Andrew Quinn AUS17-May-04 5:22
Andrew Quinn AUS17-May-04 5:22 
GeneralRe: USES_CONVERSION Pin
Roger Stoltz17-May-04 11:35
Roger Stoltz17-May-04 11:35 
GeneralRe: USES_CONVERSION Pin
Steve S17-May-04 23:26
Steve S17-May-04 23:26 
GeneralRe: USES_CONVERSION Pin
Roger Stoltz18-May-04 0:20
Roger Stoltz18-May-04 0:20 
GeneralRe: Thanks Everyone Pin
monrobot1320-May-04 6:49
monrobot1320-May-04 6:49 
GeneralWriting files simultaneously Pin
13-May-04 0:14
suss13-May-04 0:14 
GeneralInterface Methods Pin
monrobot1312-May-04 18:47
monrobot1312-May-04 18:47 
GeneralRe: Interface Methods Pin
Roger Stoltz12-May-04 22:14
Roger Stoltz12-May-04 22:14 
GeneralRe: Interface Methods Pin
monrobot1313-May-04 11:01
monrobot1313-May-04 11:01 

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.