WINAMP.COM | Forums : Powered by vBulletin version 2.3.9 WINAMP.COM | Forums > Developer Center > NSIS Discussion > Unicode
Pages (9): « First ... « 7 8 [9]   Last Thread   Next Thread
Author
Thread Post New Thread    Post A Reply
Anders
Major Dude

Registered: Jun 2002
From: N/A

@Wizou: If you check my BgWorker plugin, you can see that I'm checking for kernel32::lstrcatW in the import table.

I also have some sample code in there that checks $pluginsdir, but like you said, you don't know the offset, so it has to use IsBadReadPtr() and there could be false positives.

Unfortunately, it turns out that writing hybrid plugins is a huge pain in the ass, and I can't recommend doing it on anything except very simple plugins

__________________
IntOp $PostCount $PostCount + 1

Quick Link | Report this post to a moderator | IP: Logged

Anders is offline Old Post 11-06-2009 01:02 PM
Click Here to See the Profile for Anders Click here to Send Anders a Private Message Visit Anders's homepage! Find more posts by Anders Add Anders to your buddy list Edit/Delete Message Reply w/Quote
jimpark
Senior Member

Registered: Sep 2007
From:

For the next release, I plan on adding to pluginapi.h:

// True if NSIS is built with Unicode support.
bool NSISCALL IsUnicodeNSIS();

Also, Olivier noted that you could use IsWindowUnicode(hwnd). But this may not work on silent installers.

However, I would still encourage that the plugin writers use TCHARs or a strategy similar to it and compile and link with the right Unicode declarations and definitions. I know there is a temptation to try to generate a single binary that could work on both the ANSI and the Unicode NSIS variants but that seems a bit dangerous to me.

__________________
Unicode NSIS advocate -- http://www.scratchpaper.com for latest build and source.

Quick Link | Report this post to a moderator | IP: Logged

jimpark is offline Old Post 11-06-2009 02:50 PM
Click Here to See the Profile for jimpark Click here to Send jimpark a Private Message Visit jimpark's homepage! Find more posts by jimpark Add jimpark to your buddy list Edit/Delete Message Reply w/Quote
Wizou
Senior Member

Registered: Aug 2007
From: Paris, France

@Anders: IsBadReadPtr won't help you here as it will be valid memory range (.bss variables area), just you're not checking a valid Unicode 2nd byte.
Checking 'lstrcatW' import from main module is however a good idea

@jim park: I still wonder how you would create such a IsUnicodeNSIS, unless you pass special exec_flags_t value from NSIS to the DLL


If we have such a way for the DLL to detect the version of NSIS, I'm thinking about creating a new pluginapi.h/pluginapi.lib that could transparently convert variables and stack from ANSI or Unicode to the plugins choice depending on whether it is called from Unicode-NSIS or not
This would make plugins creator's life easier.

__________________
My NSIS plug-ins: http://wizou.fr

Quick Link | Report this post to a moderator | IP: Logged

Wizou is offline Old Post 11-06-2009 02:57 PM
Click Here to See the Profile for Wizou Click here to Send Wizou a Private Message Visit Wizou's homepage! Find more posts by Wizou Add Wizou to your buddy list Edit/Delete Message Reply w/Quote
dariann
Junior Member

Registered: Mar 2009
From:

@jimpark: What about turning on/off "messages about including files" ? NSIS Unicode is great tool and I ask You to add this option, please.

Quick Link | Report this post to a moderator | IP: Logged

dariann is offline Old Post 11-06-2009 02:58 PM
Click Here to See the Profile for dariann Click here to Send dariann a Private Message Find more posts by dariann Add dariann to your buddy list Edit/Delete Message Reply w/Quote
Anders
Major Dude

Registered: Jun 2002
From: N/A

Noooooooooo, we don't need a IsUnicodeNSIS() function or any kind of pluginapi helpers to do both.

It has already been done with the unicode layer for win9x, just use that.

