I don't have much use for .NET, but since no on else has responded... I've tried this code non-DLL (~5 minute using VS2010 Express is all I can tolerate
) and it works fine. Have you done so, as well?
I just want to be sure that this issue is only related to the DLL or how it is called (not e.g. a D:\ root permissions/FAT32 issue). That being the case, show us how it is called (and make sure it is called only once). Otherwise, make the files/file references in a folder and see if same result.
Also, couldn't help but notice the 'xlTextMSDOS'... which seems odd. Is that intentional (as opposed to 'xlCSV' or 'xlCSVMSDOS')?
Instead of 2*Pi, Tau should be defined as Pi/2 to respect least utilitarian granularity of the constant. In basics, the single to two-dimensional semi-circular transformation distance required to travel between two points demands this (Pi/2:1). The reader is free to demonstrate the numerous further examples of the utility of this proposed re-definition (including e^(pi/2*i) = i). Tau = Pi/2 was originally proposed by Albert Eagle in 1958, so the more recent proposal as 2*Pi is unfortunate.