Using Win32 functions in Visual FoxPro Image Gallery
Unicode and Character Set
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)
..msdn    Add comment     W32 Constants      Translate this page
The MultiByteToWideChar function maps a character string to a wide-character (Unicode) string.
Code examples:
Creating an Open dialog box to specify the drive, directory, and name of a file to open (Shell32 version)
Creating a unique filename based on existing filename
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

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

[in] A combination of the following flag constants.

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

[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.

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

[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 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: 30
User Contributed Notes:
There are no notes on this subject.

Copyright 2001-2018 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.39), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (
21 sec.Function: 'QueryPerformanceFrequency'
42 sec.Function: 'InternetAutodialHangup'
1.07 min.Function: 'LsaLookupSids'
1.43 min.Function: 'OpenDesktop'
1.8 min.Function: 'WritePrivateProfileString'
2.15 min.Function: 'GdipFillPieI'
2.48 min.Function: 'CM_Request_Device_Eject_Ex'
2.8 min.Function: 'ToAscii'
3.28 min.Function: 'GetFileTime'
3.58 min.Function: 'ExitWindowsEx'
Advertise here!