I'm with Jim on this, plugin devs should use TCHAR and compile two versions. There is also my CallAnsiPlugin plugin for older stuff with no source.

@Wizou: well, I'm sure it can be done without checking the import table. The IsBadReadPtr usage was just a big hack and I never finished that type of detection.

__________________
IntOp $PostCount $PostCount + 1

Quick Link | Report this post to a moderator | IP: Logged

Anders is offline Old Post 11-06-2009 04:01 PM
Click Here to See the Profile for Anders Click here to Send Anders a Private Message Visit Anders's homepage! Find more posts by Anders Add Anders to your buddy list Edit/Delete Message Reply w/Quote
jimpark
Senior Member

Registered: Sep 2007
From:

@Wizou: That's a good point. It's very difficult to write an IsUnicodeNSIS(). The only thing I could do is try validating the string (if anything) to see if it's good UTF16LE. Look in validateunicode.cpp which is in Source. You'll see a class there that can validate UTF16LE/BE as well as UTF8.

@Anders: I agree with you in that this API, even if accurate, is a bad idea. I'm pulling IsUnicodeNSIS() from pluginapi.h. It will NOT be in the next release.

__________________
Unicode NSIS advocate -- http://www.scratchpaper.com for latest build and source.

Quick Link | Report this post to a moderator | IP: Logged

jimpark is offline Old Post 11-06-2009 09:25 PM
Click Here to See the Profile for jimpark Click here to Send jimpark a Private Message Visit jimpark's homepage! Find more posts by jimpark Add jimpark to your buddy list Edit/Delete Message Reply w/Quote
ChocJunkie
Member

Registered: Oct 2009
From: Germany

Does someone know why I'm always getting empty unicode files when I'm using:

code:
unicode::FileUnicode2Ansi "${_HDDS_countFile}" "${_HDDS_countFile}_tmp" AUTO Pop $R0 ${If} "$R0" != 0 # error handling ${EndIf}

The source files type is "UTF-16LE|UCS-2LE".

-- Problem solved ---

I was using Unicode plugin v1.1.
I've tried version 1.0 and everything is fine now.

Last edited by ChocJunkie on 11-10-2009 at 03:10 PM

Quick Link | Report this post to a moderator | IP: Logged

ChocJunkie is offline Old Post 11-10-2009 02:50 PM
Click Here to See the Profile for ChocJunkie Click here to Send ChocJunkie a Private Message Find more posts by ChocJunkie Add ChocJunkie to your buddy list Edit/Delete Message Reply w/Quote
Anders
Major Dude

Registered: Jun 2002
From: N/A

If we are going to have any chance of a merge, the examples and header files need to be 100% the same, meaning that both the current A and U builds need some changes:

*The ansi version needs to change its handling of &wXX so that XX is a count of characters and not bytes (and update the docs) (The unicode version already has this fixed)

*The unicode system plugin needs to default to the W version of functions when autodetecting (foo >> fooW and not fooA)


To reduce the NSIS_MAX_STRLEN confusion, we should probably make it really clear in the docs that NSIS_MAX_STRLEN is a count of TCHAR's (Or maybe even rename it). We should also add a predefine for the count of bytes, I suggest we name it NSIS_MAX_STRCB

Both versions currently fail this little test script

__________________
IntOp $PostCount $PostCount + 1

Quick Link | Report this post to a moderator | IP: Logged

Anders is offline Old Post 11-15-2009 11:39 PM
Click Here to See the Profile for Anders Click here to Send Anders a Private Message Visit Anders's homepage! Find more posts by Anders Add Anders to your buddy list Edit/Delete Message Reply w/Quote
jimpark
Senior Member

Registered: Sep 2007
From:

quote:
Originally posted by Anders
*The unicode system plugin needs to default to the W version of functions when autodetecting (foo >> fooW and not fooA)



