Can anyone let me know the difference between CreateFile() and CreateFileW()?
I’ve looked up in the MSDN, but the parameters look same. What can be the difference between them?
CreateFile is #defined to be CreateFileW or CreateFileA, as appropriate.
Unless you have a good reason, you would only ever use CreateFile, and let
the right version be picked by the #define.
On Fri, 7 Dec 2001, [ks_c_5601-1987] ??? wrote:
Dear Members,
Can anyone let me know the difference between CreateFile() and CreateFileW()?
I’ve looked up in the MSDN, but the parameters look same. What can be the difference between them?
logic kicks ass:
(1) Horses have an even number of legs.
(2) They have two legs in back and fore legs in front.
(3) This makes a total of six legs, which certainly is an odd number of
legs for a horse.
(4) But the only number that is both odd and even is infinity.
(5) Therefore, horses must have an infinite number of legs.
You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
CreateFileA is ANSI and CreateFileW is Unicode version.
CreateFileW can skip path parsing and use filenames of up to 32000
characters, whereas CreateFileA is limited to 260.
You won’t see a difference in the FSD or FSFD, since CreateFileA
calls CreateFileW when it converts the string:-)
Regards, Dejan.
??? wrote:
ear Members,
Can anyone let me know the difference between CreateFile() and
CreateFileW()?
I’ve looked up in the MSDN, but the parameters look same. What can be
the difference between them?
Many Thanks,
Jay
–
Kind regards, Dejan M. CEO Alfa Co. www.alfasp.com
E-mail: xxxxx@alfasp.com
ICQ#: 56570367
Alfa File Monitor - File monitoring system for Win32 developers.
Alfa File Protector - File protection and hiding system for Win32
developers.
You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
CreateFileW is a wide character routine where CreateFileA is the ANSI variant.
This abstraction is all handled by MS headers, when you compile with _UNICODE or
ANSI.
So to be verbose you pass in L"file.txt" (UNICODE) based strings for the path
into the CreateFileW() implementation and standard “file.txt” type strings for
CreateFileA()
Regards,
Ian
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of °Áø¿í
Sent: Friday, December 07, 2001 2:08 PM
To: File Systems Developers
Subject: [ntfsd] CreateFile( vs CreateFileW( , CreateFileA(
Dear Members,
Can anyone let me know the difference between CreateFile() and
CreateFileW()?
I’ve looked up in the MSDN, but the parameters look same. What can be the
difference between them?
You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
Thanks Dejan, Max, and Peter. It helps me a lot to understand.
Many Thanks
Jay
----- Original Message -----
From: “Dejan Maksimovic” To: “File Systems Developers” Sent: Friday, December 07, 2001 12:54 PM Subject: [ntfsd] Re: CreateFile( vs CreateFileW( , CreateFileA(
There are two differences (that I know of): - CreateFileA is ANSI and CreateFileW is Unicode version. - CreateFileW can skip path parsing and use filenames of up to 32000 characters, whereas CreateFileA is limited to 260. You won’t see a difference in the FSD or FSFD, since CreateFileA calls CreateFileW when it converts the string:-)
Regards, Dejan.
°Áø¿í wrote:
> ear Members, > > Can anyone let me know the difference between CreateFile() and > CreateFileW()? > I’ve looked up in the MSDN, but the parameters look same. What can be > the difference between them? > > Many Thanks, > Jay
– Kind regards, Dejan M. CEO Alfa Co. www.alfasp.com E-mail: xxxxx@alfasp.com ICQ#: 56570367 Alfa File Monitor - File monitoring system for Win32 developers. Alfa File Protector - File protection and hiding system for Win32 developers.
— You are currently subscribed to ntfsd as: xxxxx@neat.co.kr To unsubscribe send a blank email to xxxxx@lists.osr.com (???r??z{e?˛???m?m?{_?֬???&j)@u?Ӣ?칻?&ޱ??i?Z?G?j)m?W???~?l??-E?"?Ǧm??(Z?X???,??&
And so you know many Win32 APIs that take strings have an A and W version.
In general A versions convert the string and call the W version. It could be all A APIs do that, but I don’t know. Because of this you typically want to set breakpoints on the W version if you are debugging.
In Windbg you can use the “ss” command to tell the debugger to append a A or W to the symbol name for you.
-----Original Message-----
From: xxxxx@neat.co.kr [mailto:xxxxx@neat.co.kr]
Sent: Thursday, December 06, 2001 9:35 PM
To: File Systems Developers
Subject: [ntfsd] Re: CreateFile( vs CreateFileW( , CreateFileA(
Thanks for All Members,
Thanks Dejan, Max, and Peter. It helps me a lot to understand.
Many Thanks
Jay
----- Original Message -----
From: “Dejan Maksimovic” To: “File Systems Developers” Sent: Friday, December 07, 2001 12:54 PM Subject: [ntfsd] Re: CreateFile( vs CreateFileW( , CreateFileA(
There are two differences (that I know of): - CreateFileA is ANSI and CreateFileW is Unicode version. - CreateFileW can skip path parsing and use filenames of up to 32000 characters, whereas CreateFileA is limited to 260. You won’t see a difference in the FSD or FSFD, since CreateFileA calls CreateFileW when it converts the string:-)
Regards, Dejan.
°Áø¿í wrote:
> ear Members, > > Can anyone let me know the difference between CreateFile() and > CreateFileW()? > I’ve looked up in the MSDN, but the parameters look same. What can be > the difference between them? > > Many Thanks, > Jay
– Kind regards, Dejan M. CEO Alfa Co. www.alfasp.com E-mail: xxxxx@alfasp.com ICQ#: 56570367 Alfa File Monitor - File monitoring system for Win32 developers. Alfa File Protector - File protection and hiding system for Win32 developers.
— You are currently subscribed to ntfsd as: xxxxx@neat.co.kr To unsubscribe send a blank email to xxxxx@lists.osr.com bvj~mzyw첲 (???r??z{e?˛???m?m?{_?֬???&j)@u?Ӣ?칻?&ޱ??i?Z?G?j)m?W???~?l??-E?"?Ǧm??(Z?X???,??&
I want to suggest a correction that “UNICODE” should be defined to resolve
to Wide character version of the APIs.It also resolves LPTSTR to LPWSTR &
etc.Whereas, “_UNICODE” resolves TCHAR into WCHAR & etc…(it applies to
<tchar.h>)
It’s a minor distinction but sure, it leads to calling the A-suffixed APIs when you are expecting W-suffixed APIs.
Cheers!!
“A hundred ounces of silver spent for information may save thousand spent on war” - Sun Tzu.
-----Original Message----- From: Ian Costello [mailto:xxxxx@adacel.com.au] Sent: Friday, December 07, 2001 3:59 AM To: File Systems Developers Subject: [ntfsd] RE: CreateFile( vs CreateFileW( , CreateFileA(
CreateFileW is a wide character routine where CreateFileA is the ANSI variant. This abstraction is all handled by MS headers, when you compile with _UNICODE or ANSI.
So to be verbose you pass in L"file.txt" (UNICODE) based strings for the path into the CreateFileW() implementation and standard “file.txt” type strings for CreateFileA()
Regards,
Ian
-----Original Message----- From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com]On Behalf Of ??? Sent: Friday, December 07, 2001 2:08 PM To: File Systems Developers Subject: [ntfsd] CreateFile( vs CreateFileW( , CreateFileA(
Dear Members,
Can anyone let me know the difference between CreateFile() and CreateFileW()? I’ve looked up in the MSDN, but the parameters look same. What can be the difference between them?
— You are currently subscribed to ntfsd as: xxxxx@ggn.hcltech.com To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
— You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’) To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com</tchar.h>
----- Original Message -----
From: ???
To: File Systems Developers
Sent: Friday, December 07, 2001 6:07 AM
Subject: [ntfsd] CreateFile( vs CreateFileW( , CreateFileA(
Dear Members,
Can anyone let me know the difference between CreateFile() and CreateFileW()?
I’ve looked up in the MSDN, but the parameters look same. What can be the difference between them?
Many Thanks,
Jay
b???v?jƶ?i?d??{.n???zwZnV???h???z{_?ݴ?p%??l??
You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
Can someone please tell me how WIN2K/XP finds out the size of a physical
harddisk during boot time?
IOCTL_DISK_GET_DRIVE_GEOMETRY & IOCTL_DISK_GET_DRIVE_GEOMETRY_EX do not
seem to return the size of the hard disk.
What is the purpose of IOCTL_DISK_GET_LENGTH_INFO and how is it used to
get the size of the physical hard disk? It says in documentation that it
sometimes returns Volume length, disk length or partition length. Is there
any flag to find out the disk length?
Thanks
Basudeb
You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com
> Can someone please tell me how WIN2K/XP finds out the size of a physical
harddisk during boot time?
For IDE - UserAddressableSectors in IDENTIFY data.
For SCSI - READ CAPACITY command.
Max
You are currently subscribed to ntfsd as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntfsd-$subst(‘Recip.MemberIDChar’)@lists.osr.com