pass multi-byte (or wide) characters to DeleteFile

This is a discussion on pass multi-byte (or wide) characters to DeleteFile within the C Programming forums, part of the General Programming Boards category; Hello everyone, The prototype of DeleteFile is, BOOL WINAPI DeleteFile( LPCTSTR lpFileName ); I am wondering if the input parameter ...

  1. #1
    Registered User
    Join Date
    May 2006
    Posts
    1,579

    pass multi-byte (or wide) characters to DeleteFile

    Hello everyone,


    The prototype of DeleteFile is,

    BOOL WINAPI DeleteFile(
    LPCTSTR lpFileName
    );

    I am wondering if the input parameter (string) is multi-byte characters or wide characters, how should I pass them in? Do I need to do any conversions?


    thanks in advance,
    George

  2. #2
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    Windows related but: http://msdn2.microsoft.com/en-us/library/aa363915.aspx

    In the ANSI version of this function, the name is limited to MAX_PATH characters. To extend this limit to 32,767 wide characters, call the Unicode version of the function and prepend "\\?\" to the path.
    Or use DeleteFileW (Unicode)
    Unicode

    Implemented as DeleteFileW (Unicode) and DeleteFileA (ANSI). Note that Unicode support on Windows Me/98/95 requires Microsoft Layer for Unicode.
    Last edited by zacs7; 07-30-2007 at 12:59 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. A development process
    By Noir in forum C Programming
    Replies: 37
    Last Post: 07-10-2011, 10:39 PM
  2. Speed test result
    By audinue in forum C Programming
    Replies: 4
    Last Post: 07-07-2008, 05:18 AM
  3. help with text input
    By Alphawaves in forum C Programming
    Replies: 8
    Last Post: 04-08-2007, 04:54 PM
  4. Help with wide characters
    By caduardo21 in forum C++ Programming
    Replies: 1
    Last Post: 03-16-2005, 05:26 PM
  5. Support for Wide Characters
    By Davros in forum C++ Programming
    Replies: 0
    Last Post: 11-18-2002, 03:39 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21