We actually do default to the "W" version. Let me explain a little with how the "T" versions of the functions work for those who don't know.

We write in our code:

code:
::CreateFile(...);


When you look at the definition of CreateFile, you see that there really is no function called "CreateFile" but two functions called "CreateFileW" and "CreateFileA." This is true for MOST of the functions that have both the A and the W versions.

code:
#ifdef UNICODE #define CreateFile CreateFileW #else #define CreateFile CreateFileA #endif // !UNICODE


There are functions which only have one name, with no W or A prefixes.

So the logic that is in the system plugin currently is to try to load the function with the name as is, then failing that, try to add "W" for the Unicode build (or "A" for the ANSI build) and try again.

Unfortunately, for older string functions like lstrlen, the lib you are trying to load DOES have a lstrlen which is ANSI only. It's probably there for backward compatibility since it mimics standard library string functions. So for lstrlen, you need to specify kernel::lstrlenW. But as far as I've seen, it's only these string functions that look and behave like the standard library ones that have this problem.

A possible change could be that we always suffix with a "W" or "A" and see if that loads something and try that function first before we try the name of the function unmodified, but I'm uncomfortable with that since I'd rather give the programmer the benefit of the doubt and let him/her decide what s/he really wants to load.

I don't mind the plugin second guessing after failures but I don't want it to think it's smarter than the programmer.

quote:

To reduce the NSIS_MAX_STRLEN confusion, we should probably make it really clear in the docs that NSIS_MAX_STRLEN is a count of TCHAR's (Or maybe even rename it). We should also add a predefine for the count of bytes, I suggest we name it NSIS_MAX_STRCB

Both versions currently fail this little test script [/B]


I agree that we should note that NSIS_MAX_STRLEN is in TCHARS. But going through the documentation, they all state that NSIS_MAX_STRLEN means a number of characters, not bytes. So I'm actually okay with the documentation as-is.

As for adding NSIS_MAX_STRCB, I think that's a great idea, although, it can easily be calculated by NSIS_MAX_STRLEN * NSIS_CHAR_SIZE. I like NSIS_MAX_STR_BYTES better as a name, though.

Unless the NSIS trunk has NSIS_MAX_STR_BYTES, it would be useless for me to add it just to the Unicode version as it's meant for portability across the two versions.

So perhaps we can request NSIS_MAX_STR_BYTES to be added to the NSIS trunk?

__________________
Unicode NSIS advocate -- http://www.scratchpaper.com for latest build and source.

Quick Link | Report this post to a moderator | IP: Logged

jimpark is offline Old Post 11-16-2009 02:54 PM
Click Here to See the Profile for jimpark Click here to Send jimpark a Private Message Visit jimpark's homepage! Find more posts by jimpark Add jimpark to your buddy list Edit/Delete Message Reply w/Quote
Wizou
Senior Member

Registered: Aug 2007
From: Paris, France

For your information, I'm starting to merge Unicode port of NSIS version into NSIS repository.

I will try to take the most of what has been discussed here into account.
However my plan is first to make it the most transparent possible for the user and the plug-ins developer.

__________________
My NSIS plug-ins: http://wizou.fr

Quick Link | Report this post to a moderator | IP: Logged

Wizou is offline Old Post 11-16-2009 03:24 PM
Click Here to See the Profile for Wizou Click here to Send Wizou a Private Message Visit Wizou's homepage! Find more posts by Wizou Add Wizou to your buddy list Edit/Delete Message Reply w/Quote
jimpark
Senior Member

Registered: Sep 2007
From:

That's excellent news! Is there an ETA on when this will be complete?

__________________
Unicode NSIS advocate -- http://www.scratchpaper.com for latest build and source.

Quick Link | Report this post to a moderator | IP: Logged

jimpark is offline Old Post 11-16-2009 03:34 PM
Click Here to See the Profile for jimpark Click here to Send jimpark a Private Message Visit jimpark's homepage! Find more posts by jimpark Add jimpark to your buddy list Edit/Delete Message Reply w/Quote
Wizou
Senior Member

