When i send:
Result = CInt(NetApiBufferFree(pBuffer))
I receive (SOME TIMES) this error:
Arithmetic operation resulted in an overflow.
What exactly means that? and how i can resolve it?
It means that CInt
argument is out of range of Integer
, -0x80000000 to 0x7FFFFFFF
And it happens when NetApiBufferFree
returns an error: error codes are bigger than 0x80000000.
There is no unsigned int32 type, so use CLng
instead of CInt
.
About source of error. You should find out code of error which you get: call MsgBox or log it to file, or use breakpoint. Next find its description. If it won't help you (for example error would be E_FAIL), add code to check that pBuffer
value is valid - that it wasn't modified by something, and wasn't already freed. Add logging for NetApiBuffer*
calls.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With