LoadLibrary error 487 (was Re: Please test latest developer snapshot)

Corinna Vinschen corinna-cygwin@cygwin.com
Wed Mar 2 11:48:00 GMT 2011


Hmpf...

On Mar  2 12:07, Corinna Vinschen wrote:
> @@ -752,24 +773,33 @@ hires_ms::resolution ()
>  {
>    if (!minperiod)
>      {
> -      /* Try to empirically determine current timer resolution */
> -      int priority = GetThreadPriority (GetCurrentThread ());
> -      SetThreadPriority (GetCurrentThread (), THREAD_PRIORITY_TIME_CRITICAL);
> -      DWORD period = 0;
> -      for (int i = 0; i < 4; i++)
> +      NTSTATUS status;
> +      ULONG coarsest, finest, actual;
> +
> +      status = NtQueryTimerResolution (&coarsest, &finest, &actual);
> +      if (NT_SUCCESS (status))
> +	minperiod = (UINT) actual;

	minperiod = (UINT) actual / 10000L;


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat



More information about the Cygwin-developers mailing list