Change GetStartupInfoA/W to return the real StartupInfo.

This commit is contained in:
Peter Ganten 1999-03-13 17:04:52 +00:00 committed by Alexandre Julliard
parent 4a6af35bc4
commit aa546ef661
1 changed files with 39 additions and 19 deletions

View File

@ -2,6 +2,7 @@
* Win32 kernel functions * Win32 kernel functions
* *
* Copyright 1995 Martin von Loewis and Cameron Heide * Copyright 1995 Martin von Loewis and Cameron Heide
* 1999 Peter Ganten
*/ */
#include <string.h> #include <string.h>
@ -13,23 +14,28 @@
#include "heap.h" #include "heap.h"
#include "task.h" #include "task.h"
#include "debug.h" #include "debug.h"
#include "process.h"
/*********************************************************************** /***********************************************************************
* GetStartupInfoA (KERNEL32.273) * GetStartupInfoA (KERNEL32.273)
*/ */
VOID WINAPI GetStartupInfoA(LPSTARTUPINFOA lpStartupInfo) VOID WINAPI GetStartupInfoA(LPSTARTUPINFOA lpStartupInfo)
{ {
lpStartupInfo->cb = sizeof(STARTUPINFOA);
lpStartupInfo->lpReserved = "<Reserved>"; LPSTARTUPINFOA startup;
lpStartupInfo->lpDesktop = "Desktop";
lpStartupInfo->lpTitle = "Title";
lpStartupInfo->cbReserved2 = 0; startup = ((LPSTARTUPINFOA )PROCESS_Current()->env_db->startup_info);
lpStartupInfo->lpReserved2 = NULL; /* must be NULL for VC runtime */ memcpy ( lpStartupInfo, startup, sizeof (STARTUPINFOA) );
lpStartupInfo->dwFlags = STARTF_USESTDHANDLES;
lpStartupInfo->hStdInput = (HANDLE)0; TRACE ( win32, "size: %ld\n"
lpStartupInfo->hStdOutput = (HANDLE)1; "\tlpReserverd: %s, lpDesktop: %s, lpTitle: %s\n"
lpStartupInfo->hStdError = (HANDLE)2; "\tdwX: %ld, dwY: %ld, dwXSize: %ld, dwYSize: %ld\n"
"\tdwFlags: %lx, wShowWindow: %x\n", lpStartupInfo->cb,
lpStartupInfo->lpReserved, lpStartupInfo->lpDesktop,
lpStartupInfo->lpTitle, lpStartupInfo->dwX,
lpStartupInfo->dwY, lpStartupInfo->dwXSize,
lpStartupInfo->dwYSize, lpStartupInfo->dwFlags,
lpStartupInfo->wShowWindow );
} }
/*********************************************************************** /***********************************************************************
@ -37,16 +43,30 @@ VOID WINAPI GetStartupInfoA(LPSTARTUPINFOA lpStartupInfo)
*/ */
VOID WINAPI GetStartupInfoW(LPSTARTUPINFOW lpStartupInfo) VOID WINAPI GetStartupInfoW(LPSTARTUPINFOW lpStartupInfo)
{ {
lpStartupInfo->cb = sizeof(STARTUPINFOW);
lpStartupInfo->lpReserved = HEAP_strdupAtoW(GetProcessHeap(),0,"<Reserved>");
lpStartupInfo->lpDesktop = HEAP_strdupAtoW(GetProcessHeap(), 0, "Desktop");
lpStartupInfo->lpTitle = HEAP_strdupAtoW(GetProcessHeap(), 0, "Title");
lpStartupInfo->cbReserved2 = 0; STARTUPINFOA startup;
lpStartupInfo->lpReserved2 = NULL; /* must be NULL for VC runtime */ GetStartupInfoA ( &startup );
lpStartupInfo->hStdInput = (HANDLE)0;
lpStartupInfo->hStdOutput = (HANDLE)1; lpStartupInfo->cb = sizeof(STARTUPINFOW);
lpStartupInfo->hStdError = (HANDLE)2; lpStartupInfo->lpReserved =
HEAP_strdupAtoW (GetProcessHeap(), 0, startup.lpReserved );
lpStartupInfo->lpDesktop =
HEAP_strdupAtoW (GetProcessHeap(), 0, startup.lpDesktop );
lpStartupInfo->lpTitle =
HEAP_strdupAtoW (GetProcessHeap(), 0, startup.lpTitle );
lpStartupInfo->dwX = startup.dwX;
lpStartupInfo->dwY = startup.dwY;
lpStartupInfo->dwXSize = startup.dwXSize;
lpStartupInfo->dwXCountChars = startup.dwXCountChars;
lpStartupInfo->dwYCountChars = startup.dwYCountChars;
lpStartupInfo->dwFillAttribute = startup.dwFillAttribute;
lpStartupInfo->dwFlags = startup.dwFlags;
lpStartupInfo->wShowWindow = startup.wShowWindow;
lpStartupInfo->cbReserved2 = startup.cbReserved2;
lpStartupInfo->lpReserved2 = startup.lpReserved2;
lpStartupInfo->hStdInput = startup.hStdInput;
lpStartupInfo->hStdOutput = startup.hStdOutput;
lpStartupInfo->hStdError = startup.hStdError;
} }
/*********************************************************************** /***********************************************************************