S
Sam Carleton
I am writing Managed C++ code to call in to an Unmanaged C API.
The reason for using Managed C++ over C# is that the Unmanaged C
module is loaded via LoadLibrary(). DllImport cannot be used;
functions pointers and GetProcAddress() is being used.
The API function definition looks like this:
int GetString( [out] char* pszOutStr, [in,out] int *nStrLen)
It looks like the prototyping of the function pointer is straight
forward:
typedef int (*FPGetString)( char* pszOutStr, int *nStrLen);
The question is how do I get a char* with a given length to pass
into this function. Mind you this IS an Ansi call, not Unicode!
Sam
The reason for using Managed C++ over C# is that the Unmanaged C
module is loaded via LoadLibrary(). DllImport cannot be used;
functions pointers and GetProcAddress() is being used.
The API function definition looks like this:
int GetString( [out] char* pszOutStr, [in,out] int *nStrLen)
It looks like the prototyping of the function pointer is straight
forward:
typedef int (*FPGetString)( char* pszOutStr, int *nStrLen);
The question is how do I get a char* with a given length to pass
into this function. Mind you this IS an Ansi call, not Unicode!
Sam