//full dll path string dllPath = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase) + "\\" + SymbolKeyboardDLL; //load dll System.Reflection.Assembly asm = System.Reflection.Assembly.LoadFrom(dllPath); //get type Type keyPadType = asm.GetType("Symbol.Keyboard.KeyPad, Symbol.Keyboard, 1.6.1.7, Culture=neutral, PublicKeyToken=null" ); //try to create instance (Exception occurs here) Object pad = Activator.CreateInstance(keyPadType);
Symbol.Exceptions.OperationFailureException: RegisterKeyStateNotication failed at v.h() at Symbol.Keyboard.KeyPad..ctor() at System.Reflection.RuntimeConstructorInfo.InternalInvoke() at System.Reflection.RuntimeConstructorInfo.Invoke() at System.Reflection.ConstructorInfo.Invoke() at System.Activator.CreateInstance() at ButtonCheck.Form1..ctor() at ButtonCheck.Program.Main()
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)