Author: mturk
Date: Mon Jan 25 18:46:03 2010
New Revision: 902919
URL: http://svn.apache.org/viewvc?rev=902919&view=rev
Log:
Stage 2 of wsuexec
Modified:
commons/sandbox/runtime/trunk/src/main/native/configure
commons/sandbox/runtime/trunk/src/main/native/os/win32/subsys.c
commons/sandbox/runtime/trunk/src/main/native/port/wcslcat.c
commons/sandbox/runtime/trunk/src/main/native/port/wcslcpy.c
commons/sandbox/runtime/trunk/src/main/native/support/win32/wsuexec.c
Modified: commons/sandbox/runtime/trunk/src/main/native/configure
URL:
http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/configure?rev=902919&r1=902918&r2=902919&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/configure (original)
+++ commons/sandbox/runtime/trunk/src/main/native/configure Mon Jan 25 18:46:03
2010
@@ -579,7 +579,7 @@
varadds cppopts -DWIN32 -DWINNT -D_WIN32 -D_WINDOWS -D_WINNT
varadds cppopts -D_WIN32_WINNT=0x0501 -D_WIN32_IE=0x0600 -D$mcpu
-D__CC$bits
varadds cxxopts -TP
- varadds ldflags kernel32.lib advapi32.lib ws2_32.lib mswsock.lib
ole32.lib
+ varadds ldflags kernel32.lib advapi32.lib ws2_32.lib mswsock.lib
ole32.lib crypt32.lib
varadds ldflags shell32.lib rpcrt4.lib user32.lib gdi32.lib
userenv.lib wtsapi32.lib
varadds ldflags psapi.lib shlwapi.lib wldap32.lib netapi32.lib
iphlpapi.lib urlmon.lib
varadds shflags /NOLOGO /OPT:REF
Modified: commons/sandbox/runtime/trunk/src/main/native/os/win32/subsys.c
URL:
http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/win32/subsys.c?rev=902919&r1=902918&r2=902919&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/win32/subsys.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/win32/subsys.c Mon Jan 25
18:46:03 2010
@@ -35,6 +35,7 @@
* Session zero.
*/
+
#ifdef ACR_ENABLE_TEST
/* Rundll32 Test exports.
@@ -49,11 +50,11 @@
* Rundll32 is missing console, so redirection must be performed, and it
requires
* the short names for locating the .dll.
*/
-ACR_DECLARE(void) TestRunW(HWND hwnd, HINSTANCE hinst,
- LPWSTR lpszCmdLine, int nCmdShow)
+ACR_DECLARE(int) TestRunW(HINSTANCE hInstance, HINSTANCE hPrevInstance,
+ LPWSTR lpszCmdLine, int nCmdShow)
{
int rc = 0;
-
+ OutputDebugStringA("Running TestRunW");
if ((rc = ACR_Initialize(NULL))) {
fprintf(stderr, "Failed to initialize the ACR error=%d\n", rc);
fflush(stderr);
@@ -64,20 +65,20 @@
fflush(stderr);
goto cleanup;
}
-
fprintf(stdout, "Running TestRunW ...\n");
- fprintf(stdout, " HWND : %p\n", hwnd);
+ fprintf(stdout, " HINST : %p\n", hInstance);
fprintf(stdout, " show : %08x\n", nCmdShow);
fprintf(stdout, " cmdline: %S\n", lpszCmdLine);
fflush(stdout);
cleanup:
- ExitProcess(rc);
+ return rc;
}
-ACR_DECLARE(void) TestRunA(HWND hwnd, HINSTANCE hinst,
- LPSTR lpszCmdLine, int nCmdShow)
+
+ACR_DECLARE(int) TestRunA(HWND hwnd, HINSTANCE hinst,
+ LPSTR lpszCmdLine, int nCmdShow)
{
int rc = 0;
Modified: commons/sandbox/runtime/trunk/src/main/native/port/wcslcat.c
URL:
http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/port/wcslcat.c?rev=902919&r1=902918&r2=902919&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/port/wcslcat.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/port/wcslcat.c Mon Jan 25
18:46:03 2010
@@ -64,21 +64,21 @@
size_t dlen;
/* Find the end of dst and adjust bytes left but don't go past end */
- while (*d != '\0' && n-- != 0)
+ while (*d != L'\0' && n-- != 0)
d++;
dlen = d - dst;
n = siz - dlen;
if (n == 0)
return(dlen + wcslen(s));
- while (*s != '\0') {
+ while (*s != L'\0') {
if (n != 1) {
*d++ = *s;
n--;
}
s++;
}
- *d = '\0';
+ *d = L'\0';
return(dlen + (s - src)); /* count does not include NUL */
}
Modified: commons/sandbox/runtime/trunk/src/main/native/port/wcslcpy.c
URL:
http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/port/wcslcpy.c?rev=902919&r1=902918&r2=902919&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/port/wcslcpy.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/port/wcslcpy.c Mon Jan 25
18:46:03 2010
@@ -63,7 +63,7 @@
/* Copy as many bytes as will fit */
if (n != 0) {
while (--n != 0) {
- if ((*d++ = *s++) == '\0')
+ if ((*d++ = *s++) == L'\0')
break;
}
}
@@ -71,7 +71,7 @@
/* Not enough room in dst, add NUL and traverse rest of src */
if (n == 0) {
if (siz != 0)
- *d = '\0'; /* NUL-terminate dst */
+ *d = L'\0'; /* NUL-terminate dst */
while (*s++)
;
}