I recall this code from the NI forums.
https://decibel.ni.com/content/docs/DOC-19720
I downloaded the example and noticed that the DLL call includes the path to the file user32.dll
Check the locations of the shared library in your VI. It may incorrectly include the path...
From the NI help: ( http://zone.ni.com/reference/en-XX/help/371361J-01/lvexcodeconcepts/locations_for_shared_libraries/ )
To specify the location of a shared library, you can enter the name or path in the Library name or path text box of the Call Library Function dialog box. You can also wire the name or path to the path in input of the Call Library Function Node.
Caution Do not specify the location of a system shared library, such as kernel32.dll, by path. Because LabVIEW automatically includes by-path shared libraries in build specifications, you might distribute a system shared library to another computer inadvertently. Redistributing some shared libraries, such as kernel32.dll, might cause the target computer to crash. Therefore, always specify system shared libraries by name.