S
Steven Edison
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
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