- Timestamp:
- Dec 5, 1999, 11:02:31 AM (26 years ago)
- Location:
- trunk/src/kernel32
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/heapstring.cpp
r1670 r1975 1 /* $Id: heapstring.cpp,v 1. 19 1999-11-09 19:22:32sandervl Exp $ */1 /* $Id: heapstring.cpp,v 1.20 1999-12-05 10:02:30 sandervl Exp $ */ 2 2 3 3 /* … … 509 509 510 510 int WIN32API lstrcpynWtoA(LPSTR astring, 511 LP WSTR ustring,511 LPCWSTR ustring, 512 512 int unilen) 513 513 { … … 588 588 // @@@PH 0 termination is NOT necessarily included ! 589 589 int WIN32API lstrcpynAtoW(LPWSTR unicode, 590 LP STR ascii,590 LPCSTR ascii, 591 591 int asciilen) 592 592 { … … 623 623 } 624 624 625 in_buf = ascii;625 in_buf = (LPSTR)ascii; 626 626 627 627 //@@@PH what's this? … … 679 679 *****************************************************************************/ 680 680 681 LPSTR WIN32API lstrcpyWtoA(LPSTR ascii, LP WSTR unicode)681 LPSTR WIN32API lstrcpyWtoA(LPSTR ascii, LPCWSTR unicode) 682 682 { 683 683 //@@@PH huh? wuz dat? 684 684 if (unicode == NULL) 685 685 { 686 if (unicode != NULL) unicode[0] = 0; //CB: set at least end686 if (unicode != NULL) ((LPWSTR)unicode)[0] = 0; //CB: set at least end 687 687 return NULL; 688 688 } … … 712 712 *****************************************************************************/ 713 713 714 LPWSTR WIN32API lstrcpyAtoW(LPWSTR unicode, LP STR ascii)714 LPWSTR WIN32API lstrcpyAtoW(LPWSTR unicode, LPCSTR ascii) 715 715 { 716 716 /* achimha for security, strlen might trap if garbage in */ -
trunk/src/kernel32/wprocess.cpp
r1924 r1975 1 /* $Id: wprocess.cpp,v 1.5 4 1999-12-01 18:40:49sandervl Exp $ */1 /* $Id: wprocess.cpp,v 1.55 1999-12-05 10:02:31 sandervl Exp $ */ 2 2 3 3 /* … … 624 624 //****************************************************************************** 625 625 //****************************************************************************** 626 BOOL WIN32API CreateProcessA(LPCSTR lpszImageName, LPSTR lpszCommandLine, 627 PSECURITY_ATTRIBUTES arg3, 628 PSECURITY_ATTRIBUTES arg4, BOOL arg5, DWORD arg6, 629 PVOID arg7, LPCSTR arg8, LPSTARTUPINFOA arg9, 630 LPPROCESS_INFORMATION arg10) 626 BOOL WINAPI CreateProcessA( LPCSTR lpApplicationName, LPSTR lpCommandLine, 627 LPSECURITY_ATTRIBUTES lpProcessAttributes, 628 LPSECURITY_ATTRIBUTES lpThreadAttributes, 629 BOOL bInheritHandles, DWORD dwCreationFlags, 630 LPVOID lpEnvironment, LPCSTR lpCurrentDirectory, 631 LPSTARTUPINFOA lpStartupInfo, 632 LPPROCESS_INFORMATION lpProcessInfo ) 631 633 { 632 634 BOOL rc; … … 634 636 BOOL fAllocStr = FALSE; 635 637 636 if(O32_CreateProcess(lpszImageName, lpszCommandLine, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10) == TRUE) 638 dprintf(("KERNEL32: CreateProcessA %s cline:%s inherit:%d cFlags:%x Env:%x CurDir:%s StartupFlags:%x\n", 639 lpApplicationName, lpCommandLine, bInheritHandles, dwCreationFlags, 640 lpEnvironment, lpCurrentDirectory, lpStartupInfo)); 641 642 if(O32_CreateProcess(lpApplicationName, lpCommandLine, lpProcessAttributes, 643 lpThreadAttributes, bInheritHandles, dwCreationFlags, 644 lpEnvironment, lpCurrentDirectory, lpStartupInfo, 645 lpProcessInfo) == TRUE) 637 646 return(TRUE); 638 647 639 648 //probably a win32 exe, so run it in the pe loader 640 if(lp szImageName) {641 if(lpszCommandLine) {642 cmdline = (char *)malloc(strlen(lpszImageName)+strlen(lpszCommandLine) + 16);643 sprintf(cmdline, "PE.EXE %s %s", lpszImageName, lpszCommandLine);649 if(lpApplicationName) { 650 if(lpCommandLine) { 651 cmdline = (char *)malloc(strlen(lpApplicationName)+strlen(lpCommandLine) + 16); 652 sprintf(cmdline, "PE.EXE %s %s", lpApplicationName, lpCommandLine); 644 653 fAllocStr = TRUE; 645 654 } 646 655 else { 647 cmdline = (char *)malloc(strlen(lpszImageName) + 16);648 sprintf(cmdline, "PE.EXE %s", lpszImageName);656 cmdline = (char *)malloc(strlen(lpApplicationName) + 16); 657 sprintf(cmdline, "PE.EXE %s", lpApplicationName); 649 658 fAllocStr = TRUE; 650 659 } 651 660 } 652 661 else { 653 cmdline = (char *)malloc(strlen(lpszCommandLine) + 16);654 sprintf(cmdline, "PE.EXE %s", lpszCommandLine);662 cmdline = (char *)malloc(strlen(lpCommandLine) + 16); 663 sprintf(cmdline, "PE.EXE %s", lpCommandLine); 655 664 fAllocStr = TRUE; 656 665 } 657 666 dprintf(("KERNEL32: CreateProcess %s\n", cmdline)); 658 rc = O32_CreateProcess("PE.EXE", (LPCSTR)cmdline, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10); 667 rc = O32_CreateProcess("PE.EXE", (LPCSTR)cmdline,lpProcessAttributes, 668 lpThreadAttributes, bInheritHandles, dwCreationFlags, 669 lpEnvironment, lpCurrentDirectory, lpStartupInfo, 670 lpProcessInfo); 659 671 if(fAllocStr) 660 672 free(cmdline); 661 673 662 dprintf(("KERNEL32: CreateProcess returned %d\n", rc)); 674 if(lpProcessInfo) 675 dprintf(("KERNEL32: CreateProcess returned %d hPro:%x hThr:%x pid:%x tid:%x\n", 676 rc, lpProcessInfo->hProcess, lpProcessInfo->hThread, 677 lpProcessInfo->dwProcessId,lpProcessInfo->dwThreadId)); 678 else 679 dprintf(("KERNEL32: CreateProcess returned %d\n", rc)); 663 680 return(rc); 664 681 }
Note:
See TracChangeset
for help on using the changeset viewer.