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?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It means that
CIntargument is out of range ofInteger, -0x80000000 to 0x7FFFFFFFAnd it happens when
NetApiBufferFreereturns an error: error codes are bigger than 0x80000000.There is no unsigned int32 type, so use
CLnginstead ofCInt.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
pBuffervalue is valid – that it wasn’t modified by something, and wasn’t already freed. Add logging forNetApiBuffer*calls.