| View previous topic :: View next topic |
| Author |
Message |
iPromise Grandmaster Cheater
Reputation: -1
Joined: 27 Jun 2009 Posts: 529 Location: Canada
|
Posted: Wed Jul 31, 2013 12:04 pm Post subject: Global Variables in Delphi |
|
|
in C++ we simply add variables under the includes if we'd like.
If we added for example this:
| Code: | | BYTE myBytes [] = { 0xC8, 0xC4, 0xCC }; |
when I open my app in hex viewer I can find that signature.
In delphi it seems that when I do this:
| Code: | | myBytes:Array [0..2] of Byte ( $C8, $C4, $CC ); |
(^I know thats probably wrong)
I won't be able to find my array of bytes in hex viewer like I could in C++.
Is delphi like that or must I do something specific to get it visible in memory? |
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25823 Location: The netherlands
|
Posted: Wed Jul 31, 2013 12:26 pm Post subject: |
|
|
Do you use myBytes ? If not, it may have been optimized away (and even then if it's a const array it might get optimized away as well) _________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
iPromise Grandmaster Cheater
Reputation: -1
Joined: 27 Jun 2009 Posts: 529 Location: Canada
|
Posted: Thu Aug 01, 2013 9:30 pm Post subject: |
|
|
so I do myBytes [0] = 0xC8; in a function will it stop it from optimizing?
i'm not familiar with Delphi so I would I make it a unchangeable array? |
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25823 Location: The netherlands
|
Posted: Fri Aug 02, 2013 2:21 am Post subject: |
|
|
You need to create a dynamic array that gets initialized at runtime and used in another function. Else it replaces code that accesses that array element with a const value
Perhaps you can use asm db 0,1,2,3,4.... end _________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
|