AddDllDirectory() is a very recent addition to the winapi. It is only guaranteed to be available in Windows 8, getting it on earlier Windows versions requires an update, KB2533623. Do keep this is mind when you select your product requirements.
It is unusual in more than one way, it doesn't follow the normal pattern for winapi functions that accept a string. Which makes the function available in two versions, the ANSI version that has an A appended and the Unicode version that has a W appended. AddDllDirectory() has no appended letter, only the Unicode version exists. It isn't clear to me whether that was intentional or an oversight, with high odds for intentional. The function declaration is missing from the Windows 8 SDK headers, very unusual indeed.
So your original declaration failed because you called the Unicode version but the pinvoke marshaller passed an ANSI string. You probably got lucky because the string had an odd number of characters with enough lucky zeros to not cause an AccessViolation.
Using the CharSet property in the [DllImport] declaration is required so the pinvoke marshaller passes a Unicode string.