I have a Win32 dll project with the following function prototype:
extern "C" __declspec(dlli mport) BROWSERAPI_API char* Browse(void);
What I want to do is to return a string containing a path to C# using
PInvoke.
The C++ implementation code is something like this:
char path[_MAX_PATH];
// Do something...
return path;
When VS.NET2002 builds the solution, the following warning appears:
warning C4172: returning address of local variable or temporary
What can I do to prevent this warning from appear?
Thank you very much
extern "C" __declspec(dlli mport) BROWSERAPI_API char* Browse(void);
What I want to do is to return a string containing a path to C# using
PInvoke.
The C++ implementation code is something like this:
char path[_MAX_PATH];
// Do something...
return path;
When VS.NET2002 builds the solution, the following warning appears:
warning C4172: returning address of local variable or temporary
What can I do to prevent this warning from appear?
Thank you very much