Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[HELP] LPCTSTR to ADDRESS VALUE C++

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
ralphmigcute
Newbie cheater
Reputation: 0

Joined: 10 Jan 2010
Posts: 16

PostPosted: Tue May 29, 2012 8:56 am    Post subject: [HELP] LPCTSTR to ADDRESS VALUE C++ Reply with quote

Hi guys,

i do have this simple code:
Code:

int iSelectedIndex;
TCHAR strSelectedItem[32];
TCHAR buffer[32];
iSelectedIndex = SendMessage(list1hwnd, LB_GETCURSEL, 0, 0);
SendMessage(list1hwnd, LB_GETTEXT,iSelectedIndex,(LPARAM)(LPCTSTR)strSelectedItem);


How can i get the value of strSelectedItem?

Already tried: (DWORD*)strSelectedItem, *(DWORD*)strSelectedItem

thanks Smile

_________________
hello ralph
Back to top
View user's profile Send private message
661089799107
Expert Cheater
Reputation: 3

Joined: 25 Jan 2009
Posts: 186

PostPosted: Tue May 29, 2012 10:11 am    Post subject: Reply with quote

atol(strSelectedItem);
Back to top
View user's profile Send private message
ralphmigcute
Newbie cheater
Reputation: 0

Joined: 10 Jan 2010
Posts: 16

PostPosted: Tue May 29, 2012 10:18 am    Post subject: Error Reply with quote

I tried atol(strSelectedItem);

Error:
error C2664: 'atol' : cannot convert parameter 1 from 'TCHAR [9]' to 'const char *'

_________________
hello ralph
Back to top
View user's profile Send private message
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Tue May 29, 2012 3:49 pm    Post subject: Reply with quote

_tstof
Back to top
View user's profile Send private message
ralphmigcute
Newbie cheater
Reputation: 0

Joined: 10 Jan 2010
Posts: 16

PostPosted: Wed May 30, 2012 1:10 am    Post subject: Slugsnack :( not working Reply with quote

Quote:

_tstof


returning different value Sad[/quote]

_________________
hello ralph
Back to top
View user's profile Send private message
Innovation
Grandmaster Cheater
Reputation: 12

Joined: 14 Aug 2008
Posts: 617

PostPosted: Wed May 30, 2012 5:02 am    Post subject: Reply with quote

Code:
DWORD dwAddress = _tcstoul(strSelectedItem, NULL, 16);
Back to top
View user's profile Send private message
ralphmigcute
Newbie cheater
Reputation: 0

Joined: 10 Jan 2010
Posts: 16

PostPosted: Wed May 30, 2012 9:40 am    Post subject: Innovation thanks :) Reply with quote

thank you so much, Innovation for your help Smile

and thanks to Slugsnack and Blacknight Smile

_________________
hello ralph
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites