Questions tagged [object-address]
21 questions
24
votes
4 answers
Address of the pointed element whatever the iterator type/pointer is passed
What would be the most generic syntax for the following function :
template void myFunction(const IteratorType& myIterator)
{
_ptr = &myIterator[0];
}
It take an iterator myIterator (it can be a raw pointer) and the goal is to…

Vincent
- 57,703
- 61
- 205
- 388
21
votes
6 answers
How to get address of a Java Object?
Is there a way to get address of a Java object?
Where the question comes from?:
At First, I read properties file and all the data from file was placed into table. Properties file can update. So, I want to listen that file. I listen an object using…

Iguramu
- 2,080
- 5
- 26
- 30
8
votes
3 answers
Guarantees on address of baseclass in C++?
In C struct's, I'm guaranteed that:
struct Foo { ... };
struct Bar {
Foo foo;
...
}
Bar bar;
assert(&bar == &(bar.foo));
Now, in C++, if I have:
class Foo { ... };
class Bar: public Foo, public Other crap ... {
...
}
Bar bar;
assert(&bar ==…

anon
- 41,035
- 53
- 197
- 293
8
votes
2 answers
Obtaining address locations of an overload method
How do I get all the address locations for functions/procedures/methods that is overloaded?
For example, Dialogs.MessageDlgPosHelp is overloaded having two different versions of it - one without a default button and one with. How would I obtain the…

Nicholas Ring
- 1,016
- 7
- 14
6
votes
1 answer
gnu assembler: get address of label/variable [INTEL SYNTAX]
I have a code like this:
.bss
woof: .long 0
.text
bleh:
...some op codes here.
now I would like to move the address of woof into eax. What's the intel syntax code here for doing that? The same goes with moving bleh's address into, say, ebx.
Your…

jian2587
- 113
- 1
- 1
- 5
4
votes
2 answers
Adding Base Address + Offsets to Modify Value
I'm trying to modify a value for Solitaire such as the score.
Anyways I found the addresses (using CheatEngine) that the pointers point to but I'm having difficult injecting code to modify the score. I'm almost certain it's the way I'm adding the…

caker
- 178
- 2
- 14
3
votes
3 answers
True address of object's method
I know that I can create method pointers, and I know that they are generally different than function pointers. Converting between them is not allowed. Method pointers can contain lots of data about how to adjust this pointer and so on.
I would like…

j_kubik
- 6,062
- 1
- 23
- 42
3
votes
2 answers
Uniform way to get object address or NULL in global function
I'm building a tree-based debug/logging system for C++.
Its "user interface" is a macro which passes user-defined message and call site information (file, line, object address) to special function which then performs logging.
The function uses the…

intelfx
- 2,386
- 1
- 19
- 32
3
votes
2 answers
WINAPI ReadProcessMemory always same address
I read some data from a process (address: 0x58F03C) by using the WINAPI function ReadProcessMemory:
DWORD proc_id;
GetWindowThreadProcessId(hwnd, &proc_id);
HANDLE hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, proc_id);
int value=0;
while…

arminb
- 2,036
- 3
- 24
- 43
2
votes
3 answers
C++ - When function inlining is not possible?
Folks,
I was reading "Thinking in C++" (Chap - Inline functions), where I encountered this statement.
"The compiler also cannot perform inlining if the address of the
function is taken implicitly or explicitly".
What does that mean by "taking…

Saurabh Gokhale
- 53,625
- 36
- 139
- 164
2
votes
1 answer
Get symbol by address (symbolicating binary, iOS build)
I have snapshot of Allocations Instrument with address of interesting symbol:
And I want to know, where this address is in code. I have corresponding dSYM file. I tried to use atosym command-line tool but it gives me wrong symbols (not related to…

brigadir
- 6,874
- 6
- 46
- 81
2
votes
1 answer
How to assign address of a struct to another struct?
Lets say I have
struct someStruct
{
int a;
};
and 2 classes.
In the method in first class I create an instance of the structure:
someStruct structName;
now I want to pass the address of this struct to the constructor of another…

user1566456
- 21
- 2
1
vote
5 answers
jQuery: how to address a sub item with a special class
I want to iterate over the line elements. Each line element has item elements as child elements. So first I iterate over line and then I want to address a certain item element e.g. the third. This is the code I have:
$(".pricetable .righttable…

testing
- 19,681
- 50
- 236
- 417
1
vote
3 answers
Rewrite document.location without loading
I am developing a system which is 100% ajax, except of course, the first request.
I am interested in changing the address in document.location, using javascript.
But I don't want the browser to load the page on that "new" location.
Does anyone know…

Miro
- 108
- 1
- 5
1
vote
1 answer
Select field in Rails simple form gem returns object (hex) address
I am using a has_many through relationship for project_assignment, expence_types and assignment_expences tables.
I my simple form for adding new expences, i have:
<%= f.association :project_assignment, prompt: 'choose...', collection:…

mara
- 39
- 1
- 5