Click here to Skip to main content
15,917,176 members
Home / Discussions / COM
   

COM

 
Questioncreating COM Class in .net having function with string array as input pramenter Pin
Shrikanth Saripella25-Apr-10 20:10
Shrikanth Saripella25-Apr-10 20:10 
AnswerRe: creating COM Class in .net having function with string array as input pramenter Pin
Stuart Dootson25-Apr-10 21:41
professionalStuart Dootson25-Apr-10 21:41 
QuestionHow to get Interface to Control after #importing Pin
JohnnyG24-Apr-10 12:31
JohnnyG24-Apr-10 12:31 
I'm using VC6 and the MapWindowGIS control, MapWindowGIS.OCX. It has many interfaces but few examples on how to use it using VC6. I'm kind of new to using COM so my terminology is probably incorrect to some degree.

The problem is I can get to one of the interfaces, IShapeFile, using their example using:

IShapefilePtr* pShapeFile = new IShapefilePtr; 

HRESULT hr = pShapeFile->CreateInstance(__uuidof(Shapefile)); 

CreateInstance(), but when I try this on other interfaces such as IGrid and IGridHeader, CreateInstance() fails with the "Class Not Registered" error (0x80040154).

Since, the control, MapWindowGIS.OCX is registered, and I was able to get the IShapeFile interface, I'm assuming that I need to call QueryInterface() but the IGrid and IGridHeader interfaces are not part of the IShapeFile interface. So, I'm assuming then I need to get a pointer to the MapWindowGIS control but I'm not instantiating it directly since it is #import(ed).

VC6 created the .tli and tlh files and a CWnd derived class from the OCX called, CMap1. Is there something I can call in CMap1 that will return the main object's interface pointer so I can then call QueryInterface()?
AnswerRe: How to get Interface to Control after #importing Pin
Jonathan Davies25-Apr-10 0:44
Jonathan Davies25-Apr-10 0:44 
GeneralRe: How to get Interface to Control after #importing [modified] Pin
JohnnyG26-Apr-10 11:10
JohnnyG26-Apr-10 11:10 
GeneralRe: How to get Interface to Control after #importing Pin
Jonathan Davies26-Apr-10 23:15
Jonathan Davies26-Apr-10 23:15 
QuestionHow to check whether a PE(DLL,EXE) is a COM component or Win32 DLL/EXE? Pin
glitteringsound20-Apr-10 20:47
glitteringsound20-Apr-10 20:47 
AnswerRe: How to check whether a PE(DLL,EXE) is a COM component or Win32 DLL/EXE? Pin
Stephen Hewitt20-Apr-10 21:01
Stephen Hewitt20-Apr-10 21:01 
GeneralRe: How to check whether a PE(DLL,EXE) is a COM component or Win32 DLL/EXE? Pin
glitteringsound20-Apr-10 21:12
glitteringsound20-Apr-10 21:12 
GeneralRe: How to check whether a PE(DLL,EXE) is a COM component or Win32 DLL/EXE? Pin
Stephen Hewitt20-Apr-10 21:17
Stephen Hewitt20-Apr-10 21:17 
GeneralRe: How to check whether a PE(DLL,EXE) is a COM component or Win32 DLL/EXE? Pin
glitteringsound20-Apr-10 22:15
glitteringsound20-Apr-10 22:15 
GeneralRe: How to check whether a PE(DLL,EXE) is a COM component or Win32 DLL/EXE? Pin
Stephen Hewitt21-Apr-10 0:30
Stephen Hewitt21-Apr-10 0:30 
AnswerRe: How to check whether a PE(DLL,EXE) is a COM component or Win32 DLL/EXE? Pin
Jonathan Davies21-Apr-10 0:26
Jonathan Davies21-Apr-10 0:26 
AnswerRe: How to check whether a PE(DLL,EXE) is a COM component or Win32 DLL/EXE? Pin
«_Superman_»21-Apr-10 6:21
professional«_Superman_»21-Apr-10 6:21 
GeneralRe: How to check whether a PE(DLL,EXE) is a COM component or Win32 DLL/EXE? Pin
Stephen Hewitt21-Apr-10 13:45
Stephen Hewitt21-Apr-10 13:45 
QuestionIConnectionPoint Advise Return with error code 0x80040202 Pin
ANURAG VISHNOI20-Apr-10 20:20
ANURAG VISHNOI20-Apr-10 20:20 
AnswerRe: IConnectionPoint Advise Return with error code 0x80040202 Pin
Jonathan Davies21-Apr-10 0:23
Jonathan Davies21-Apr-10 0:23 
GeneralRe: IConnectionPoint Advise Return with error code 0x80040202 Pin
ANURAG VISHNOI21-Apr-10 0:27
ANURAG VISHNOI21-Apr-10 0:27 
QuestionFire Event BSTR with NULL character Pin
chetanjoshi99-Apr-10 0:17
chetanjoshi99-Apr-10 0:17 
AnswerRe: Fire Event BSTR with NULL character Pin
Stuart Dootson9-Apr-10 1:09
professionalStuart Dootson9-Apr-10 1:09 
GeneralRe: Fire Event BSTR with NULL character Pin
chetanjoshi99-Apr-10 3:13
chetanjoshi99-Apr-10 3:13 
GeneralRe: Fire Event BSTR with NULL character Pin
Stephen Hewitt13-Apr-10 14:08
Stephen Hewitt13-Apr-10 14:08 
AnswerRe: Fire Event BSTR with NULL character Pin
Jonathan Davies9-Apr-10 4:58
Jonathan Davies9-Apr-10 4:58 
AnswerRe: Fire Event BSTR with NULL character Pin
Richard MacCutchan18-Apr-10 21:30
mveRichard MacCutchan18-Apr-10 21:30 
QuestionCOM and DOM Pin
002comp6-Apr-10 20:56
002comp6-Apr-10 20:56 

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.