When you use DllImport to import a function you can specify a CharSet to use. I noticed that in C#, C++ and visual basic the .Net runtime defaults to using Ansi instead of Unicode for this. So for any system call that has an A and a W version the A version will be called by default. .Net uses unicode internally and if I'm not mistaken new versions of windows also translate everything to unicode so this means a lot of extra marshalling overhead.
I have gotten into the habit of always specifying unicode here is this the right way to do things or will this cause problems?