S
Steve Terepin
I've got a Managed C++ wrapper class that calls some functions that talk to
a hardware data acquisition card, via a LIB supplied by the vendor. The
calls ultimately go through to a DLL, which is installed in the System
directory. Now, everything works fine on the machine that actually has the
hardware board present, and has the DLL installed. But I also want to run
this code on my laptop, and I'd prefer not to clutter up my system directory
with that hardware-specific DLL. When I run up my Test app, which creates an
instance of the Managed wrapper class (which is in its own assembly) it
collapses with a 'FileNotFound' exception - complaining that my Managed
wrapper assembly (or one of its dependencies) is not present. Presumably the
CLR is trying to load the assembly that contains my managed wrapper, and
falls over because the required DLL (used by the LIB routines I'm calling)
cannot be found. Fair enough - except that the exception is getting thrown
right at the beginning, before I event attempt to create an instance of my
managed wrapper class.
What I'd really like to do is catch this exception somehow, and substitute a
software simulation of the hardware card when the real hardware isn't
present. Any ideas ?
a hardware data acquisition card, via a LIB supplied by the vendor. The
calls ultimately go through to a DLL, which is installed in the System
directory. Now, everything works fine on the machine that actually has the
hardware board present, and has the DLL installed. But I also want to run
this code on my laptop, and I'd prefer not to clutter up my system directory
with that hardware-specific DLL. When I run up my Test app, which creates an
instance of the Managed wrapper class (which is in its own assembly) it
collapses with a 'FileNotFound' exception - complaining that my Managed
wrapper assembly (or one of its dependencies) is not present. Presumably the
CLR is trying to load the assembly that contains my managed wrapper, and
falls over because the required DLL (used by the LIB routines I'm calling)
cannot be found. Fair enough - except that the exception is getting thrown
right at the beginning, before I event attempt to create an instance of my
managed wrapper class.
What I'd really like to do is catch this exception somehow, and substitute a
software simulation of the hardware card when the real hardware isn't
present. Any ideas ?