Registered: Aug 2007
From: Paris, France

No ETA yet.. I just started the SVN branch I will work on..
I guess the first merge/port will be easy especially as your work will greatly simplify the effort.
But then there will be a phase of discussion/arbitration/tweaking/testing as to what should be the user & developer experience regarding this new version.
I will keep you updated on my progress.

__________________
My NSIS plug-ins: http://wizou.fr

Quick Link | Report this post to a moderator | IP: Logged

Wizou is offline Old Post 11-16-2009 03:42 PM
Click Here to See the Profile for Wizou Click here to Send Wizou a Private Message Visit Wizou's homepage! Find more posts by Wizou Add Wizou to your buddy list Edit/Delete Message Reply w/Quote
Anders
Major Dude

Registered: Jun 2002
From: N/A

well, if we don't look for "functionW" before "function", we are going to need some kind of define that is "A" or "W" and maybe a list of API's where it is required. IMHO that is the wrong approach, and the reverse is needed, they need to look for the char type specific version first unless a (new) option is provided in the system call

__________________
IntOp $PostCount $PostCount + 1

Quick Link | Report this post to a moderator | IP: Logged

Anders is offline Old Post 11-16-2009 07:38 PM
Click Here to See the Profile for Anders Click here to Send Anders a Private Message Visit Anders's homepage! Find more posts by Anders Add Anders to your buddy list Edit/Delete Message Reply w/Quote
Wizou
Senior Member

Registered: Aug 2007
From: Paris, France

my opinion is to check whether the parameter type contains a "t", then we know we are facing an API which has two variant..
and only in this case, we start checking for 'functionW' or 'functionA' variant first.. if entrypoint is not found, then we check for 'function'

__________________
My NSIS plug-ins: http://wizou.fr

Last edited by Wizou on 11-17-2009 at 10:16 AM

Quick Link | Report this post to a moderator | IP: Logged

Wizou is offline Old Post 11-17-2009 08:31 AM
Click Here to See the Profile for Wizou Click here to Send Wizou a Private Message Visit Wizou's homepage! Find more posts by Wizou Add Wizou to your buddy list Edit/Delete Message Reply w/Quote
jimpark
Senior Member

Registered: Sep 2007
From:

@Wizou: the problem with that check is that if the user calls CreateFile() with 'w' in the Unicode version of NSIS, that's not wrong either. CreateFile should still resolve to CreateFileW.

Like I said, the only problems I've seen are the string functions that mimic standard library calls. There aren't that many and they are all lowercased like C standard library functions. If the person has programmed C at all, functions like strlen should jump out as taking char* and not wchar_t*. So it should raise a warning flag and the user should realize he should put a W at the end.

__________________
Unicode NSIS advocate -- http://www.scratchpaper.com for latest build and source.

Quick Link | Report this post to a moderator | IP: Logged

jimpark is offline Old Post 11-17-2009 01:41 PM
Click Here to See the Profile for jimpark Click here to Send jimpark a Private Message Visit jimpark's homepage! Find more posts by jimpark Add jimpark to your buddy list Edit/Delete Message Reply w/Quote
Anders
Major Dude

Registered: Jun 2002
From: N/A

Windows programmers don't think about that, I'm so used to just calling lstr*, I don't think about the char type. Whats wrong by defaulting to the W versions and only falling back if W does not exists or a option to disable it was set?

Do you have a single example of a function that needs to be called without W when running as unicode (meaning foo should be called with WCHAR* even if fooW exists)?

__________________
IntOp $PostCount $PostCount + 1

Quick Link | Report this post to a moderator | IP: Logged

Anders is offline Old Post 11-17-2009 02:10 PM
Click Here to See the Profile for Anders Click here to Send Anders a Private Message Visit Anders's homepage! Find more posts by Anders Add Anders to your buddy list Edit/Delete Message Reply w/Quote
Wizou
Senior Member

