Andrew Tierney wrote: > Hi All, > > Anyone suggest a clean solution to the following ?? > > I would like to wrap WinPCap and LibpCap and at runtime select the right > one to call based on Platform. (Win/Linux) > > Initially I thought about 2 classes, and an interface to define a contract.. > > Then I ran into the problem of DLLImport/static and Interfaces... (oh > and one routine uses a delegate callback for an argument). > > I don't really want to duplicate the wrapper routines for both > platforms. And GetprocAddr/Delegate seems a little messy..
If the libs share the same API, you can map between them using mono's dllmap mechanism. See man mono-config. Robert _______________________________________________ Mono-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-list
