LPCTSTR in C#
Posted on 2004-04-09
I am making an application where I am including two projects in one. First is a managed C++ dll creator and the second is a c# test application using the above as a reference.
The problem is that I am using a function which has arguments as LPCTSTR in managed c++ but when I try to pass arguments to this function from c# (which I pass as string) I get an error : cannot convert from 'string' to 'sbyte*'.
In Managed C++
DWORD LoadDriver(LPCTSTR name, LPCTSTR path, LPCTSTR dosName, bool start);
filterDriver.LoadDriver("driver.sys","\\c:\windows\\system32", null, true);