I am trying to be able to create a DCOM interface and invoke a method within
Compact Framework 2.0. I am able to create the coclass. However, I keep
getting error 80004002 when I invoke any method or property on my DCOM
interface. I tried this with an inprocess COM interface and it works fine.
What am I missing. BTW, I am using standard OLE data types (BSTR's).

Thanks

Re: CF 2.0 using interop with DCOM by troy

troy
Sat Dec 17 07:25:56 CST 2005

I figured it out; I needed the proxy/stub DLL. Not sure why; when I tested
the DCOM component with ASP I did not need it in that env.

This leads to another question. VS2005 MIDL compiler does not generate any
usable proxy/stub code nor project. When I try to use the _p.c and
dlldata.c files I get a lot of hard to understand errors; I set the common
macro defs and linker settings but I still am unable to build. My solution
was to launch eVC++ 4.0 and compile the IDL of my VS2005, take the _i.c,
_p.c and dlldata.c files and use the eVC++ 4.0 Readmeps.txt file to setup my
VS2005 proxy/stub project. There has got to be something better.

Does anyone know the compiler and linker settings to get the proxy/stub code
generated by VS2005 MIDL compiler to build correctly?

Thanks.

"troy anderson" <tander67@hotmail.com> wrote in message
news:uHAoT8vAGHA.1408@TK2MSFTNGP15.phx.gbl...
>I am trying to be able to create a DCOM interface and invoke a method
>within Compact Framework 2.0. I am able to create the coclass. However, I
>keep getting error 80004002 when I invoke any method or property on my DCOM
>interface. I tried this with an inprocess COM interface and it works fine.
>What am I missing. BTW, I am using standard OLE data types (BSTR's).
>
> Thanks
>



Re: CF 2.0 using interop with DCOM by troy

troy
Sat Dec 17 11:50:57 CST 2005

Well I figured out the source of my compile errors when using VS2005 MIDL
compiler to generate the proxy/stub code. For some reason new ATL projects
have this line in .idl file
import "atliface.idl";

This import ends up including a atliface.h file that has causes compilation
errors with .c files. I removed this code and was able to use the
proxy/stub code generated by VS2005.


"troy anderson" <tander67@hotmail.com> wrote in message
news:%23N%23mq1wAGHA.3584@TK2MSFTNGP14.phx.gbl...
>I figured it out; I needed the proxy/stub DLL. Not sure why; when I
>tested the DCOM component with ASP I did not need it in that env.
>
> This leads to another question. VS2005 MIDL compiler does not generate
> any usable proxy/stub code nor project. When I try to use the _p.c and
> dlldata.c files I get a lot of hard to understand errors; I set the common
> macro defs and linker settings but I still am unable to build. My
> solution was to launch eVC++ 4.0 and compile the IDL of my VS2005, take
> the _i.c, _p.c and dlldata.c files and use the eVC++ 4.0 Readmeps.txt file
> to setup my VS2005 proxy/stub project. There has got to be something
> better.
>
> Does anyone know the compiler and linker settings to get the proxy/stub
> code generated by VS2005 MIDL compiler to build correctly?
>
> Thanks.
>
> "troy anderson" <tander67@hotmail.com> wrote in message
> news:uHAoT8vAGHA.1408@TK2MSFTNGP15.phx.gbl...
>>I am trying to be able to create a DCOM interface and invoke a method
>>within Compact Framework 2.0. I am able to create the coclass. However,
>>I keep getting error 80004002 when I invoke any method or property on my
>>DCOM interface. I tried this with an inprocess COM interface and it works
>>fine. What am I missing. BTW, I am using standard OLE data types
>>(BSTR's).
>>
>> Thanks
>>
>
>



Re: CF 2.0 using interop with DCOM by Steve

Steve
Sun Dec 18 15:15:43 CST 2005

ATL is a C++ template class llibrary so it assumes that all files using
atliface.h will be C++ and not C.

--
Steve Maillet
EmbeddedFusion
www.EmbeddedFusion.com
smaillet at EmbeddedFusion dot com



Re: CF 2.0 using interop with DCOM by troy

troy
Sun Dec 18 19:10:33 CST 2005

I know that... but why does MS ATL wizard import this resource in the IDL
which causes the MIDL compiler generate a _p.c file with this atliface.h?
One would think that the wizard would generate code that works...

"Steve Maillet (eMVP)" <nospam1@EntelechyConsulting.com> wrote in message
news:Oe7r%23gBBGHA.608@TK2MSFTNGP12.phx.gbl...
> ATL is a C++ template class llibrary so it assumes that all files using
> atliface.h will be C++ and not C.
>
> --
> Steve Maillet
> EmbeddedFusion
> www.EmbeddedFusion.com
> smaillet at EmbeddedFusion dot com
>
>