![]() |
Shortening the Asc macro (wiki/Asc)
A very short question, really: I want to get the ascii-number of the first character of a string. so I've taken a look at the Asc macro on the wiki. But I'm wondering if it can be made shorter. Can I use
PHP Code:
Edit: After discussion with Anders, I guess the above is indeed not correct. $R1 is made to point at some allocated memory, which is afterwards not freed. Should be: PHP Code:
|
As Anders probably have noted, your first System::Call line allocates a buffer, so without System::Free memory will leak.
To do this without any allocation, you can use: code: |
| All times are GMT. The time now is 18:04. |
Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.