Registered: Aug 2007
From: Paris, France

quote:
Originally posted by jimpark
@Wizou: the problem with that check is that if the user calls CreateFile() with 'w' in the Unicode version of NSIS, that's not wrong either. CreateFile should still resolve to CreateFileW.

I don't agree with you. This is wrong.
If the user explicitely wants to call the Unicode version using 'w' as parameter type, he has to specify CreateFileW as the function name.

Summary:
* the user wants to call explicitely CreateFileA => he uses function name CreateFileA and parameter type 'm'
* the user wants to call explicitely CreateFileW => he uses function name CreateFileW and parameter type 'w'
* the user wants to call CreateFile whatever suits best according to NSIS variant => he uses function name CreateFile and parameter type 't'
* outside the presence of parameter type t, we can't suppose the existence of a A/W suffix, and it seems to me it would be wrong to try to add one (it would risk to reach another API which is unrelated)

__________________
My NSIS plug-ins: http://wizou.fr

Last edited by Wizou on 11-17-2009 at 03:17 PM

Quick Link | Report this post to a moderator | IP: Logged

Wizou is offline Old Post 11-17-2009 02:22 PM
Click Here to See the Profile for Wizou Click here to Send Wizou a Private Message Visit Wizou's homepage! Find more posts by Wizou Add Wizou to your buddy list Edit/Delete Message Reply w/Quote
Anders
Major Dude

Registered: Jun 2002
From: N/A

Yeah, I agree with Wizou

__________________
IntOp $PostCount $PostCount + 1

Quick Link | Report this post to a moderator | IP: Logged

Anders is offline Old Post 11-17-2009 03:10 PM
Click Here to See the Profile for Anders Click here to Send Anders a Private Message Visit Anders's homepage! Find more posts by Anders Add Anders to your buddy list Edit/Delete Message Reply w/Quote
jimpark
Senior Member

Registered: Sep 2007
From:

That would be nice if everyone did that. But remember, when people read the Windows documentation, what do they read? The documentation says to use CreateFile(). It does not say to use CreateFileW() for Unicode. We're just lucky that Microsoft has been largely consistent with these W and A suffixes.

If you write C/C++, you will also be calling CreateFile() with wchar_t*. Because that's what the documentation tells you to do. You just have to make sure you define some macro like _UNICODE or UNICODE. If you read the fine print you get the "is implemented as CreateFileW() and CreateFileA()" but no example tells you to use these directly.

And remember, there's really no bearing on type-safety here. I can use any old function signature and as long as the name of the function matches, the System plugin will push your arguments, whatever types they may be, onto the stack and happily call the function. The arguments can be totally wrong types and have bogus values. So it's not even useful in that respects either.

__________________
Unicode NSIS advocate -- http://www.scratchpaper.com for latest build and source.

Quick Link | Report this post to a moderator | IP: Logged

jimpark is offline Old Post 11-17-2009 06:43 PM
Click Here to See the Profile for jimpark Click here to Send jimpark a Private Message Visit jimpark's homepage! Find more posts by jimpark Add jimpark to your buddy list Edit/Delete Message Reply w/Quote
Pidgeot
Senior Member

Registered: Jan 2002
From: Kolding, Denmark

To the best of my knowledge, there IS no CreateFile-function, only CreateFileA and CreateFileW. CreateFile is #defined to CreateFileA or CreateFileW in WinBase.h, depending on whether or not UNICODE is defined.

As such, if the Sytem plug-in allows you to just write CreateFile, then it must either already be checking for *A, or it has some predefined mappings.

Quick Link | Report this post to a moderator | IP: Logged

Pidgeot is offline Old Post 11-17-2009 06:58 PM
Click Here to See the Profile for Pidgeot Click here to Send Pidgeot a Private Message Click Here to Email Pidgeot Find more posts by Pidgeot Add Pidgeot to your buddy list Edit/Delete Message Reply w/Quote
jimpark
Senior Member

