I am facing one problem of System.AccessViolation. I am working on windows application using C# and C++(dll). I have one exported function in dll which returns string to the GUI.
Actually this application works fine on XP(32/64 bit) and also on win7 64 bit and vista 64 bit but it cause an error on 32 bit win7 and 32 bit vista.
To return string to the GUI I have written one exported variable I am allocating the memory for the same and return the same. I have written another exported function which will take care of deallocation of the allocated memory.