Fianlly got this working...Used eVC4 to build a emulator compatible COM dll
"Vidya" wrote:
> Can you pls tell me how to build a C++ COM dll on a Win2k machine with the
> Target as Emulator. If I change the subsystem property in the link settings
> of the COM project to subsystem:windowsce, it gives me a linker error.
>
>
> "Alex Feinman [MVP]" wrote:
>
> > As Paul points out, you need to use a correct COM component build on the
> > emulator. Not a generic x86 but the one built with Target - Emulator
> >
> > --
> > Alex Feinman
> > ---
> > Visit
http://www.opennetcf.org > > "Vidya" <Vidya@discussions.microsoft.com> wrote in message
> > news:DEAC3F9B-354A-4627-A6D1-23825917A400@microsoft.com...
> > >I could find a compatible regsvrce and copied it to the windows folder. On
> > > trying to register my dll, it gives "GetLastError returns C1".
> > >
> > > "Vidya" wrote:
> > >
> > >> Alex
> > >> I didnt realise that the COM object needs to be separately registered on
> > >> the
> > >> emulator. I cant find regsvrce.exe anywhere on the emulator. And as I
> > >> am
> > >> not using WindE I cant find it on my machine either. I checked my PPC
> > >> also,
> > >> which is an IPAQ device. It also doesnt have this file. Do you know
> > >> where I
> > >> can get this file for IPAQ device or for PPC2003 emulator.
> > >>
> > >> Regards
> > >> Vidya
> > >>
> > >> "Vidya" wrote:
> > >>
> > >> > Am able to do that from VC client as well as VB client.
> > >> >
> > >> > "Alex Feinman [MVP]" wrote:
> > >> >
> > >> > > Would it be possible for you to try instantiating this object from
> > >> > > C++ code?
> > >> > > Something has got to be wrong there
> > >> > >
> > >> > > --
> > >> > > Alex Feinman
> > >> > > ---
> > >> > > Visit
http://www.opennetcf.org > > >> > > "Vidya" <Vidya@discussions.microsoft.com> wrote in message
> > >> > > news:2432817D-C737-4358-855E-717108E8244A@microsoft.com...
> > >> > > >I have checked that the CLSID entry is present in the registry.
> > >> > > >Also I can
> > >> > > > see the dll and the methods exposed in the object browser on the VS
> > >> > > > 2005.
> > >> > > >
> > >> > > > Regards
> > >> > > > Vidya
> > >> > > >
> > >> > > > "Alex Feinman [MVP]" wrote:
> > >> > > >
> > >> > > >> This error code simply means that the class is not registered.
> > >> > > >> Remeber
> > >> > > >> that
> > >> > > >> your CF project will not register the referenced COM server - you
> > >> > > >> need to
> > >> > > >> do
> > >> > > >> it yourself.
> > >> > > >>
> > >> > > >> --
> > >> > > >> Alex Feinman
> > >> > > >> ---
> > >> > > >> Visit
http://www.opennetcf.org > > >> > > >> "Vidya" <Vidya@discussions.microsoft.com> wrote in message
> > >> > > >> news:037995E8-B596-4A6B-A5DA-14A83DE21D18@microsoft.com...
> > >> > > >> >I am using VS 2005 Beta 1 and CF 2.0. I have a old COM server
> > >> > > >> >(dll )
> > >> > > >> >which
> > >> > > >> >I
> > >> > > >> > would like to call from the PPC client app. I have added the
> > >> > > >> > reference
> > >> > > >> > and
> > >> > > >> > am able to build. However the "new" call throws a runtime
> > >> > > >> > COMException.
> > >> > > >> > The
> > >> > > >> > exception code is -2147221164.
> > >> > > >> > Am in the process of installing beta2 now, but I dont think that
> > >> > > >> > would
> > >> > > >> > help.
> > >> > > >> > Pls let me know as to what I am missing.
> > >> > > >> >
> > >> > > >> > Regards
> > >> > > >> > Vidya
> > >> > > >>
> > >> > > >>
> > >> > >
> > >> > >
> >