vb.net - Aardvark I2C API with VB causing exception -
i have aardvard i2c/spi dongle (http://www.totalphase.com/products/aardvark-i2cspi/) works great supplied gui. wanted integrate tool own test gui. using ms visual studio express 2013. provide api package vb.net (http://www.totalphase.com/downloads/) contained in aardvark_net.dll. when run example, following error during runtime:
an unhandled exception of type 'system.typeinitializationexception' occurred in windowsapplication1.exe additional information: type initializer 'totalphase.aardvarkapi' threw exception.
it breaks when code tries call aardvarkapi.aa_find_devices() routine.
i created own project, added thr aardvark_net.dll project references, , following code:
imports totalphase public class form1 private sub form1_load(sender object, e eventargs) handles mybase.load msgbox("detecting aardvark adapters...") dim num long dim devices(15) ushort ' find attached devices try num = aardvarkapi.aa_find_devices(16, devices) catch ex exception msgbox(ex.message) end try end sub end class
same thing, program throws , exceptions @ aardvarkapi.aa_find_devices() , exception message is:
the type initializer 'totalphase.aardvarkapi' threw exception.
i tried going exception settings , unchecking thrown bixes, no change.
i savvy enough created in vb (i not apt @ connectedon other end of aardvark dongle!), use this.
thank you, ~brett
found problem! using api website, have device drivers disk. dated device drivers , went away. (curiously though, example solution still throws exceptions, project not... using same dlls)
Comments
Post a Comment