09-20-2010 08:36 AM
Hi,
I have a .dll that requires the path of a file to be passed to it. This path should be of type "TCHAR*". Does anyone have any idea how I should go about this? Everything I try, I get a "Failed to open File"
Cheers, Alec
09-20-2010 09:02 AM
It has to be a TCHAR - a regular old ANSI character string isn't good enough? Have you tried the Format to String VI? I attached it an example.
Andrew
09-20-2010 09:12 AM
No. I get a "File Open Error" no matter what I try:
I have tried sending it a string;
A path and selected "adapt to type";
I tried sending it a cluster of char (strings). and nothing seems to work
09-20-2010 09:18 AM
The * symbol might indicate that it is a C / C++ DLL that is expecting a pointer. If this is the case you'd need to pass a pointer to the string rather than the string itself. That pretty much sums up my knowledge of C so I can't make any more suggestions.
If this is the case, there are a few related threads that can be found by searcing 'pointer to string'
Good luck,
Ian
09-20-2010 10:02 AM
@alecjcook wrote:
Hi,
Everything I try, I get a "Failed to open File"
Cheers, Alec
What exactly have you tried? What does your string look like? Are you remembering to use double backslashes for directory separators? In other words, for a path of C:\temp your string should be "C:\\temp".
09-21-2010 07:26 AM
You should find out what TCHAR* actually is in the C/C++ code. It could be multibyte or unicode. Find its definition and you will probably find the solution to your problem.