Looks like the Alias you passed into the Initialize API was not matching with the actual Alias available on the system.
Verify the Alias passed in and the alias configured in NI MAX
Moreover, attaching the actual files will be helpful for us to guide you better than debugging the whole stuff in our dream land!