[Bug 3260] Get Starforce copy protection working perfectly [metabug].

Wine Bugs wine-bugs at winehq.org
Wed May 23 15:56:36 CDT 2007


http://bugs.winehq.org/show_bug.cgi?id=3260





------- Additional Comments From focht at gmx.net  2007-23-05 15:56 -------
Hello again,

while you're bugfixing QueryServiceConfigW() could you please add the following
to SetServiceStatus():

--- snip dlls/advapi32/service.c ---

/* Return the corresponding text for service status */
static inline LPCSTR service_status_to_string( DWORD Status)
{
    switch( Status)
    {
      case SERVICE_STOPPED:          return "stopped";
      case SERVICE_START_PENDING:    return "start pending";
      case SERVICE_STOP_PENDING:     return "stop pending";
      case SERVICE_RUNNING:          return "running";
      case SERVICE_CONTINUE_PENDING: return "continue pending";
      case SERVICE_PAUSE_PENDING:    return "pause pending";
      case SERVICE_PAUSED:           return "paused";
      default:                       return "unknown";
    }
}

BOOL WINAPI
SetServiceStatus( SERVICE_STATUS_HANDLE hService, LPSERVICE_STATUS lpStatus )
{
  ...

    if (service)
    {
        memcpy( &service->status, lpStatus, sizeof(SERVICE_STATUS) );
        TRACE("Set service status to %d (%s)\n",service->status.dwCurrentState,
             service_status_to_string(service->status.dwCurrentState));
     }
  ..
}
--- snip dlls/advapi32/service.c ---

Printing out the actual service state in human readable format for trace.
It is absolutely annoying looking up the status definitions every time.

Regards


-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the wine-bugs mailing list