IOWKIT.DLL and Excel

This is the English forum for all topics related to IO-Warrior. Please post in English only

Moderator: Guido Körber

Post Reply
jpf
Posts: 1
Joined: Wed Oct 01, 2008 6:22 pm

IOWKIT.DLL and Excel

Post by jpf »

Is there anybody able to call IOWKIT.DLL functions from Excel?

In my case i have tried 2 things without succes:

1-Using register.ID() and call() functions from the worksheet:
My results:
Register.ID() seems to work since it return a number for an existing function in IOWkit.DLL. It returns #VALUE! For a non-existing function of IOWKIT.DLL

Call() doesn’t seems to work because it return FALSE all the time.

Example:
Cell A5=Register.id(“C:\WINNT\system32\iowkit.dll”,” IowKitVersion”,”C”) = -698810367
Cell A6=Register.id(“C:\WINNT\system32\iowkit.dll”,”Nothing”,”C”) = #VALUE!

CALL(A5)=FALSE


2-From VBA
When trying to add iowkit.dll as a reference in a VBA Project I have the message “Can’t add a reference to the specified file”.
(Tools/Reference/Browse in VBA)

Thank you for your help
JPF
Christof
Posts: 3
Joined: Fri Aug 03, 2012 1:19 pm

Re: IOWKIT.DLL and Excel

Post by Christof »

Put the iowkit.dll in the system32 directory and it should all work. See this thread:
viewtopic.php?f=1&t=1694

I am a bit surprised that there isn't more info on using the iowkit within VBA.....
(four years and no response?)
User avatar
Christoph Jung
Posts: 670
Joined: Sun Oct 08, 2006 3:43 pm
Location: Germany / Berlin
Contact:

Re: IOWKIT.DLL and Excel

Post by Christoph Jung »

The price for Office is pretty much and the VBA compontent of OpenOffice or LibreOffice is not stable with the IO-Warrior.
The second reason is, that Visual Studio Express is for free and C# is a easy to learn programming language.

I will include some VBA example in the SDK.
Abteilung: Softwareentwicklung
Folge uns auf Twitter
Follow us on twitter
Guido Körber
Site Admin
Posts: 2856
Joined: Tue Nov 25, 2003 10:25 pm
Location: Germany/Berlin
Contact:

Re: IOWKIT.DLL and Excel

Post by Guido Körber »

VBA is not exactly the best environment to program for the IO-Warrior or any hardware. Also there are a lot of programming environements and we can not provide support for all of them.
jmmelkon
Posts: 9
Joined: Tue Nov 30, 2021 5:33 pm

Re: IOWKIT.DLL and Excel

Post by jmmelkon »

For those who would still read this topic:

the dll can be put anywhere, provided that you give Excel the explicit path to the DLL each tile you declare a C function:

Public Declare Function IowKitOpenDevice Lib "C:\Users\Administrateur\Desktop\sensirion\iowkit.dll" () As Long

Generally speaking, if you have administrator rights, DLLs should be put in "C:\Windows\System32" for 32-bit Windows, and "C:\Windows\SysWOW64" for 64-bit Windows.
Caution: if you install both the 32-bit dll and the 64-bit dll, you will have a conflict.

==> go to for a working example: viewtopic.php?t=1694
Post Reply