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 


String to PWideChar

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
tanjiajun_34
Grandmaster Cheater
Reputation: 0

Joined: 16 Feb 2006
Posts: 786
Location: Singapore

PostPosted: Sun Jul 05, 2009 10:44 am    Post subject: String to PWideChar Reply with quote

How do I do that?
Back to top
View user's profile Send private message
Jani
Grandmaster Cheater
Reputation: 2

Joined: 29 Dec 2006
Posts: 804

PostPosted: Sun Jul 05, 2009 10:58 am    Post subject: Reply with quote

Strings already are pointers to characters, so I guess your problem is converting the string to unicode? See: http://msdn.microsoft.com/en-us/library/bb202786.aspx
Back to top
View user's profile Send private message
kaswar
How do I cheat?
Reputation: 0

Joined: 09 Jun 2008
Posts: 6
Location: Box :D

PostPosted: Sun Jul 05, 2009 12:08 pm    Post subject: Reply with quote

PChar(blar);

Smile

_________________
Me = Very Happy
Back to top
View user's profile Send private message MSN Messenger
tanjiajun_34
Grandmaster Cheater
Reputation: 0

Joined: 16 Feb 2006
Posts: 786
Location: Singapore

PostPosted: Thu Jul 09, 2009 1:24 am    Post subject: Reply with quote

Can Stringtowidechar works?
http://www.delphibasics.co.uk/RTL.asp?Name=StringToWideChar
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

Joined: 09 May 2003
Posts: 25828
Location: The netherlands

PostPosted: Thu Jul 09, 2009 2:06 am    Post subject: Reply with quote

yes, but don't forget to allocate and free the memory buffer for the pwidechar

alternatively, you could do:
Code:

var
  mywidecharstring: widestring;
  pointertomywidecharstring: pwidechar;
...
mywidecharstring:=normalstring;
pointertomywidecharstring:=@mywidecharstring[1];

_________________
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
View user's profile Send private message MSN Messenger
tanjiajun_34
Grandmaster Cheater
Reputation: 0

Joined: 16 Feb 2006
Posts: 786
Location: Singapore

PostPosted: Tue Jul 14, 2009 10:13 am    Post subject: Reply with quote

pointertomywidecharstring:=@mywidecharstring[1];
The 1 is just the length of the string or the length of the string +1?

Edit: solved. Thanks. You roxs.


Last edited by tanjiajun_34 on Tue Jul 14, 2009 10:22 am; edited 1 time in total
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

Joined: 09 May 2003
Posts: 25828
Location: The netherlands

PostPosted: Tue Jul 14, 2009 10:17 am    Post subject: Reply with quote

the 1 means the first character of the string.
_________________
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
View user's profile Send private message MSN Messenger
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