mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=2909
This commit is contained in:
parent
af018fcc41
commit
52cdd2188a
|
@ -22,6 +22,7 @@
|
|||
#include "graphics_api.h"
|
||||
#include "app_ipc.h"
|
||||
#include "util.h"
|
||||
#include "win_util.h"
|
||||
//#include "win_idle_tracker.h"
|
||||
|
||||
//remove if there are windows problems
|
||||
|
@ -171,10 +172,6 @@ void SetMode(int mode) {
|
|||
|
||||
KillWindow();
|
||||
|
||||
FILE* f = fopen("setmode.txt", "a");
|
||||
fprintf(f, "mode: %d\n", mode);
|
||||
fclose(f);
|
||||
|
||||
current_graphics_mode = mode;
|
||||
|
||||
if (mode != MODE_HIDE_GRAPHICS) {
|
||||
|
@ -318,7 +315,7 @@ static VOID CALLBACK timer_handler(HWND, UINT, UINT, DWORD) {
|
|||
|
||||
DWORD WINAPI win_graphics_event_loop( LPVOID gi ) {
|
||||
MSG msg; // Windows Message Structure
|
||||
m_uEndSSMsg = RegisterWindowMessage(END_SS_MSG);
|
||||
m_uEndSSMsg = RegisterWindowMessage(STOP_SS_MSG);
|
||||
|
||||
// Register window class and graphics mode message
|
||||
reg_win_class();
|
||||
|
|
|
@ -9356,3 +9356,17 @@ David Jan 18 2004
|
|||
sched/
|
||||
file_upload_handler.C
|
||||
handle_request.C
|
||||
|
||||
David Jan 19 2004
|
||||
- use STOP_SS_MSG symbol instead of END_SS_MSG
|
||||
(these redundantly refered to the same string)
|
||||
- fixed buggy error-handling code for Win CreateProcess()
|
||||
|
||||
api/
|
||||
windows_opengl.C
|
||||
client/
|
||||
app.C
|
||||
win/
|
||||
win_util.h
|
||||
lib/util.C
|
||||
|
||||
|
|
16
client/app.C
16
client/app.C
|
@ -345,7 +345,6 @@ int ACTIVE_TASK::start(bool first_time) {
|
|||
STARTUPINFO startup_info;
|
||||
char slotdirpath[256];
|
||||
char cmd_line[512];
|
||||
int win_error;
|
||||
|
||||
memset( &process_info, 0, sizeof( process_info ) );
|
||||
memset( &startup_info, 0, sizeof( startup_info ) );
|
||||
|
@ -379,23 +378,12 @@ int ACTIVE_TASK::start(bool first_time) {
|
|||
&startup_info,
|
||||
&process_info
|
||||
)) {
|
||||
win_error = GetLastError();
|
||||
char *errorargs[] = {app_version->app_name,"","","",""};
|
||||
LPVOID lpMsgBuf;
|
||||
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM,
|
||||
NULL, win_error, 0, (LPTSTR)&lpMsgBuf, 0, errorargs
|
||||
);
|
||||
|
||||
state = PROCESS_COULDNT_START;
|
||||
result->active_task_state = PROCESS_COULDNT_START;
|
||||
if (win_error) {
|
||||
gstate.report_result_error(*result, win_error, "CreateProcess(): %s", (LPTSTR)&lpMsgBuf);
|
||||
LocalFree(lpMsgBuf);
|
||||
gstate.report_result_error(*result, ERR_EXEC, "CreateProcess() failed");
|
||||
msg_printf(wup->project, MSG_ERROR, "CreateProcess() failed");
|
||||
return ERR_EXEC;
|
||||
}
|
||||
msg_printf(wup->project, MSG_ERROR, "CreateProcess: %s", (LPCTSTR)lpMsgBuf);
|
||||
LocalFree(lpMsgBuf);
|
||||
}
|
||||
pid = process_info.dwProcessId;
|
||||
pid_handle = process_info.hProcess;
|
||||
thread_handle = process_info.hThread;
|
||||
|
|
|
@ -1,11 +1,28 @@
|
|||
// The contents of this file are subject to the BOINC Public License
|
||||
// Version 1.0 (the "License"); you may not use this file except in
|
||||
// compliance with the License. You may obtain a copy of the License at
|
||||
// http://boinc.berkeley.edu/license_1.0.txt
|
||||
//
|
||||
// Software distributed under the License is distributed on an "AS IS"
|
||||
// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
// License for the specific language governing rights and limitations
|
||||
// under the License.
|
||||
//
|
||||
// The Original Code is the Berkeley Open Infrastructure for Network Computing.
|
||||
//
|
||||
// The Initial Developer of the Original Code is the SETI@home project.
|
||||
// Portions created by the SETI@home project are Copyright (C) 2002
|
||||
// University of California at Berkeley. All Rights Reserved.
|
||||
//
|
||||
// Contributor(s):
|
||||
//
|
||||
|
||||
// function declarations
|
||||
int UtilGetRegKey(char *name, DWORD &keyval);
|
||||
int UtilSetRegKey(char *name, DWORD value);
|
||||
int UtilGetRegStr(char *name, char *str);
|
||||
int UtilSetRegStr(char *name, char *str);
|
||||
int UtilSetRegStartupStr(char *name, char *str);
|
||||
int UtilInitOSVersion( void );
|
||||
extern int UtilGetRegKey(char *name, DWORD &keyval);
|
||||
extern int UtilSetRegKey(char *name, DWORD value);
|
||||
extern int UtilGetRegStr(char *name, char *str);
|
||||
extern int UtilSetRegStr(char *name, char *str);
|
||||
extern int UtilSetRegStartupStr(char *name, char *str);
|
||||
extern int UtilInitOSVersion( void );
|
||||
|
||||
#define START_SS_MSG "BOINC_SS_START"
|
||||
#define STOP_SS_MSG "BOINC_SS_END"
|
||||
|
|
15
lib/util.C
15
lib/util.C
|
@ -504,3 +504,18 @@ int read_file_string(const char* pathname, string& result) {
|
|||
while (f.get(c)) result += c;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
// the following doesn't seem to work
|
||||
// TODO: fix it; use after e.g. CreateProcess() error
|
||||
//
|
||||
void windows_error_string(char* buf, int len) {
|
||||
strcpy(buf, "");
|
||||
LPVOID lpMsgBuf;
|
||||
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM,
|
||||
NULL, GetLastError(), 0, (LPTSTR)&lpMsgBuf, 0, NULL
|
||||
);
|
||||
safe_strncpy(buf, (LPCSTR)lpMsgBuf, len);
|
||||
LocalFree(lpMsgBuf);
|
||||
}
|
||||
#endif
|
Loading…
Reference in New Issue