Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


#ActualZipster

Posted 04 April 2013 - 01:56 PM

You can specify any data you'd like, including just a single integer. However the fourth parameter is supposed to be the size of the data, which you've specified as -1, that when cast to an unsigned integer is actually ~4.2 billion bytes, a bit more than the data you've specified ;) You should use sizeof(int) instead, which is the true size of the data (a single integer).

 

Alternatively, for just a single integer, you could use WritePrivateProfileString instead and encode the integer as a string. Or you could use the registry... there's a number of different options, so you're not locked into using a raw data interface for profile settings.


#3Zipster

Posted 04 April 2013 - 01:53 PM

You can specify any data you'd like, including just a single integer. However the fourth parameter is supposed to be the size of the data, which you've specified as -1, that when cast to an unsigned integer is actually ~4.2 billion bytes, a bit more than the data you've specified ;) You should use sizeof(int) instead, which is the true size of the data (a single integer).


#2Zipster

Posted 04 April 2013 - 01:53 PM

You can specify any data you'd like, including just a single integer. However the fourth parameter is supposed to be the size of the data, which you've specified as -1, that when cast to an unsigned integer is actually ~4.2 billion bytes, a bit more than the data you've specified ;) You should use sizeof(int) instead, which is the true size of the data.


#1Zipster

Posted 04 April 2013 - 01:51 PM

You can specify any data you'd like, including just a single integer. However the fourth parameter is the size of the data, which in this case you've specified -1, which when cast to an unsigned integer, is actually ~4.2 billion. You should use sizeof(int) instead, which is the true size of the data.


PARTNERS