Click here to Skip to main content
15,915,065 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: MainFrame Pin
Michael P Butler26-Feb-02 23:30
Michael P Butler26-Feb-02 23:30 
GeneralRe: MainFrame Pin
Mazdak26-Feb-02 23:30
Mazdak26-Feb-02 23:30 
GeneralMFC Smart Pointers not dual interfaces... Pin
Braulio Dez26-Feb-02 23:14
Braulio Dez26-Feb-02 23:14 
GeneralRe: MFC Smart Pointers not dual interfaces... Pin
peterchen27-Feb-02 5:59
peterchen27-Feb-02 5:59 
GeneralRe: MFC Smart Pointers not dual interfaces... Pin
Braulio Dez3-Mar-02 21:33
Braulio Dez3-Mar-02 21:33 
GeneralRe: MFC Smart Pointers not dual interfaces... Pin
peterchen4-Mar-02 0:52
peterchen4-Mar-02 0:52 
GeneralRe: MFC Smart Pointers not dual interfaces... Pin
Braulio Dez4-Mar-02 2:54
Braulio Dez4-Mar-02 2:54 
GeneralRe: MFC Smart Pointers not dual interfaces... Pin
peterchen4-Mar-02 6:35
peterchen4-Mar-02 6:35 
The (or at least: one) problem is to marshaling you custom interface across the Process Boundary.
For Dispatch interfaces, this is automatic (since the data types are limited and passed with function calls).

For custom interfaces, you need to build & register a proxy/stub DLL. ATL generates a makefile <projectname>_ps.mak, that which can be used to build the proxy/stub DLL automatically. (It uses the output of the MIDL compiler, so first compile the "normal" project, then the proxy/stub). The resulting DLL must be registered using regsvr32. Then, try again Wink | ;)
-----------
how marshaling works: on the client side, the component's interface is silently replaced by a stub, which implements the required interface, but does nothing than pack the parameters in some marshaling stream and passes this to the proxy.
The proxy is loaded into the server apartment, unpacks the parameters, calls the actual method, packs the result(s) into a stream, and returns this to the stub.
The stub unpacks everything, and returns to the caller.

Not surprisingly, Proxy & Stub are implemented as COM components - in the proxy/stub DLL (it needs to be a DLL so it can be loaded into any process).

When building an ATL DLL server, you can also choose the merge the proxy/stub code into the DLL.

Hope this helps
Peter
GeneralRe: MFC Smart Pointers not dual interfaces... Pin
Braulio Dez4-Mar-02 21:11
Braulio Dez4-Mar-02 21:11 
GeneralRe: MFC Smart Pointers not dual interfaces... Pin
peterchen4-Mar-02 23:39
peterchen4-Mar-02 23:39 
GeneralRe: MFC Smart Pointers not dual interfaces... Pin
Braulio Dez5-Mar-02 0:00
Braulio Dez5-Mar-02 0:00 
QuestionIs this possible? Pin
moliate26-Feb-02 22:40
moliate26-Feb-02 22:40 
AnswerRe: Is this possible? Pin
Mazdak26-Feb-02 23:10
Mazdak26-Feb-02 23:10 
GeneralRe: Is this possible? Pin
moliate27-Feb-02 3:34
moliate27-Feb-02 3:34 
AnswerRe: Is this possible? Pin
Shog927-Feb-02 6:34
sitebuilderShog927-Feb-02 6:34 
GeneralRe: Is this possible? Pin
moliate27-Feb-02 10:36
moliate27-Feb-02 10:36 
GeneralRich Edit Control Pin
Diabolo26-Feb-02 22:10
Diabolo26-Feb-02 22:10 
GeneralCDC -- the killer Pin
26-Feb-02 20:30
suss26-Feb-02 20:30 
GeneralRe: CDC -- the killer Pin
567890123426-Feb-02 21:12
567890123426-Feb-02 21:12 
GeneralRe: CDC -- the killer Pin
peterchen27-Feb-02 5:52
peterchen27-Feb-02 5:52 
GeneralAccessing data in views Pin
26-Feb-02 20:23
suss26-Feb-02 20:23 
GeneralRe: Accessing data in views Pin
26-Feb-02 20:37
suss26-Feb-02 20:37 
GeneralRe: Accessing data in views Pin
26-Feb-02 20:51
suss26-Feb-02 20:51 
GeneralRe: Accessing data in views Pin
26-Feb-02 21:02
suss26-Feb-02 21:02 
GeneralRe: Accessing data in views Pin
26-Feb-02 21:12
suss26-Feb-02 21:12 

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.