Illegal use of UNICODE or LMBCS keyword

In a Declare statement, you included the Unicode or LMBCS keyword with an object reference argument. This is not allowed. For example:

Class MyClass
   ' ...
End Class
Dim X As New MyClass
Declare Function MyFunc Lib "C:\USER.DLL" (X As LMBCS MyClass) As Long 
' Illegal

Instead of passing an object reference, pass a variable of a user-defined data type.