Changeset 10176 for trunk/src/kernel32
- Timestamp:
- Jul 16, 2003, 8:07:01 PM (22 years ago)
- Location:
- trunk/src/kernel32
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/KERNEL32.DEF
r9963 r10176 1 ; $Id: KERNEL32.DEF,v 1.15 4 2003-03-31 11:54:27sandervl Exp $1 ; $Id: KERNEL32.DEF,v 1.155 2003-07-16 18:06:59 sandervl Exp $ 2 2 3 3 ;Basis is Windows95 KERNEL32 … … 976 976 lstrncmpiW = _lstrncmpiW@12 @888 977 977 978 lstrlenAtoW = _lstrlenAtoW@8 @890 979 lstrlenWtoA = _lstrlenWtoA@8 @891 980 978 981 GetLongPathNameA = _GetLongPathNameA@12 @900 979 982 GetLongPathNameW = _GetLongPathNameW@12 @901 … … 995 998 FindNextVolumeMountPointW = _FindNextVolumeMountPointW@12 @912 996 999 FindVolumeMountPointClose = _FindVolumeMountPointClose@4 @913 997 1000 998 1001 GetVolumeNameForVolumeMountPointA = _GetVolumeNameForVolumeMountPointA@12 @914 999 1002 GetVolumeNameForVolumeMountPointW = _GetVolumeNameForVolumeMountPointW@12 @915 … … 1183 1186 wctype_table @2006 NONAME 1184 1187 casemap_upper @2007 NONAME 1185 casemap_lower 1188 casemap_lower @2008 NONAME 1186 1189 1187 1190 ; @@PF this exports were cut-out as a result of migration to new unicode … … 1192 1195 1193 1196 _GetProcessTIBSel@0 @2012 NONAME 1194 1197 1195 1198 _SetRegistryRootKey@8 @2013 NONAME 1196 1199 _SetCustomBuildName@12 @2014 NONAME … … 1208 1211 1209 1212 OSLibDosDevIOCtl @2026 NONAME 1210 1211 vsnprintfW 1212 snprintfW 1213 1214 vsnprintfW @2030 NONAME 1215 snprintfW @2031 NONAME 1213 1216 1214 1217 ; custom dll hook installer … … 1218 1221 1219 1222 ; override TIB switching 1220 _ODIN_SetTIBSwitch@4 @2102 NONAME 1223 _ODIN_SetTIBSwitch@4 @2102 NONAME 1221 1224 1222 1225 GetDisplayCodepage @3000 NONAME -
trunk/src/kernel32/dbgwrap.cpp
r9802 r10176 302 302 DEBUGWRAP_LVL2_12(lstrncmpiA); 303 303 DEBUGWRAP_LVL2_12(lstrncmpiW); 304 DEBUGWRAP_LVL2_8(lstrlenAtoW); 305 DEBUGWRAP_LVL2_8(lstrlenWtoA); 304 306 305 307 #undef DBG_LOCALLOG … … 877 879 DEBUGWRAP_LVL2_0(GetTickCount); 878 880 DEBUGWRAP4(GetVDMCurrentDirectories); 879 DEBUGWRAP 4(QueryPerformanceCounter);881 DEBUGWRAP_LVL2_4(QueryPerformanceCounter); 880 882 DEBUGWRAP4(QueryPerformanceFrequency); 881 883 DEBUGWRAP4(IsProcessorFeaturePresent); -
trunk/src/kernel32/heapstring.cpp
r9975 r10176 1 /* $Id: heapstring.cpp,v 1.5 2 2003-04-02 12:58:29sandervl Exp $ */1 /* $Id: heapstring.cpp,v 1.53 2003-07-16 18:07:01 sandervl Exp $ */ 2 2 /* 3 3 * Project Odin Software License can be found in LICENSE.TXT … … 410 410 */ 411 411 if (!dst || !src) { 412 413 412 SetLastError(ERROR_INVALID_PARAMETER); 413 return 0; 414 414 } 415 415 while ((n-- > 1) && *src) *p++ = *src++; … … 462 462 { 463 463 if (!str1 || !str2) { 464 464 465 465 SetLastError(ERROR_INVALID_PARAMETER); 466 466 return 0; … … 495 495 //lstrcpynWtoA and lstrcpynAtoW must zero-terminate the string 496 496 //because Wine code depends on this behaviour (i.e. comdlg32) 497 int WIN32API lstrcpynAtoW(LPWSTR unicode, LPCSTR ascii, int asciilen)497 int WIN32API lstrcpynAtoW(LPWSTR unicode, LPCSTR ascii, int unilen) 498 498 { 499 499 int ret; 500 500 501 ret = MultiByteToWideChar(CP_ACP, 0, ascii, -1, unicode, asciilen);501 ret = MultiByteToWideChar(CP_ACP, 0, ascii, -1, unicode, unilen ); 502 502 if(ret == 0) { 503 503 SetLastError(ERROR_SUCCESS); //MultiByteToWideChar sets it to ERROR_INSUFFICIENT_BUFFER 504 ret = asciilen;504 ret = unilen; 505 505 } 506 506 … … 508 508 //string size to apis that use this function (i.e. GetMenuStringW (Notes)) 509 509 //-> overwrites stack 510 if(ret == asciilen) {511 unicode[ asciilen-1] = 0;510 if(ret == unilen) { 511 unicode[unilen-1] = 0; 512 512 } 513 513 else unicode[ret] = 0; 514 514 return ret; 515 516 517 515 } 518 516 … … 547 545 lstrcpynWtoA(ascii, 548 546 unicode, 549 lstrlenW(unicode)+1); //end included547 WideCharToMultiByte( CP_ACP, 0, unicode, -1, 0, 0, 0, 0 )); //end included 550 548 551 549 return ascii; … … 582 580 583 581 /* forward to call with length parameter */ 584 lstrcpynAtoW(unicode, ascii, strlen(ascii)+1); //end included582 lstrcpynAtoW(unicode, ascii, MultiByteToWideChar( CP_ACP, 0, ascii, -1, 0, 0 )); //end included 585 583 return (unicode); 586 584 } 587 585 588 589 586 /***************************************************************************** 587 * NAME 588 * lstrlenWtoA 589 * 590 * PURPOSE 591 * calculate the length of string when unicode string was converted to 592 * ansi string. 593 * 594 * PARAMETERS 595 * ustring - unicode string 596 * ulen - length of ustring 597 * 598 * RESULT 599 * Success 600 * if ulen < 0, length of null-terminated unicode string NOT including 601 * null-terminator. 602 * otherwise, length of string when first ulen characters of ustring 603 * converted to ansi string. 604 * 605 * Failure 606 * return 0. 607 * 608 * REMARK 609 * this function is not Win32 API but helper for convenient. 610 * 611 * AUTHOR : KO Myung-Hun 612 *****************************************************************************/ 613 614 int WIN32API lstrlenWtoA( LPCWSTR ustring, int ulen ) 615 { 616 int ret; 617 618 if( ulen < 0 ) 619 ulen = lstrlenW( ustring ); 620 621 ret = WideCharToMultiByte( CP_ACP, 0, ustring, ulen, 0, 0, 0, 0 ); 622 if(ret == 0) { 623 SetLastError(ERROR_SUCCESS); //WideCharToMultiByte sets it to ERROR_INSUFFICIENT_BUFFER 624 return 0; 625 } 626 627 return ret; 628 } 629 630 /***************************************************************************** 631 * NAME 632 * lstrlenAtoW 633 * 634 * PURPOSE 635 * return the length of string when ansi string was converted to 636 * unicode string. 637 * 638 * PARAMETERS 639 * astring - ansi string 640 * alen - length of astring 641 * 642 * RESULT 643 * Success 644 * if alen < 0, length of null-terminated ansi string NOT including 645 * null-terminator. 646 * otherwise, length of string when first alen characters of astring 647 * converted to unicode string. 648 * 649 * Failure 650 * return 0. 651 * 652 * REMARK 653 * this function is not Win32 API but helper for convenient. 654 * 655 * AUTHOR : KO Myung-Hun 656 *****************************************************************************/ 657 658 int WIN32API lstrlenAtoW( LPCSTR astring, int alen ) 659 { 660 int ret; 661 662 if( alen < 0 ) 663 alen = strlen( astring ); 664 665 ret = MultiByteToWideChar( CP_ACP, 0, astring, alen, 0, 0 ); 666 if(ret == 0) { 667 SetLastError(ERROR_SUCCESS); //MultiByteToWideChar sets it to ERROR_INSUFFICIENT_BUFFER 668 return 0; 669 } 670 671 return ret; 672 } 590 673 591 674 /***************************************************************************** -
trunk/src/kernel32/kernel32dbg.def
r9963 r10176 1 ; $Id: kernel32dbg.def,v 1. 29 2003-03-31 11:54:28sandervl Exp $1 ; $Id: kernel32dbg.def,v 1.30 2003-07-16 18:07:01 sandervl Exp $ 2 2 3 3 ;Basis is Windows95 KERNEL32 … … 976 976 lstrncmpiW = _DbglstrncmpiW@12 @888 977 977 978 lstrlenAtoW = _DbglstrlenAtoW@8 @890 979 lstrlenWtoA = _DbglstrlenWtoA@8 @891 980 978 981 GetLongPathNameA = _DbgGetLongPathNameA@12 @900 979 982 GetLongPathNameW = _DbgGetLongPathNameW@12 @901 … … 1183 1186 wctype_table @2006 NONAME 1184 1187 casemap_upper @2007 NONAME 1185 casemap_lower 1188 casemap_lower @2008 NONAME 1186 1189 1187 1190 ; @@PF this exports were cut-out as a result of migration to new unicode … … 1192 1195 1193 1196 _GetProcessTIBSel@0 @2012 NONAME 1194 1197 1195 1198 _SetRegistryRootKey@8 @2013 NONAME 1196 1199 _SetCustomBuildName@12 @2014 NONAME … … 1209 1212 OSLibDosDevIOCtl @2026 NONAME 1210 1213 1211 vsnprintfW 1212 snprintfW 1214 vsnprintfW @2030 NONAME 1215 snprintfW @2031 NONAME 1213 1216 1214 1217 ; custom dll hook installer … … 1218 1221 1219 1222 ; override TIB switching 1220 _ODIN_SetTIBSwitch@4 @2102 NONAME 1223 _ODIN_SetTIBSwitch@4 @2102 NONAME 1221 1224 1222 1225 GetDisplayCodepage @3000 NONAME
Note:
See TracChangeset
for help on using the changeset viewer.