You are probably calling the function correctly, however there the .bas file with the declaration of the initialization function is probably pointing at the wrong dll. Open up the .bas (C:\Program Files\National Instruments\Motion\FlexMotion\Include\FlexMotn.bas) and change declaration for the function flex_initialize_controller to point to "FlexMotion32.dll" instead of "Flex32.dll". If that already points to the correct dll then you might consider going to www.ni.com/ask and create a phone support request so that we could troubleshoot it further.
Regards,
JR A.
Application Engineer
National Instruments