Click here to Skip to main content
15,887,135 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Need help from freelancer turning a Firefox add-on into an IE extension Pin
«_Superman_»22-Apr-10 11:22
professional«_Superman_»22-Apr-10 11:22 
GeneralRe: Need help from freelancer turning a Firefox add-on into an IE extension Pin
Stephen Hewitt22-Apr-10 13:48
Stephen Hewitt22-Apr-10 13:48 
GeneralRe: Need help from freelancer turning a Firefox add-on into an IE extension Pin
«_Superman_»22-Apr-10 18:15
professional«_Superman_»22-Apr-10 18:15 
GeneralRe: Need help from freelancer turning a Firefox add-on into an IE extension Pin
Stephen Hewitt22-Apr-10 20:53
Stephen Hewitt22-Apr-10 20:53 
QuestionCalling COM from C [modified] Pin
Fayu22-Apr-10 10:19
Fayu22-Apr-10 10:19 
AnswerRe: Calling COM from C Pin
Gwenio22-Apr-10 10:50
Gwenio22-Apr-10 10:50 
AnswerRe: Calling COM from C Pin
Richard MacCutchan22-Apr-10 11:09
mveRichard MacCutchan22-Apr-10 11:09 
QuestionGetting absolute address of variable in memory Pin
chapultec22-Apr-10 10:10
chapultec22-Apr-10 10:10 
Hello,

I´ve tried running at the same time two instances of the program below.
I pass the running time in seconds as a command-line parameter.
I pass different values to the two instances, 7 for one and 9 for the other.

int iTest=0;
int _tmain(int argc, _TCHAR* argv[])
{
printf("iTest: %d \n", iTest); // prints 0
printf("&iTest: %p \n", &iTest);
// This prints "00417178" for both instances !!
iTest = atoi((char *) argv[1]);
printf("iTest: %d \n", iTest);
Sleep(iTest * 1000);
printf("iTest: %d \n", iTest);
// Though the pointer &iTest is the same, each instance
// prints its own value !!
Sleep(5000);
return 0;
}

Two questions:
1) Why the pointer is the same but the values are different ?
I imagine that this value refers to a relative location, is this the point ?

2) In this case, I need to know: is it possible to get the absolute address of the variable in RAM ?
My need is to assure we are not having problems using the same spaces in memory in some variables we are creating.

Thanks,
Emerson - from S.Paulo, Brazil
AnswerRe: Getting absolute address of variable in memory Pin
Gwenio22-Apr-10 11:01
Gwenio22-Apr-10 11:01 
GeneralRe: Getting absolute address of variable in memory Pin
chapultec22-Apr-10 14:23
chapultec22-Apr-10 14:23 
GeneralRe: Getting absolute address of variable in memory Pin
CPallini22-Apr-10 21:57
mveCPallini22-Apr-10 21:57 
AnswerRe: Getting absolute address of variable in memory Pin
Stephen Hewitt22-Apr-10 13:58
Stephen Hewitt22-Apr-10 13:58 
GeneralRe: Getting absolute address of variable in memory Pin
chapultec22-Apr-10 14:33
chapultec22-Apr-10 14:33 
AnswerRe: Getting absolute address of variable in memory Pin
Luc Pattyn22-Apr-10 14:28
sitebuilderLuc Pattyn22-Apr-10 14:28 
AnswerRe: Getting absolute address of variable in memory Pin
Michel Godfroid23-Apr-10 1:34
Michel Godfroid23-Apr-10 1:34 
GeneralI'm looking for a partner to help each other Pin
fyl22222-Apr-10 6:57
fyl22222-Apr-10 6:57 
GeneralRe: I'm looking for a partner to help each other Pin
loyal ginger22-Apr-10 7:43
loyal ginger22-Apr-10 7:43 
QuestionCreate Handle on Remote Disk or Volume Pin
GaryT8022-Apr-10 5:57
GaryT8022-Apr-10 5:57 
AnswerRe: Create Handle on Remote Disk or Volume Pin
Michel Godfroid22-Apr-10 7:34
Michel Godfroid22-Apr-10 7:34 
QuestionMigrating code from VS6 to vs 2008 Reloaded Pin
Jim Crafton22-Apr-10 5:18
Jim Crafton22-Apr-10 5:18 
AnswerRe: Migrating code from VS6 to vs 2008 Reloaded Pin
Joe Woodbury22-Apr-10 8:23
professionalJoe Woodbury22-Apr-10 8:23 
GeneralRe: Migrating code from VS6 to vs 2008 Reloaded Pin
Jim Crafton22-Apr-10 8:24
Jim Crafton22-Apr-10 8:24 
GeneralRe: Migrating code from VS6 to vs 2008 Reloaded Pin
Maximilien22-Apr-10 10:14
Maximilien22-Apr-10 10:14 
GeneralRe: Migrating code from VS6 to vs 2008 Reloaded Pin
Jim Crafton22-Apr-10 10:17
Jim Crafton22-Apr-10 10:17 
QuestionClass View - "Add" menu item is missing for some classes. Pin
Mike Doner22-Apr-10 4:54
Mike Doner22-Apr-10 4:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.