INFO: ??????? ??????? ????????? ????????? ?? DBCS

?????? ????????? ?????? ?????????
???? ???????: 75439 - ??? ???????? ???? ????? ????? ??? ???????.
??? ????? ??? ???????. ????? "??? ??" ??? ??? ??????? ??? ????.
3.00 3.10 kbprg WINDOWS
????? ???? | ?? ????

??????

????? ???????? ????? ?? ??????? ???? ?????? ???? ????? "?????? ??????" (DBCS) ????? ?????? ?? ???? ???? ?????? ??????. ???? ??? ??????? ??????? ????? ????? ???????? ?????? ??? ??????? ???????? ?? ??? ???? ???? ???? ??? ???? DBCS.

??????? ????

?? ?????? ???? ?????? ?????? ????? ??? ?????? ????? ???? ????? ????? ??? ???? ???? ???. ???? ?????? ????? ??? ??????? ??? ???? ??????? ?? ?????? ?? ???? ????? ??? ?????? ?? "????? ?????? ???????". ??? ?? ???? ???? ????? ???? ??? ("???? ????") ?????? ??? ???? ????? ??? (DBC). ????? ????? ?????? ??????? ???? ??? ???. ????? ?? ???? ?? ???? ????? ???? ????? ????; ????? ?? ??? ???? ASCII 7 ?? ???? ?????. ?? ???? ?????? ???? ?? ???? ???????? ???? NULL. ??? ????? ????? ????? ?????? ??? ???? ?????? NULL ????? ?? ???????. ??? ????? ???? ???? ???? ?????????; ??????? ??????? ?????? ?? ??? ??? ???? ???? ??? ???? ????? ?? ??????.

????? ????? ????? Kit (SDK) Windows ??????? 3.0 ????? ????? ?????? ???? ????? ?? ????? DBCs: AnsiNext() ? AnsiPrev(). ???? AnsiPrev() ???? ?????? ????? ??? ??? ?? ???? ??? ??????? ?? ??????? ?????? ??? ???? ????? ??????. ?? ?????? ????? ?? ?????? ?? ??????? ????? ?? ????? ?????.

????? SDK Windows ??????? 3.1 ?????? IsDBCSLeadByte() ????? TRUE ??? ? ??? ??? ?????? ???? ?????? ???? ???????. ??? ????? ??? ?????? ??? char ???????, ???? ????? ????? ??? ?????? IS ???? ????? (?????? ???? ?? ????? ??????).

???? ??? ??? DBCS ???? ????? ??? ??????? ?? ??? ???? ?? ?????? "#ifdef DBCS" ??? ????????? ???????? ???? ??? ??? ?? ??? DBCS ?? ????? ??????? ?? ??? ?????? (OBJ). ??? ???? ??????:
   #ifdef DBCS
     for (pszTemp = szString; *pszTemp; pszTemp = AnsiNext(pszTemp))
   #else
     for (pszTemp = szString; *pszTemp; ++pszTemp)
   #endif

   ...
				
?????? ????????? ???????? ???? ??????? ????? ?? ????? ????? ????? ??????? AnsiNext() ? AnsiPrev() ??? ?? ??? ????? DBCS:
   #ifndef DBCS

   #define AnsiNext(x) ((x)+1)
   #define AnsiPrev(y, x) ((x)-1)

   #ifdef WIN31

   #define IsDBCSLeadByte(x) (FALSE)

   #endif

   #endif
				
?? ??? ????????? ?? ???? ???? ????????? ???????? ???? ??????? ?? DBCS. ???? ?? ?????? AnsiNext() ????? ?? ????? ????? ??? ??? ????? ?????? AnsiPrev() ??? ????? ????? ????? ??? ????? ???????. ???????? ??? ???? ??? ??? ????? ????? "y" ?? ??????? AnsiPrev() ????? ????????? ???????? ??? ????? ?????? ??? ??????? ??????? ?? ????? DBCS ?????. ???????? ???????? ??????? ???? ?? ??? phenomenon:
   pszEnd = AnsiPrev(++pszStart, pszEnd);
				
???? ???????? ???????? ?????? ???? ????? ????? ?? ????? ??? ????? ?? ??? ???? ????:
   LPSTR GetFilePtr(LPSTR lpszFullPath)
   {

    LPSTR lpszFileName;

    for (lpszFileName = lpszFullPath; *lpszFullPath;
               lpszFullPath = AnsiNext(lpszFullPath))
        if (*lpszFullPath == ':' || *lpszFullPath == '\\')
            lpszFileName = lpszFullPath + 1;

    return lpszFileName;

   }
				
????????? ???? ': '?' \\ ' ??? ???? ?? ???? ????? ????. ??? ????? ?? ????? ??????? ????? ?? ??????? ???? ??????? ?????? AnsiPrev().

???? ???????? ???????? ??????? ???? ????? ?? ?????? ???? ??? ??????. ???? ?? ???? ?? ?? ????? ??????? ?? ???? ???????.
   int StrCpyN(LPSTR lpszDst, LPSTR lpszSrc, unsigned int wLen)

   {

    LPSTR lpEnd;
    char cTemp;

    // account for the terminating NULL
    --wLen;

    for (lpEnd = lpszSrc; *lpEnd && (lpEnd - lpszSrc) < wLen;
               lpEnd = AnsiNext(lpEnd))
        ;  // scan to the end of string, or wLen bytes

    // The following can happen only if lpszSrc[wLen-1] is a lead
    // byte, in which case do not include the previous DBC in the copy.
    if (lpEnd - lpszSrc > wLen)
        lpEnd -= 2;

    // Terminate the source string and call lstrcpy.
    cTemp = *lpEnd;
    *lpEnd = '\0';
    lstrcpy(lpszDst, lpszSrc);
    *lpEnd = cTemp;

   }
				

???????

???? ???????: 75439 - ????? ??? ??????: 10/???? ??????/1435 - ??????: 1.1
????? ???
  • Microsoft Windows Software Development Kit 3.1
????? ??????: 
kbnosurvey kbarchive kbmt kb16bitonly kbinfo KB75439 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????75439

????? ???????

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com