Registered: Sep 2007
From:

quote:
Originally posted by Anders
Windows programmers don't think about that, I'm so used to just calling lstr*, I don't think about the char type. Whats wrong by defaulting to the W versions and only falling back if W does not exists or a option to disable it was set?

Do you have a single example of a function that needs to be called without W when running as unicode (meaning foo should be called with WCHAR* even if fooW exists)?



I believe there are calls in the Windows API where there is no ANSI counterparts so the "W" suffix version would fail. But I don't know of a case where the "W" suffix version would also be a different function. That doesn't mean that they don't exist or will never exist.

However, remember, this plugin architecture can call other libraries than those provided by Microsoft. And who knows what other people do.

Basically, as I mentioned before, it is wrong to second guess the user from the onset. Don't you hate it when your word processor "corrects" your typing when you type some acronym thinking it's SMARTER than you? I don't believe programs should behave that way. And I certainly don't want a programming tool to behave that way.

User: "I want to call Foo()."

Computer: "No, you don't. You want Bar(). Bar is nicer."

User: "No, I want Foo()!"

Computer: "Hey, I found Bar()! Look at that. It's a function that exists. Let's just call Bar()."

User: "I said, call Foo()!!!"

Computer: "Silly user. I called Bar() for you which is much nicer and that caused a booboo. You better go fix it."

What a nightmare!

__________________
Unicode NSIS advocate -- http://www.scratchpaper.com for latest build and source.

Quick Link | Report this post to a moderator | IP: Logged

jimpark is offline Old Post 11-17-2009 07:02 PM
Click Here to See the Profile for jimpark Click here to Send jimpark a Private Message Visit jimpark's homepage! Find more posts by jimpark Add jimpark to your buddy list Edit/Delete Message Reply w/Quote
jimpark
Senior Member

Registered: Sep 2007
From:

@Pidgeot: Yes, you are right. There is no CreateFile() function in the library you link to. There's a macro. But the documentation tells you to call CreateFile().

__________________
Unicode NSIS advocate -- http://www.scratchpaper.com for latest build and source.

Quick Link | Report this post to a moderator | IP: Logged

jimpark is offline Old Post 11-17-2009 07:04 PM
Click Here to See the Profile for jimpark Click here to Send jimpark a Private Message Visit jimpark's homepage! Find more posts by jimpark Add jimpark to your buddy list Edit/Delete Message Reply w/Quote
Anders
Major Dude

Registered: Jun 2002
From: N/A

quote:
Originally posted by jimpark
That would be nice if everyone did that. But remember, when people read the Windows documentation, what do they read? The documentation says to use CreateFile(). It does not say to use CreateFileW() for Unicode. We're just lucky that Microsoft has been largely consistent with these W and A suffixes.

If you write C/C++, you will also be calling CreateFile() with wchar_t*. Because that's what the documentation tells you to do. You just have to make sure you define some macro like _UNICODE or UNICODE. If you read the fine print you get the "is implemented as CreateFileW() and CreateFileA()" but no example tells you to use these directly.



You will not be using wchar_t*, you will be using LPTSTR. t is the system plugins version of LPTSTR. The minute you start using w / wchar*, you already know you are working with unicode only. In 99.99% of cases, if there is a t, you need to look for the W/A versions first. This is the most compatible approach (And the only way to achieve A/U compatibility with existing code)

__________________
IntOp $PostCount $PostCount + 1

Quick Link | Report this post to a moderator | IP: Logged

Anders is offline Old Post 11-17-2009 08:06 PM
Click Here to See the Profile for Anders Click here to Send Anders a Private Message Visit Anders's homepage! Find more posts by Anders Add Anders to your buddy list Edit/Delete Message Reply w/Quote
jimpark
Senior Member

