I have a C++ code which reads a file [vtk file - its similar to text file only]. and try to store it in string.
here's the code:
String^ ParallelProjectionRenderer::GetVolumeDataAsString(String^ FileName)
vtkSmartPointer<vtkDataSetWriter> sWriter = vtkSmartPointer<vtkDataSetWriter>::New();
String^ FileName = "D:\\Users\\...";
char * sptName = static_cast<char *>(Marshal::StringToHGlobalAnsi(FileName).ToPointer());
String^ result= File::ReadAllText(FileName); [it breaks here with system.memoryoutofexception when the file size is huge]
this code executes fine when the file size is less than 8mb.
I wanted to know whats the maximum memory allocated to the string.
As a workaround i skipped reading out in C++ code. and i tried to read the file contents in asp.net C# code and store it on string.
View Complete Post