/      !"#$%&'()*+,-. None/ Suppress the 0 value of an 1! taken from the errors package /@23456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnop//NonewA ServiceControl is used in Handler functions. All control codes are defined here, but some can only be used with a  HandlerEx callback. Use convertSuccess to translate from a  to a m . Use convertAttempt to translate from a m to a .q2Marshal a ServiceAccept "out" to be used in C-landrCMarshall a DWORD "in" to be used in Haskell-land as a ServiceAccept stqru str stqruNone TThe control codes the service accepts and processes in its handler function (See HandlerFunction*). By default, all services accept the   value. To accept the  DEVICEEVENTN value, the service must register to receive device events by using the registerDeviceNotification function. OThe service can be stopped. This control code allows the service to receive  notifications.hThe service is notified when system shutdown occurs. This control code allows the service to receive 9 notifications. Note that only the system can send it.MSDN documentation says that this function is not supported on Windows Server 2003 or Windows XP/2000. The support status on other versions is unknown to me._The service can perform preshutdown tasks. This control code enables the service to receive 9 notifications. Note that only the system can send it.\The service can be paused and continued. This control code allows the service to receive  and   notifications.The service can reread its startup parameters without being stopped and restarted. This control code allows the service to receive  notifications.The service is a network component that can accept changes in its binding without being stopped and restarted. This control code allows the service to receive  , , , and  notifications.v2Marshal a ServiceAccept "out" to be used in C-landwCMarshall a DWORD "in" to be used in Haskell-land as a ServiceAcceptxThis function takes a m} and assumes it is a flagfield. Each bit is masked off and converted into a value. Any failures are silently discarded. yzvw{x| yz  yzvw{x|NoneThe current state of a service.}]State is stored as a DWORD value in memory. If an undocument value is encountered during a =4, there isn't any reasonable way to respond, so an  ErrorCall exception will be thrown. ~}~}None NoneVWin32 defines many types of services, but this binding only supports Win32OwnProcess.Do no write your own services of this type. Windows Vista and above prevent service processes from directly interacting with users.A  is either a  or a g running in the context of the LocalSystem account which is allowed to directly interact with users.1The service shares a process with other services.$The service runs in its own process.The service is a device driver. $The service is a file system driver.     None!*Contains status information for a service.#4The type of service. This binding only supports the  type.$!The current state of the service.%See   for details on this field.&The error code the service uses to report an error that occurs when it is starting or stopping. To return an error code specific to the service, the service must set this value to  to indicate that the 'I member contains the error code. The service should set this value to 1 when it is running and on normal termination.'A service-specific error code that the service returns when an error occurs while the service is starting or stopping. This value is ignored unless the & member is set to .;This binding does not support service-specific error codes.(6The check-point value the service increments periodically to report its progress during a lengthy start, stop, pause, or continue operation. For example, the service should increment this value as it completes each step of its initialization when it is starting up. The user interface program that invoked the operation on the service uses this value to track the progress of the service during a lengthy operation. This value is not valid and should be zero when the service does not have a start, stop, pause, or continue operation pending.)'The estimated time required for a pending start, stop, pause, or continue operation, in milliseconds. Before the specified amount of time has elapsed, the service should make its next call to the SetServiceStatus function with either an incremented dwCheckPoint value or a change in $(. If the amount of time specified by ) passes, and ( has not been incremented or $v has not changed, the service control manager or service control program can assume that an error has occurred and the service should be stopped. However, if the service shares a process with other services, the service control manager cannot terminate the service application because it would have to terminate the other services sharing the process as well.!"#$%&'()!"#$%&'() !"#$%&'() NoneNone*The service dispatcher thread will call each function of this type that you provide. The first argument will be the name of the service. Any additional command-line parameters will appear in the second argument.$Each of these functions should call registerServiceCtrlHandlerf to register a function to handle incoming commands. It should then set the service's status to , and specify that no controls will be accepted. At this point the function may perform any other initialization steps before setting the service's status to -. All of this should take no more than 100ms.+NA handler function is registered with the service dispatcher thread from a *. The first argument is a  returned from calling registerServiceCtrlHandlerZ. The second argument represents the command this service has been directed to perform.,6Retrieves the current status of the specified service.kRegister an handler function to be called whenever the operating system receives service control messages.-RUpdates the service control manager's status information for the calling service..Register a callback function to initialize the service, which will be called by the operating system immediately. startServiceCtrlDispatcher will block until the provided callback function returns.MSDN documentation: Connects the main thread of a service process to the service control manager, which causes the thread to be the service control dispatcher thread for the calling process.*+,MSDN documentation: A handle to the service. This handle is returned by the OpenService or the CreateService function, and it must have the SERVICE_QUERY_STATUS access right. For more information, see Service Security and Access Rights.This function will throw an  when the internal Win32 call returnes an error condition. MSDN lists the following exceptions, but others might be thrown as well: BThe handle does not have the SERVICE_QUERY_STATUS access right.The handle is invalid.UThe name of the service. According to MSDN documentation this argument is unused in  type services, which is the only type supported by this binding. Even so, it is recommended that the name of the service be used.MSDN description: The name of the service run by the calling thread. This is the service name that the service control program specified in the CreateService function when creating the service.vA Handler function to be called in response to service control messages. Behind the scenes this is translated into a  HandlerEx type handler.This function will throw an  when the internal Win32 call returnes an error condition. MSDN lists the following exceptions, but others might be thrown as well: GThe service entry was specified incorrectly when the process called ..-MSDN documentation: A handle to the status information structure for the current service. This handle is returned by the RegisterServiceCtrlHandlerEx function.MSDN documentation: A pointer to the SERVICE_STATUS structure the contains the latest status information for the calling service.This function will throw an  when the internal Win32 call returnes an error condition. MSDN lists the following exceptions, but others might be thrown as well: 2The specified service status structure is invalid. The specified handle is invalid..UThe name of the service. According to MSDN documentation this argument is unused in  type services, which is the only type supported by this binding. Even so, it is recommended that the name of the service be used.MSDN description: The name of the service run by the calling thread. This is the service name that the service control program specified in the CreateService function when creating the service. waitHintfThe estimated time required for a pending start, stop, pause, or continue operation, in milliseconds.This is a callback function that will be called by the operating system whenever the service is started. It should perform service initialization including the registration of a handler function. MSDN documentation gives conflicting advice as to whether this function should return before the service has entered the stopped state. In the official example the service main function blocks until the service is ready to stop.This function will throw an  when the internal Win32 call returnes an error condition. MSDN lists the following exceptions, but others might be thrown as well: This error is returned if the program is being run as a console application rather than as a service. If the program will be run as a console application for debugging purposes, structure it such that service-specific code is not called when this error is returned.SThe specified dispatch table contains entries that are not in the proper format."The process has already called startServiceCtrlDispatcher. Each process can call startServiceCtrlDispatcher only one time./  !"#$%&'()*+,-./+*  !"#$%&'() ,-.*+,-.   !"#$%& ' ( ) * + , - - . / 0 1 2 3 456789:;<=;<>;?@;AB;AC;AD;AEFGH;IJ;IK;IL;IM;?NFGO;PQ;PR;PS;PT;UV;UWXYZXY[XY\XY]XY^XY_XY`XYaXYbXYcXYdXYeXYfXYgXYhXYiXYjXYkXYlXYmXYnXYoXYpXYqXYrXYsXYtXYuXYvXYwXYxXYyXYzXY{XY|XY}XY~XYXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYXYXY;U;;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;A;;;;;;;; ; ; ; ; ;;;;;;;;;;;;;;;;; ;!;";#;$;%;&;';(;);*;+;,;-;./;.0;.1;.2;.3;.4;.5;.6;.7;.8;9:;9;;9<;9=;9>;9?;9@;9A;9B;CD;CE;CF;CG;CH;IJ;IK;IL;IM;IN;IO;IP;Q;R;S;T;U;V;W;X;Y;Z;[\;[];[^;[_;[`;[a;[b;[c;[d;?e;?f;?g;?h;Ui;Uj;Uk;Ul;Um;Un;Uo;Up;Pq;Pr;Ps;tu;tv;tw;tx;ty;tz;t{;t|;t};t~;t;t;t;t;t;t;t;t;t;t;t;t;t;t;t;t;t;t;                   Win32-services-0.3System.Win32.ServicesImportSystem.Win32.Services.ControlSystem.Win32.Services.AcceptC PreshutdownSystem.Win32.Services.State System.Win32.Services.TableEntrySystem.Win32.Services.TypeSystem.Win32.Services.StatusSystem.Win32.Services.RawServiceControlStopShutdown PreShutdownPause ParamChange NetBindRemove NetBindEnableNetBindDisable NetBindAdd InterrogateContinue ServiceAccept AcceptStopAcceptShutdownAcceptPreshutdownAcceptPauseContinueAcceptParamChangeAcceptNetBindChange ServiceStateStopped StopPending StartPendingRunningPaused PausePendingContinuePending ServiceTypeServiceInteractiveProcessWin32ShareProcessWin32OwnProcess KernelDriverFileSystemDriver ServiceStatus serviceType currentStatecontrolsAccepted win32ExitCodeserviceSpecificExitCode checkPointwaitHintServiceMainFunctionHandlerFunctionqueryServiceStatussetServiceStatusstartServiceCtrlDispatcherhushbase Data.EitherLeftEither GHC.Stable newStablePtrControl.Applicative<*>pure Alternative Applicativeghc-prim GHC.TypesIntGHC.IntInt8Int16Int32Int64 StablePtrWordGHC.WordWord8Word16Word32Word64GHC.PtrPtrFunPtr Win32-2.3.0.2System.Win32.TypesdwordsToDdwordddwordToDwordsfailUnlessSuccessOr failIfZerofailIf_iNVALID_HANDLE_VALUEnullFinalHANDLE nullHANDLE handleToWordnewForeignHANDLE newTStringpeekTStringLen peekTStringwithTStringLen withTString numToMaybemaybeNum ptrToMaybemaybePtr c_maperrnodeleteObjectFinaliser localFree getLastErrorgetErrorMessagelOWORDhIWORDcastUINTPtrToPtrcastPtrToUINTPtrmAKELCIDlANGIDFROMLCIDsORTIDFROMLCID mAKELANGID pRIMARYLANGID sUBLANGIDBOOLBYTEUCHARUSHORTUINTINTWORDDWORDLONGFLOAT LARGE_INTEGERUINT_PTRDDWORDMbStringMbINTATOMWPARAMLPARAMLRESULTSIZE_TMbATOMHRESULTAddrLPVOIDLPBOOLLPBYTEPUCHARLPDWORDLPSTRLPCSTRLPWSTRLPCWSTRLPTSTRLPCTSTRLPCTSTR_MbLPVOIDMbLPCSTR MbLPCTSTRTCHARHANDLE ForeignHANDLEHKEYPKEYMbHANDLE HINSTANCE MbHINSTANCEHMODULE MbHMODULELCIDLANGIDSortID SubLANGID PrimaryLANGIDnullPtrWin32-errors-0.2.2.1System.Win32.Error.ForeignfailWitherrorWinfailUnlessSuccess failIfNullfailIf failIfFalse_System.Win32.Error.TypestryWin32 fromDWORD systemMessageerrCodefunctionWin32ExceptiontoDWORDInvalidHandleValueSuccess FileNotFound PathNotFound AccessDenied InvalidHandle InvalidData InvalidDriveCurrentDirectory NoMoreFilesCallNotImplementedMoreData NoMoreItemsServiceAlreadyRunningServiceDisabledServiceDoesNotExistServiceCannotAcceptCtrlServiceNotActiveFailedServiceControllerConnectExceptionInServiceServiceSpecificErrorServiceNotInExeRPCSServerUnavailableRPCSServerTooBusyNotAReparsePointDhcpSubnetNotPresentDhcpElementCantRemoveDhcpOptionNotPresent DhcpJetErrorDhcpNotReservedClientDhcpReservedClientDhcpIprangeExistsDhcpReservedipExistsDhcpInvalidRangeDhcpIprangeConvIllegalScopeRangePolicyRangeConflictDhcpFoIprangeTypeConvIllegalOtherErrCodeGHC.ForeignPtr ForeignPtroptionalliftA3liftA2liftA<**><**>manysome<|>emptygetConstConst unwrapMonad WrapMonad WrappedMonad unwrapArrow WrapArrow WrappedArrow getZipListZipList Data.Functor<$>Foreign.Marshal.PoolpooledNewArray0pooledNewArray pooledNewpooledReallocArray0pooledReallocArraypooledMallocArray0pooledMallocArraypooledReallocBytes pooledReallocpooledMallocBytes pooledMallocwithPoolfreePoolnewPoolPoolForeign.Marshal.Errorvoid throwIfNull throwIfNeg_ throwIfNegthrowIf_throwIfForeign.Marshal.Array advancePtr lengthArray0 moveArray copyArray withArrayLen0 withArray0 withArrayLen withArray newArray0newArray pokeArray0 pokeArray peekArray0 peekArray reallocArray0 reallocArray allocaArray0 allocaArray mallocArray0 mallocArrayForeign.Marshal.Utils moveBytes copyByteswithMany maybePeek maybeWithmaybeNewtoBoolfromBoolwithnewForeign.Marshal.Allocfree reallocBytesreallocallocaBytesAligned allocaBytesalloca mallocBytesmalloc finalizerFreeForeign.ForeignPtr.ImpmallocForeignPtrArray0mallocForeignPtrArraynewForeignPtrEnvwithForeignPtr newForeignPtr Foreign.Ptr intPtrToPtr ptrToIntPtr wordPtrToPtr ptrToWordPtrfreeHaskellFunPtrWordPtrIntPtrfinalizeForeignPtrcastForeignPtrtouchForeignPtrnewForeignPtr_addForeignPtrFinalizerEnvaddForeignPtrFinalizermallocForeignPtrBytesmallocForeignPtr FinalizerPtrFinalizerEnvPtrForeign.Storablepokepeek pokeByteOff peekByteOff pokeElemOff peekElemOff alignmentsizeOfStorablecastPtrToStablePtrcastStablePtrToPtrdeRefStablePtr freeStablePtrcastPtrToFunPtrcastFunPtrToPtr castFunPtr nullFunPtrminusPtralignPtrplusPtrcastPtr byteSwap64 byteSwap32 byteSwap16 Data.BitspopCountDefaulttestBitDefault bitDefaultpopCountrotateRrotateL unsafeShiftRshiftR unsafeShiftLshiftLisSignedbitSize bitSizeMaybetestBit complementBitclearBitsetBitbitzeroBitsrotateshift complementxor.|..&.Bits finiteBitSize FiniteBitsGHC.Base<$marshOutmarshInpeekServiceControlpokeServiceControl unsupportedunflagpeekServiceAcceptpokeServiceAcceptflag$fStorableServiceStatepDWORDServiceTableEntry serviceName serviceProcSERVICE_MAIN_FUNCTIONnullSTE$fStorableServiceTableEntry$fStorableServiceTypepCApSSECpCPpWHpSTpCSpEC$fStorableServiceStatusHANDLER_FUNCTION_EXc_StartServiceCtrlDispatcherc_SetServiceStatusc_RegisterServiceCtrlHandlerExc_QueryServiceStatushandlerToFunPtr smfToFunPtrregisterServiceCtrlHandlerExtoSMF toHandlerEx