search for: lptstr

Displaying 8 results from an estimated 8 matches for "lptstr".

Did you mean: optstr
2013 Aug 29
5
[PATCH 1/6] Rationalise whitespace to 4 space indentation with no trailing spaces
...CNAME TEXT("RHSrvAny") -SERVICE_STATUS gSvcStatus; +SERVICE_STATUS gSvcStatus; HANDLE ghSvcStopEvent = NULL; -SERVICE_STATUS_HANDLE gSvcStatusHandle; +SERVICE_STATUS_HANDLE gSvcStatusHandle; VOID SvcInstall (void); -VOID WINAPI SvcCtrlHandler (DWORD); -VOID WINAPI SvcMain (DWORD, LPTSTR *); +VOID WINAPI SvcCtrlHandler (DWORD); +VOID WINAPI SvcMain (DWORD, LPTSTR *); VOID SvcReportEvent (LPTSTR); -VOID SvcInit (DWORD, LPTSTR *); +VOID SvcInit (DWORD, LPTSTR *); VOID ReportSvcStatus (DWORD, DWORD, DWORD); int main (int argc, char **a_argv) -{ +{ /* For compatibility...
2013 Aug 21
2
[PATCH 1/3] Rationalise whitespace to 4 space indentation with no trailing spaces
...CNAME TEXT("RHSrvAny") -SERVICE_STATUS gSvcStatus; +SERVICE_STATUS gSvcStatus; HANDLE ghSvcStopEvent = NULL; -SERVICE_STATUS_HANDLE gSvcStatusHandle; +SERVICE_STATUS_HANDLE gSvcStatusHandle; VOID SvcInstall (void); -VOID WINAPI SvcCtrlHandler (DWORD); -VOID WINAPI SvcMain (DWORD, LPTSTR *); +VOID WINAPI SvcCtrlHandler (DWORD); +VOID WINAPI SvcMain (DWORD, LPTSTR *); VOID SvcReportEvent (LPTSTR); -VOID SvcInit (DWORD, LPTSTR *); +VOID SvcInit (DWORD, LPTSTR *); VOID ReportSvcStatus (DWORD, DWORD, DWORD); int main (int argc, char **a_argv) -{ +{ /* For compatibility...
2005 Nov 26
1
Another patch of win32-service for nice startup.
...nError; static VALUE rbServiceStruct, rbServiceStatusStruct; +static HANDLE hStartEvent; static HANDLE hStopEvent; static SERVICE_STATUS_HANDLE ssh; static DWORD dwServiceState; @@ -33,6 +34,7 @@ { DWORD bRet; DWORD dwWaitRes; + int i; // Obtain the name of the service. LPTSTR lpszServiceName = lpszArgv[0]; @@ -46,6 +48,15 @@ rb_raise(cDaemonError,"RegisterServiceCtrlHandler failed"); } + // wait for sevice initialization + for(i=1;TRUE;i++) + { + if(WaitForSingleObject(hStartEvent, 1000) == WAIT_OBJECT_0) + break; + + SetTheSe...
2006 Sep 16
3
converting 16-bit samples in LPSTR to short
...g 16 bit mono sound samples using some Win32 API function calls. These function calls return the sound samples in an array of characters. My assumption is that this array of characters represents pairs of bytes that make up a short integer. I'm using the following code to convert the samples: LPTSTR *lpSaveBuffer; ...... for(j=0;j<nBytes;++J) { BYTE a = lpSaveBuffer[2*j]; // left byte BYTE b = lpSaveBuffer[2*j + 1]; // right byte short sample = (a << 8) | (b & 0xff); } I'm getting garbage as a result of this conversion. Any help would be appreciated. Thank...
2007 Aug 31
0
[ win32utils-Bugs-13560 ] Service dependencies has wierd string.
...Configuration uration n tensions ns Service e Service ce I debugged service.c and service.h and found something wrong. I modified the function "rb_get_dependencies" from service.h like following and it works fine. static VALUE rb_get_dependencies(LPTSTR lpDependencies){ VALUE v_dependencies = rb_ary_new(); if(lpDependencies){ TCHAR* pszDepend = 0; int i = 0; pszDepend = &lpDependencies[i]; while(*pszDepend != 0){ rb_ary_push(v_dependencies, rb_str_new2(pszDepend)); //i += _tcslen(lpD...
2006 Dec 17
0
FormatMessage issue in eventlog.rb - more clues
...ROM_SYSTEM | FORMAT_MESSAGE_ARGUMENT_ARRAY; hmod = LoadLibraryEx(dll, 0, LOAD_LIBRARY_AS_DATAFILE); printf("HMOD: %i\n", hmod); va_list[0] = "store application started"; rv = FormatMessage( flags, hmod, 0, 0, (LPTSTR)buf, sizeof(buf), va_list ); printf("RV: %i\n", rv); printf("BUF: %s\n", buf); FreeLibrary(hmod); return 0; } This will print "The operation completed successfully". Which, btw, is what GetLastError(39) returns. How that ends up...
2006 Dec 07
0
Fwd: win32-service problems with patch
...group; -static int cAdd; -static int cList; -static int cSize; - CRITICAL_SECTION csControlCode; // I happen to know from looking in the header file // that 0 is not a valid service control code @@ -39,7 +34,6 @@ static VALUE service_close(VALUE); void WINAPI Service_Main(DWORD dwArgc, LPTSTR *lpszArgv); void WINAPI Service_Ctrl(DWORD dwCtrlCode); -void ErrorStopService(); void SetTheServiceStatus(DWORD dwCurrentState,DWORD dwWin32ExitCode, DWORD dwCheckPoint, DWORD dwWaitHint); @@ -57,27 +51,27 @@ (LPHANDLER_FUNCTION)Service_Ctrl); if...
2017 Nov 09
10
Experiment on how to improve our temporary file handing.
Currently a power failure or other hard crash can cause lld leave a temporary file around. The same is true for other llvm tools. As an example, put a breakpoint in Writer.cpp:236 ("writeBuildId()") and restart the run a few times. You will get t.tmp43a735a t.tmp4deeabb t.tmp9bacdd3 t.tmpe4115c4 t.tmpeb01fff The same would happen if there was a fatal error between the