Quote:
Originally Posted by Joe Forster/STA
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';