Using Win32 functions in Visual FoxPro Image Gallery
Unicode and Character Set
..msdn
MultiByteToWideChar
WideCharToMultiByte
Code examples:
Creating a unique filename based on existing filename
Creating an Open dialog box to specify the drive, directory, and name of a file to open (Shell32 version)
MultiByteToWideChar
..msdn    Add comment     W32 Constants      Translate this page
The MultiByteToWideChar function maps a character string to a wide-character (Unicode) string.
Code examples:
Creating a unique filename based on existing filename
Creating an Open dialog box to specify the drive, directory, and name of a file to open (Shell32 version)
Declaration:
int MultiByteToWideChar(
  UINT CodePage,         // code page
  DWORD dwFlags,         // character-type options
  LPCSTR lpMultiByteStr, // string to map
  int cbMultiByte,       // number of bytes in string
  LPWSTR lpWideCharStr,  // wide-character buffer
  int cchWideChar        // size of buffer
);
FoxPro declaration:
DECLARE INTEGER MultiByteToWideChar IN kernel32;
    INTEGER   CodePg,;
    LONG      dwFlags,;
    STRING    lpMultiByteStr,;
    INTEGER   cbMultiByte,;
    STRING  @ lpWideCharStr,;
    INTEGER   cchWideChar

Parameters:
CodePage
[in] Specifies the code page to be used to perform the conversion.

dwFlags
[in] A combination of the following flag constants.

lpMultiByteStr
[in] Points to the character string to be converted.

cbMultiByte
[in] Specifies the size in bytes of the string pointed to by the lpMultiByteStr parameter, or it can be -1 if the string is null terminated. Note that if cbMultiByte is 0, the function fails.

lpWideCharStr
[out] Points to a buffer that receives the translated string.

cchWideChar
[in] Specifies the size, in wide characters, of the buffer pointed to by the lpWideCharStr parameter.
Return value:
If the function succeeds, and cchWideChar is nonzero, the return value is the number of wide characters written to the buffer pointed to by lpWideCharStr.
My comment:
FoxPro function StrConv() with Unicode support added in VFP7 makes this call redundant.
Word Index links for the MultiByteToWideChar :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2003-01-07 11:34:39
Modified: 2004-09-17 07:14:19
Visited in last 7 days: 20
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2017 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.6.37), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.166.199.178)
5 sec.Function: 'SetLastError'
11 sec.Function: 'IcmpCreateFile'
16 sec.Function: 'CryptGetHashParam'
22 sec.Function: 'UrlGetPart'
27 sec.Function: 'EnumProcessModules'
32 sec.Function: 'GetKeyboardLayout'
38 sec.Function: 'BitBlt'
44 sec.Function: 'GetAclInformation'
50 sec.Function: 'MAPIReadMail'
55 sec.Function: 'AdjustTokenPrivileges'
Google
Advertise here!