Hallo zusammen,
ich möchte darauf hinweisen, das man mit Office-Produkten auch ohne große
Spezialkenntnisse am USB Port Schalten und messen kann:
http://www.visiongrid.de/keymandongle.html
Indem einfach die DLL vom KeyMan im Excel angewendet wird.
Das verweigern zum öffnen von Dokumenten kann so auch erreicht werden.
(OnWorkSheetOpen)
Option Explicit
'open the DongleDLL you can copy them to c:\System32 this grand's the system find them DongleDLL always.
Private Declare Function Request Lib "y:\Common\Binary\AvrOpenD.dll" Alias "_Request@16" (ByVal command As Long, ByVal Value As Double, ByVal flag As Long) As Long
'Set Port PB1 (LED) on Dongle. Return status
Public Function DngSet(Port As Integer) As Long
DngSet = Request(Asc("B"), 1, Port)
End Function
'Get Port PB5 (RES) on Dongle. Return status
Public Function DngGet() As Long
DngGet = Request(Asc("C"), 3, 0)
End Function
'Try to open Dongle 0-3. Return status
Public Function DngOpen(Port As Long) As Long
DngOpen = Request(Asc("I"), Port, 0)
End Function
'Try to close active Dongle. Return status
Public Function DngClose() As Long
DngClose = Request(0, 0, 0)
End Function
'Set analog output PB0 0-255 => 0-5V. Return status
Public Function DngAnlOut(Val As Long) As Long
DngAnlOut = Request(Asc("G"), 0, Val)
End Function
'Get analog input PB2 0-5V. Return 0-255
Public Function DngAnlIn() As Long
DngAnlIn = Request(Asc("A"), 0, 0)
End Function
'Test is Dongle connected. Return status
Public Function DngIsCon() As Long
DngIsCon = Request(Asc("E"), 0, 0)
End Function
'When Dongle is not blocked, user can store an alternate USB-PID 0-3.(usefull to configure more as one Dongle). Return status
Public Function DngSetUsbPid(Pid As Long) As Long
DngSetUsbPid = Request(Asc("H"), Pid, 0)
End Function
'When Dongle is not blocked, user can store a 32Bit Uservalue under Index(1-31). (It is later used to generate the given Multipiler for autentification). Return status
Public Function DngSetUsrKey(Key As Long, Index As Long) As Long
DngSetUsrKey = Request(Asc("D"), Key, Index)
End Function
'When Dongle is not blocked, user can retrive a 32Bit Uservalue from Index(1-31). (It is later used to generate the given Multipiler for autentification). Return status
Public Function DngGetUsrKey(Index As Long) As Long
DngGetUsrKey = Request(Asc("Z"), Index, 0)
End Function
'After Uservalue is stored an given 64Bit value based on Userval*Randomnumber with the index of stored Userval(1-31) give back the randomnumber to autenticate your software. Return 32Bit Multiplicator
Public Function DngGetMul(Value As Double, Index As Long) As Long
DngGetMul = Request(Asc("Z") + 1, Value, Index)
End Function
'Get the datatransfer Volumen from last call in Bytes. This Dongle can transfer 2Kb/s max. Return amount of bytecounter from last call
Public Function DngGetVol() As Long
DngGetVol = Request(Asc("F"), 0, 0)
End Function
Interessante Option bezüglich automatischer Bildprobenbewertung.
http://www.visiongrid.de/patcontrol.html
Gruß
K. aus Berlin