Morthawt Posted December 5, 2012 Posted December 5, 2012 (edited) Here is the link: http://www.yubico.com/develop/open-source-software/low-level-library/ At the bottom right there are download links for the PDF, x86 and x64 API DLL. User guide (pdf) Binary installer for 32-bit / x86 (Digitally signed) Binary installer for 64-bit / x64 (Digitally signed) I know basically nothing about COM so I am doing what I always do and just messing with it to see if something clicks and goes from "impossible" to "Hmm I think I get it.." I have attempted to do this so far:$hYubikey = ObjGet('C:\Program Files\Yubico\Yubikey Client API\Bin\x64\YubiClientAPI.dll') ;~ $hYubikey = ObjGet('C:\Program Files (x86)\Yubico\Yubikey Client API\Bin\x86\YubiClientAPI.dll') $test = $hYubikey.readSerial('ycCALL_MODE_BLOCKING') So far it complains: H:\Autoit projects\ewre5thy6jk.au3 (3) : ==> Variable must be of type "Object".: Here is what the PDF says as an example (I think it is a c# example) 4.5 Serial number read The non-alterable device serial number can be read (unless disabled in the device configuration) via an API call. The call completes in around 50 ms, so generally an asynchronous call is typically not needed. Synopsis Property readSerial(ycCALL_MODE mode) As ycRETCODE rc The basic principle (using blocking calls) is returnCode = readSerial(ycCALL_MODE_BLOCKING) if returnCode = ycRETCODE_OK Then dataEncoding = ycENCODING_UINT32 print dataBuffer -- Response is here as 32-bits integer Else print “An ycRETCODE_xx error occurred” EndIf What do you think I need to do to perform a check like this using the provided DLL ? I am basically an idiot when it comes to COM and this is my first introduction to it. As I understand it a COM / DLL is almost like a chunk of functions that can be called over and over by various means. Could be wrong because I have not really looked indepth into it. I would just like a bit of help understanding the basics of what is involved in getting communication going with the API. Edited December 5, 2012 by Morthawt Free and easy Autoit scripting video tutorials (plus more videos always coming!) General video tutorials, especially correct and safe TeamSpeak permissions tutorials.
water Posted December 5, 2012 Posted December 5, 2012 What you need is a COM error handler. This will give you detailed information why your script failed. See the help file for ObjEvent. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now