problem of ATL
C / C++ / MFC
2
Posts
2
Posters
0
Views
1
Watching
-
-
Hi! I have two ATL objects, A and B. object A can be create from a method of object B. the user of this COM, should not directly create A in its code, but get one from object B. I don't know how to stop the user from creating A directly. Any idea?
1. Don't supply a coclass for A in the IDL 2. Remove A from your object map in the main CPP file for the project However, you will need to make sure that the interfaces that object A provides are declared in the library block of your IDL file, or it won't 'publish' the interfaces in the TLB/DLL. Steve S