Registered: Sep 2007
From:

@Anders: What you say is true. But if you are coding a Unicode only app, you will notice that people use wchar_t with CreateFile() and not CreateFileW().

Either way, I don't like the system to think it's smarter than the programmer.

__________________
Unicode NSIS advocate -- http://www.scratchpaper.com for latest build and source.

Quick Link | Report this post to a moderator | IP: Logged

jimpark is offline Old Post 11-17-2009 09:05 PM
Click Here to See the Profile for jimpark Click here to Send jimpark a Private Message Visit jimpark's homepage! Find more posts by jimpark Add jimpark to your buddy list Edit/Delete Message Reply w/Quote
Anders
Major Dude

Registered: Jun 2002
From: N/A

but we sort of have to be, in windows/C world, this stuff happens at compile time, for us it happens at runtime, and so, t is our clue that the user trusts us and expects us to the right thing

(OT: Why don't you two hang out in IRC, this discussion would go a lot faster that way)

__________________
IntOp $PostCount $PostCount + 1

Quick Link | Report this post to a moderator | IP: Logged

Anders is offline Old Post 11-17-2009 09:45 PM
Click Here to See the Profile for Anders Click here to Send Anders a Private Message Visit Anders's homepage! Find more posts by Anders Add Anders to your buddy list Edit/Delete Message Reply w/Quote
jimpark
Senior Member

Registered: Sep 2007
From:

Unfortunately, my access to the internet is very limited. So I can't IRC. This is also what keeps me from being able to work on the NSIS repository directly (and hence that's why I haven't created a branch in the repository for my stuff here). So once the group actually takes my code into the repository, I can't work on it anymore. Anyway, that's my situation and will be for the foreseeable future.

__________________
Unicode NSIS advocate -- http://www.scratchpaper.com for latest build and source.

Quick Link | Report this post to a moderator | IP: Logged

jimpark is offline Old Post 11-17-2009 09:50 PM
Click Here to See the Profile for jimpark Click here to Send jimpark a Private Message Visit jimpark's homepage! Find more posts by jimpark Add jimpark to your buddy list Edit/Delete Message Reply w/Quote
Anders
Major Dude

Registered: Jun 2002
From: N/A

Well, there are HTTP IRC "clients" that work just fine, try mibbit

__________________
IntOp $PostCount $PostCount + 1

Quick Link | Report this post to a moderator | IP: Logged

Anders is offline Old Post 11-17-2009 10:04 PM
Click Here to See the Profile for Anders Click here to Send Anders a Private Message Visit Anders's homepage! Find more posts by Anders Add Anders to your buddy list Edit/Delete Message Reply w/Quote
Wizou
Senior Member

Registered: Aug 2007
From: Paris, France

You are both right...
The user doesn't want to care or know about CreateFileA or W, he will just use CreateFile... and parameter type 't', and there will be no problem.

I think the few users that care to write their own System::Call (rather than copy/pasting them from somewhere) should know about TCHAR/LPTSTR and A/W variant.

__________________
My NSIS plug-ins: http://wizou.fr

Quick Link | Report this post to a moderator | IP: Logged

Wizou is offline Old Post 11-18-2009 08:54 AM
Click Here to See the Profile for Wizou Click here to Send Wizou a Private Message Visit Wizou's homepage! Find more posts by Wizou Add Wizou to your buddy list Edit/Delete Message Reply w/Quote
All times are GMT. The time now is 04:38 AM. Post New Thread    Post A Reply
Pages (9): « First ... « 7 8 [9]   Last Thread   Next Thread
WINAMP.COM | Forums : Powered by vBulletin version 2.3.9 WINAMP.COM | Forums > Developer Center > NSIS Discussion > Unicode
Show Printable Version
 | 
Email this Page
 | 
Subscribe to this Thread

Forum Jump:
 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is off
vB code is ON
Smilies are ON
[IMG] code is ON