Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Pascal Delphi Components Misc > Re: Help conver...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 4 Topic 155 of 251
Post > Topic >>

Re: Help convert this C++ to Delphi Measuring size of Memory allocated

by Jamie <jamie_5_not_valid_after_5_Please@[EMAIL PROTECTED] > Nov 4, 2004 at 01:50 PM

that is why there is a function in that C code to
get the size of the buffer, that function is
part of the program that knows how to measure the
field of data.
you must also duplicate that function.
  the SizeOf is simply returning the size of the
Created Object you have, it could be a simple
pointer, Integer, Etc..
  Pointers require's 4 bytes of space to hold the
address value of where the pointer looks too!.
  that is why your getting 4, because your doing a
compile time evaluation of that variable.


qnewpq wrote:

> This is the C++ code
> ====================
> 
> ImageBuff = (uint8*)malloc(ATGetImageBufferSize());
> memset (&sEnrollResults, 0, sizeof(tsAT_ENROLL_RESULTS));
> sEnrollResults.uiStructureSize = sizeof( tsAT_ENROLL_RESULTS);
> 
> Delphi Code
> ==========
> Reallocmem(pImageBuff,ATGetImageBufferSize);
> //e.g ATGetImageBufferSize returns 18090 so pImageBuff is sized to
18090.
> If I send sizeof(pImageBuff) I get 4. I want to measure the size of the
> allocated memory so that I can get 18090. Please assist am stuck!
>
 




 4 Posts in Topic:
Help convert this C++ to Delphi Measuring size of Memory allocat
"qnewpq" <qn  2004-11-04 06:22:21 
Re: Help convert this C++ to Delphi Measuring size of Memory all
Jamie <jamie_5_not_val  2004-11-04 13:50:20 
Re: Help convert this C++ to Delphi Measuring size of Memory all
"qnewpq" <qn  2004-11-05 03:03:27 
Re: Help convert this C++ to Delphi Measuring size of Memory all
Jamie <jamie_5_not_val  2004-11-05 14:34:03 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 26 6:00:24 CDT 2008.