I have a method I want to import from a DLL and it has a signature of:
BOOL GetDriveLetter(OUT char* DriveLetter)
I've tried
[DllImport("mydll.dll")]
public static extern bool GetDriveLetter(byte[] DriveLetter);
and
[DllImport("mydll.dll")]
public static extern bool GetDriveLetter(StringBuilder DriveLetter);
but neither returned anything in the DriveLetter variable.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…