Go Back   FileForums > Game Backup > PC Games > PC Games - CD/DVD Conversions > Conversion Tutorials

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 18-03-2013, 05:56
altef_4's Avatar
altef_4 altef_4 is offline
Registered User
 
Join Date: Mar 2012
Location: Ukraine
Posts: 361
Thanks: 248
Thanked 1,022 Times in 239 Posts
altef_4 is on a distinguished road
@LuisCésar82, to display drive info on unicode version change this to
Reply With Quote
Sponsored Links
  #2  
Old 19-03-2013, 01:32
Joe Forster/STA's Avatar
Joe Forster/STA Joe Forster/STA is offline
Senior forum member
 
Join Date: Nov 2000
Location: Hungary
Posts: 9,837
Thanks: 21
Thanked 342 Times in 224 Posts
Joe Forster/STA is on a distinguished road
Quote:
Originally Posted by altef_4 View Post
to display drive info on unicode version change this to
Isn't there an automatism to select between the ANSI and Unicode versions of functions?! In a C compiler, you simply use GetDriveType - or whatever function, without a suffix in its name - and it gets automatically expanded to ...A in an ANSI and ...W in a Unicode program (in the system headers, according to whether or not the "UNICODE" symbol is defined). I see something like this at the beginning of one of the scripts above (#define A "A"/"W").

I'm actually experimenting at this moment with some dangerous C macro automatism to be able to turn an ANSI program into a Unicode program by just defining "UNICODE".
__________________
Joe Forster/STA
For more information, see the FileForums forum rules and the PC Games forum FAQ!
Don't contact me via E-mail or PM to ask for help with anything other than patches (or software in general) done by me, otherwise your request may be deleted without any reply!
Homepage: http://sta.c64.org, E-mail: [email protected]; for attachments, send compressed (ZIP or RAR) files only, otherwise your E-mail will bounce back!

Last edited by Joe Forster/STA; 19-03-2013 at 01:34.
Reply With Quote
  #3  
Old 19-03-2013, 07:43
altef_4's Avatar
altef_4 altef_4 is offline
Registered User
 
Join Date: Mar 2012
Location: Ukraine
Posts: 361
Thanks: 248
Thanked 1,022 Times in 239 Posts
altef_4 is on a distinguished road
Quote:
Originally Posted by Joe Forster/STA View Post
Isn't there an automatism to select between the ANSI and Unicode versions of functions?! In a C compiler, you simply use GetDriveType - or whatever function, without a suffix in its name - and it gets automatically expanded to ...A in an ANSI and ...W in a Unicode program (in the system headers, according to whether or not the "UNICODE" symbol is defined). I see something like this at the beginning of one of the scripts above (#define A "A"/"W").

I'm actually experimenting at this moment with some dangerous C macro automatism to be able to turn an ANSI program into a Unicode program by just defining "UNICODE".
maybe i don't correctly understood you, but to auto change u/a functions you can use this code
Code:
#ifdef UNICODE
   #define A "W"
#else
   #define A "A"
#endif
[_code]
function GetDriveType(lpDisk: String): Integer; external 'GetDriveType{#A}@kernel32.dll stdcall setuponly';
Reply With Quote
  #4  
Old 19-03-2013, 22:39
Joe Forster/STA's Avatar
Joe Forster/STA Joe Forster/STA is offline
Senior forum member
 
Join Date: Nov 2000
Location: Hungary
Posts: 9,837
Thanks: 21
Thanked 342 Times in 224 Posts
Joe Forster/STA is on a distinguished road
Yup, that's what I'm talking about. People should get used to such automatisms as they help porting (ANSI <-> Unicode, 32-bit <-> 64-bit, Windows <-> Unix) without major headaches!
__________________
Joe Forster/STA
For more information, see the FileForums forum rules and the PC Games forum FAQ!
Don't contact me via E-mail or PM to ask for help with anything other than patches (or software in general) done by me, otherwise your request may be deleted without any reply!
Homepage: http://sta.c64.org, E-mail: [email protected]; for attachments, send compressed (ZIP or RAR) files only, otherwise your E-mail will bounce back!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
INNO TROUBLESHOOT - Tutorials and Answers about INNO Setup REV0 Conversion Tutorials 129 21-05-2021 05:51
INNO TUTORIAL - Using Unicode and ANSI Versions of INNO Setup REV0 Conversion Tutorials 51 26-03-2015 06:57
Frequently Asked Questions Joe Forster/STA PC Games - Frequently Asked Questions 0 29-11-2005 09:48



All times are GMT -7. The time now is 00:34.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
FileForums @ https://fileforums.com