Matlab okFrontPanelDll library error

Hello!
I am using Matlab 2016a, which is 64bit on windows 10. When I try to call function loadlibrary() :
if ~libisloaded('okFrontPanel') loadlibrary('okFrontPanel', 'okFrontPanelDLL64.h', 'notempdir'); end
I get this error:
Error using loadlibrary
There was an error loading the library
“C:\rok\matlab\electronics\okFrontPanel.dll”
C:\rok\matlab\electronics\okFrontPanel.dll is not a valid Win32
application.

Caused by:
Error using loaddefinedlibrary
C:\rok\matlab\electronics\okFrontPanel.dll is not a valid Win32
application.

Error while evaluating UIControl Callback

Does anyone know the answer? I would really appreciate it.

Are you currently using the x64 DLL (found in FrontPanelUSB/API/lib/x64)? If so, have you tried using the Win32 DLL? The error looks like it may just be expecting a different DLL build.