My C# (asp) code is :
int BufferSize = 100*CMIB_TCPEXROW.size_ex+4; IntPtr lpTable = Marshal.AllocHGlobal(BufferSize);
Error Line==> Int32 NumEntries= (int)Marshal.ReadIntPtr(lpTable);
BufferSize = real_buffer_size;
lpTable = Marshal.AllocHGlobal(BufferSize);
when I run my C# code (ASP) it stop with error :
Arithmetic operation resulted in an overflow.
Int32 NumEntries= (int)Marshal.ReadIntPtr(lpTable);
I know what the Error mean, but I do not know how to resolve it! which changes should I make to fix this error? (for example, which parameter should I change?)
Your Help will be Appreciated,
Edited 16-Jan-13 4:45am
This looks like horrible code to run in a web page. What is it doing ? You are doing a cast, what does ReadIntPtr return ? I suggest stuffing your return value in to the right type, without casting. Then you will know for sure if the call itself is failing, or the cast. Are you sure that lpTable has a good value in it ? Have you debugged this ?
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)