Can the following link be used in visual studio 2010 for vc++ project.

Can the following http://support.microsoft.com/kb/183771 link be used in visual studio 2010 for vc++ project. Please tell.
Yes and No. If you are using a 32 bit OS the article is fine. However, on 64 bit Win 7 some of the locations are different.
As stated in the article in my HKEY_CLASSES_ROOT we have to look for PROGID When i opened HKEY_CLASSES_ROOT i saw three options :-
1>IDEACTLS.IdeaBoardInfo.1
2>IDEACTLS.IdeaDisplay.1
3>IDEACTLS.IdeaFG.1

In each options there is CLSID which one should i use????
What are you trying to do?

EDIT: Sorry, I hadn't seen http://www.cplusplus.com/forum/windows/72585/

I'll respond there.
Last edited on
Sir i am developing a project in win 32 and that is related to a pci card and while developing that card i would be required to use some of the active x functions of the idea sdk and they have given me the following info to use there sdk:-
Using the Controls in an Application
Before you can use a control, you must first make them available to the application. The exact method for how to do this depends on your programming environment. The current release of IDEA no longer supports Visual C++ 6.0. When using Visual Studio 2005 to import the ActiveX Control into a VB.NET application peform the following steps in a command-prompt window:
1. If not already registered, enter:
Regsvr32 ideactls.ocx
2. Using the correct 32- or 64-bit version of aximp from the .NET SDK, enter:
aximp ideactls.ocx
3. Enter:
regtlib ideactls.ocx
From inside Visual Studio 2005 for the application project:
1. Select Project|Add Reference.
2. From the COM tab select idea ActiveX Control Module.
3. From the Browse tab, go to the ..\idea\ActiveX folder and select AxIdeaCTLSLib.dll.
IDEA SDK User’s Guide 109


So i did the following steps the first three steps were done successfully .i.e.
1. If not already registered, enter:
Regsvr32 ideactls.ocx
2. Using the correct 32- or 64-bit version of aximp from the .NET SDK, enter:
aximp ideactls.ocx
3. Enter:
regtlib ideactls.ocx
After that i tryed to do next three steps in vs2010 win32 project but was not able to do then t am trying to use these functions using CLSID according to the following link http://support.microsoft.com/kb/183771

Ok, that answers why you're using ActiveX.

Do mind answering these please.
Do you know what COM is?
Do you know what ATL is?
Do you have a simple ATL example (component and user) that works?

We can go from there.
No sir i don't know these all and even don't have time to read this as mine project completion date is near by and after that there are mine exams so please help me to find how to use the active x functions?
COM is Microsoft's Object framework. It means Component Object Model. It doesn't naturally sit well with C++ because of the runtime discovery of types.

ATL is a C++ library that uses the strengths of C++ templates to use COM reliably. It does so by using the COM Type Library to generate class definitions that allow C++ to use COM somewhat reliably. ATL uses the generated class definitions to allow the C++ type checking system work for you.

The Type Library is information packed into a COM object that describes the object's interfaces and methods.

The Microsoft C++ compiler has been extended to read these type libraries (with #import).

I don't have any ATL examples to hand, but I suggest you have a look around for some. You need to get an ATL example working that uses a COM object. This will introduce you to the technology and confirm that your environment is set up to use it.

It's a fragile technology that can break in unexpected places.

Please let us know how you get on.
Last edited on
The @OP wants to write a COM client, not a COM server (I've never seen a COM server developed in pure C, without MFC or ATL) , CoCreateInstance() is all it is needed to obtain an interface pointer.

There is no need to use ATL when developing a COM client (altough using a smart pointer like CComPtr is very nice).

My question is:

Does idea sdk support C++ (COM itself support every programming language, this is it's main strength) ? Why it is only a VB.NET documentation ?
Sir it support c++ in every function they have given the c++ syntax also like this:-
BoardLocation Property
Description Displays the location of the board as determined by the device driver. This is a READ-ONLY property that is filled in by the OCX when the board-handle is determined. For I-Series frame grabbers, this property displays a Slot designation.
Type string
Syntax Visual Basic
Value = Object.BoardLocation
C++
CString Value = Object.GetBoardLocation( )

Sir now can u tell me step by step how to use the active x functions?
The @OP wants to write a COM client, not a COM server
Right.

I've never seen a COM server developed in pure C, without MFC or ATL
That's a good idea.

CoCreateInstance() is all it is needed to obtain an interface pointer.

There is no need to use ATL when developing a COM client ...
What do you then do with the pointer returned by CoCreateInstance, how you to see the error if the call fails, how do you clean up? Why would you take on all that work when ATL does it for you in a safe way? Don't you think COM is hard enough?

Does idea sdk support C++ (COM itself support every programming language, this is it's main strength) ? Why it is only a VB.NET documentation?
That's a good point. Is C++ the best language to use here?
Last edited on
sir i don't know vb.net i only know vc++ and c++ so please help me,how to use the active x functions in mine project.
Is this the manual ?
http://www.foresightimaging.com/v2.4/SDK_Manual.pdf

In there you have a raw C API, use that and forget about ActiveX if you are unfamiliar with it.
Ya sir this is the manual but the problem is that i want to use the function SyncChannel without active x how can i use it?
On their web site it says there is "examples source code", start from there and follow documentation.

All this questions make me wonder if you really know C++ as you said earlier.
Sir i know c++ but not an expert can u just tell me how to use the functions in there examples they are only using the library functions not the active x function and although they are using mfc and i am using the win 32 project
If that sdk has a 'flat' procedural api in addition to a COM api you'll be way ahead using that in C++ rather than COM. If you are interested in learning COM using C++ you really need to give yourself at least six months or so. And you'll need about a half dozen two thousand page books.

On the other hand, using Visual Basic or PowerBASIC you would be done already, its that easy in those languages (and that fact relates very closely to my other comments about #import, atl, etc.).


I've never seen a COM server developed in pure C, without MFC or ATL


As far as I'm concerned, that's the ONLY way to do it, i.e. without MFC or ATL. I've posted piles of tutorial material here ...

http://www.jose.it-berater.org/smfforum/index.php?board=362.0

In that material I have piles of examples using C, C++, and PowerBASIC. Hasn't anyone seen Jeff Glatt's excellent tutorial about building a COM component in raw C? Here's a link to that ...

http://www.codeproject.com/Articles/13601/COM-in-plain-C

That is the only way to really understand what is going on in the virtual function tables, and how the various interfaces are being set up in memory and called.

Anything else, and you are just cookbooking it.

To elaborate ...

Most if not all C++ compilers build classes using virtual function tables, and the COM specification is just one particular implementation of this. So if you use C++ to build your COM objects, the whole thing becomes somewhat magical, and you don't really get to see how function addresses are getting plugged into virtual function table memory blocks. If you do it low level in C or PowerBASIC though (I'm sure there are likely other languages it can be done with), you'll eventually get a real firm understanding of how it all works. And you'll have small code too.
Last edited on
Topic archived. No new replies allowed.