Re: COM Question

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



I planned to rewrite them in C# as the GUIs will have to
be completely different from the ones for the PC
(they're written in unmanaged C++).

I've kinda done one, but not sure I did it the way I should
have:

1-Created VCR Control Library DLL to define interface
2-Created UserControl Library DLL for gui
3-Made UserControl implement COM interface:
public partial class Sony_X1234_Mobile : UserControl, VCR
4-Dropped Sony_X1234_Mobile onto host app to test it. (also had to
reference the control AND interface dll statically)

It's working, but not dynamicly loaded for now, and I'm not accessing
functions from VCR, just the member variable.

Steven


"<ctacke/>" <ctacke[at]opennetcf[dot]com> wrote in message
news:ui3NLTvUIHA.1132@xxxxxxxxxxxxxxxxxxxxxxx
Do you plan to port all of these COM objects to CE as COM objects or
managed objects?


--

Chris Tacke, eMVP
Join the Embedded Developer Community
http://community.opennetcf.com



"Steven Edison" <EdisonCPP@xxxxxxxxxxxxxxxxx> wrote in message
news:%23hwQCMvUIHA.5132@xxxxxxxxxxxxxxxxxxxxxxx
Hi,

We currently have a large library of COM objects written
in C++ that talk to different devices. Then we have several
applications that can host these objects. The simplest of
which just wraps the objects and displays their custom
GUIs. If you register a new dll, then it shows up in the
list as an available device in the various host applications.

I'm trying to duplicate this behavior for a mobile version of
our software. I'm afraid you may not be able to do what
I want in Compact Framework. The new app is C#.
What I'd like to do is get a list from the registry of installed
objects, and load them dynamically. To give a layman's
example, I'd have several implementations of IVCR in
various DLLs, and I could list the name brands listed in
the app for the ones installed, when they click on, say
Sony - X1234, then it would load the proper COM
object, which would display it's GUI. This way I can
just install a new DLL when we add a new device
to the software. Then I can just call IVCR.Record()
on each of them, and they'd each work. The apps would
have no prior knowledge of Sony, but would IVCR.

We've done this many times in the world of PC C++, but
not sure if we can do it for our PocketPC apps.

I have implemented a UserControl Library dll and a dll
that defines the interface, and had the UserControl implement
the interface, but so far I'm just placing the control on
the gui in form designer of Visual Studio. Ideally I'd like
to do something like:

//psuedo code
OnDeviceSelectionChange(){
IVCR obj;
//App doesn't know about "SonyX1234"
//instead gets list of installed "devices" from registry
//so user can choose at runtime
obj.CoCreateInstance("SonyX1234");
obj.Show(x,y,cx,cy);
obj.Record();
}

(the vcr is just an example, not a true representation
of the industry specific devices we're dealing with)

Is this possible?

Thanks in advance,

Steven





.



Relevant Pages

  • Determine if the main app is a console or GUI?
    ... is there a way to determine at runtime whether an app is ... I would like to determine this in some DLL code. ... a console app as well as from a GUI app. ...
    (microsoft.public.vc.mfc)
  • Re: Great SWT Program
    ... keyboard shortcuts aren't always obvious. ... A user using a GUI app may notice something ... and notice tedium using a GUI app to do it. ... specifically think of the feature they wanted and couldn't find in it. ...
    (comp.lang.java.programmer)
  • Re: Tips for installing windows and freeBSD both.. anyone??
    ... How is this different from the command line? ... I'm just as dead in the water as with the GUI. ... but since it is internal to the app, and *not* part of the GUI, it doesn't ... the spreadsheet  specified the spreadsheet file to use, ...
    (freebsd-questions)
  • Re: Tips for installing windows and freeBSD both.. anyone??
    ... How is this different from the command line? ... I'm just as dead in the water as with the GUI. ... but since it is internal to the app, and *not* part of the GUI, it doesn't ... the spreadsheet  specified the spreadsheet file to use, ...
    (freebsd-questions)
  • Re: MacUpdatePromo
    ... easy way to know which app will work which way. ... so users are supposed to know all GUI guidelines and understand the ... when they close a window. ... them to quit. ...
    (comp.sys.mac.advocacy)