I'm trying to read and write .ini files from a VB.NET DLL. I've copied my VB6 code (declarations for GetPrivateProfileString, WritePrivateProfileString, etc.) and they don't appear to work. Instead of getting the contents of my ini file I get a 0 and my returned number of bytes is 5324320632995841.

Does anybody have any ideas? Do I need to change my API calls to work under .NET?

Cheers