Displaying 8 results from an estimated 8 matches for "hthread".
Did you mean:
thread
2005 Nov 26
1
Another patch of win32-service for nice startup.
...t(hStartEvent, 1000) == WAIT_OBJECT_0)
+ break;
+
+ SetTheServiceStatus(SERVICE_START_PENDING, 0, i, 1000);
+ }
+
// The service has started.
SetTheServiceStatus(SERVICE_RUNNING, NO_ERROR, 0, 0);
@@ -241,9 +252,9 @@
}
#endif
- // Create Thread for service main
- hThread = CreateThread(NULL,0,ThreadProc,0,0,&ThreadId);
- if(hThread == INVALID_HANDLE_VALUE){
+ // Create the event to signal the service to start.
+ hStartEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
+ if(hStartEvent == NULL){
strcpy(error,ErrorDescription(GetLastError()));...
2006 Dec 07
0
Fwd: win32-service problems with patch
...ssage, so that the threads would be cleaned up and etc.
* ErrorStopService removed because it was abused - called when it didn''t
make sense. Instead, I explicitly put in error handling and set
hStopEvent or set service status appropriately. Probably could still be
better.
* Waiting for hThread to exit AFTER closing hStopEvent (which might be
waiting on hStopEvent)
* the state SHOULD == RUNNING when service_main starts (I had a problem
where it was 0).
* EventHookHash was a global variable that Ruby didn''t know about, so it
was being garbage collected before the process termina...
2009 Apr 07
2
Running an R script from Delphi 7
...False, CREATE_NEW_PROCESS_GROUP+NORMAL_PRIORITY_CLASS, nil, nil,
StartInfo, proc_info);
if (CreateOK) then begin
WaitForSingleObject (proc_info.hProcess, INFINITE);
GetExitCodeProcess(proc_info.hProcess, ExitCode);
Result := True
end;
CloseHandle(proc_info.hThread);
CloseHandle(proc_info.hProcess);
end;
Now it seems to hang on the call on WaitForSingleObject toward the end.
My current version of R is 2.8.1 if that is relevant. Does anybody
have any suggestions?
Tom
2010 Sep 20
1
Dynamic forking in Win32
...try point */
ctx.Eax = (DWORD)v + exe->peXH->addressOfEntryPoint;
}
printf("********> EIP = %X\n", (uint)ctx.Eip);
printf("********> EAX = %X\n", (uint)ctx.Eax);
SetThreadContext(pi.hThread, &ctx);
ResumeThread(pi.hThread);
printf("Process resumed (PID = %d).\n",
(uint)pi.dwProcessId);
}
else {
ErrorExit("WriteProcessMemory failed\n");
TerminatePro...
2006 Dec 04
8
Calling R functions in Delphi
Hello All,
We would like to call quantile() function from the R-package STATS in a
Delphi program. If this is possible, could anyone provide us with an
example?
Thanks in advance.
--Anna
-----------------------------------------
Anna Belova
Abt Associates Inc.
4800 Montgomery Ln, St 600
Bethesda, MD-20814
phone: 301-347-5304
fax: 301-652-7530
http://www.abtassociates.com/environment
2010 Mar 07
1
[LLVMdev] Virtual OS
...I have started a hobby project to create a virtual OS library (jos). The idea was to create a set of C API's for operating system specific tasks
i.e. File IO, threading and etc. For example:
typedef jos_handle jos_thread;
jos_thread jos_thread_create(...);
void jos_thread_destroy( jos_thread hThread );
...
The idea as a whole was to have this library at runtime and use llvm to
dynamically bind to it during execution of the user programs. So the Low
Level Virtual Machine will have very low level virtualization of the
operating system too.
The questions that I have are the following:
* I...
2012 Feb 20
4
Workarounds for Splinter Cell: Conviction
...he raw input patch. (http://dl.dropbox.com/u/6901628/raw3.patch)
in wine source dir, do:
# patch -p1 < ~/Downloads/raw3.patch
2. With your favorite editor, open "wine-1.4-rc3/dlls/kernel32/thread.c" and find the following piece of code:
BOOL WINAPI SetThreadPriorityBoost(
HANDLE hthread, /* [in] Handle to thread */
BOOL disable) /* [in] TRUE to disable priority boost */
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
Comment out (or delete) the SetLastError line and change the return value to TRUE. (the FALSE statement cause the ASSERT ret() failure some...
2011 Oct 06
2
[LLVMdev] [Patch] Build failure on Windows+MinGW (GCC and Clang)
...different kind of symbol
static fpStackWalk64 StackWalk64;
^
M:/Development/mingw64/bin/../lib/clang/3.0/../../../x86_64-w64-mingw32/include\psdk_inc/_dbg_common.h:269:20:
note: previous definition is here
WINBOOL IMAGEAPI StackWalk64(DWORD MachineType,HANDLE hProcess,HANDLE
hThread,LPSTACKFRAME64 StackFrame,PVOID
ContextRecord,PREAD_PROCESS_MEMORY_ROUTINE64
ReadMemoryRoutine,PFUNCTION_TABLE_ACCESS_ROUTINE64
FunctionTableAccessRoutine,PGET_MODULE_BASE_ROUTINE64
^
In file included from M:\Development\Source\LLVM\lib\Support\Signals.cpp:33:
M:\Development\Sour...