calling C/C++ DLL that takes a pointer to LPTSTR
- From: Sam Carleton <scarleton-nospam@xxxxxxxxxxxxxxxx>
- Date: Wed, 15 Jun 2005 15:20:32 GMT
The C definition is along the lines of:
LONG SetFilenames( LONG nFiles, LPCSTR* lpFileNames);
Where the lpFileNames is an array of LPCSTR's.
The ultimate DLL that needs to be called is a 3rd party's module,
but there is a C/C++ DLL which is a wrapper for the 3rd party
module, this wrapper is called directly by C#. There does not
appear that such a method signature can be called direct from C#.
What tactic should be used to get a collection of strings from C#
to the wrapper class? A fellow developer suggested that I define
a struct in C# that simply contains a string. I know that it
would work, but it is messy and I am looking for a more straight
forward, cleaner approach. Any ideas?
Sam
.
- Follow-Ups:
- Re: calling C/C++ DLL that takes a pointer to LPTSTR
- From: Willy Denoyette [MVP]
- Re: calling C/C++ DLL that takes a pointer to LPTSTR
- From: Nicholas Paldino [.NET/C# MVP]
- Re: calling C/C++ DLL that takes a pointer to LPTSTR
- Prev by Date: FTP in ASP.NET C#
- Next by Date: Re: How to get stdout/stderr from unmanaged DLL?
- Previous by thread: FTP in ASP.NET C#
- Next by thread: Re: calling C/C++ DLL that takes a pointer to LPTSTR
- Index(es):
Loading