static UnsafeNativeMethods() { // This static contructor was added to make sure we load the proper version of Penimc.dll. // // Details: // P/invoke will use LoadLibrary to load penimc.dll and it will check the current // application directory before checking the system32 directory where this DLL // is installed to. If penimc.dll happens to be in the application directory as well // as the system32 directory we'll actually end up loaded two versions of // penimc.dll. One that we'd use for P/invokes and one that we'd use for COM. // If this happens then our Stylus code will fail since it relies on both P/invoke and COM // calls to talk to penimc.dll and it requires just one instance of this DLL to work. // So to make sure this doesn't happen we want to ensure we load the DLL using the COM // registered path before doing any P/invokes into it. _pimcManager = CreatePimcManager(); }
private static void ReleaseManagerExternalLockImpl(IPimcManager2 manager) { IPimcTablet2 unused = null; manager.GetTablet(ReleaseManagerExt, out unused); }