UNICODE and LMBCS strings must be declared BYVAL

In a Declare statement, you included the Unicode or LMBCS keyword with a string argument but did not include the ByVal keyword, which is required for passing string arguments. For example:

Declare Function MyFunc Lib "c:\USER.DLLl" (X As LMBCS String) As Long
' Illegal

Include the ByVal keyword in the Declare statement:
Declare Function MyFunc Lib "c:\USER.DLLl" (ByVal X As LMBCS String) As Long