GnuPG 1.1.90 released

Keith Ray keith at nullify.org
Mon Jul 1 23:52:01 CEST 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoting Werner Koch <wk at gnupg.org>:

> On Mon,  1 Jul 2002 11:29:33 -0500, Keith Ray said:
> 
> > gpg: NOTE: you should run 'diskperf -y' to enable the disk statistics
> 
> > Please fix your header files in Mingw32/CPD.
> 
> Obviously the IOCTL_DISK_PERFORMANCE on your box is buggy in that it
> does not accept a shorter structure which old programs will definitily
> have.

Unless you are trying to imply that Microsoft's Platform SDK is wrong and
yours is right, even though your library calls fail on Windows 2000, it
would reason that the problems lies in your code, not Microsoft's.

> This is what I current use:
> 
> typedef struct _DISK_PERFORMANCE { 
>   LARGE_INTEGER BytesRead; 
>   LARGE_INTEGER BytesWritten; 
>   LARGE_INTEGER ReadTime; 
>   LARGE_INTEGER WriteTime; 
>   DWORD ReadCount; 
>   DWORD WriteCount; 
>   DWORD QueueDepth; 
> } DISK_PERFORMANCE ; 

It should be:

typedef struct _DISK_PERFORMANCE {
        LARGE_INTEGER BytesRead;
        LARGE_INTEGER BytesWritten;
        LARGE_INTEGER ReadTime;
        LARGE_INTEGER WriteTime;
        LARGE_INTEGER IdleTime;
        DWORD ReadCount;
        DWORD WriteCount;
        DWORD QueueDepth;
        DWORD SplitCount;
        LARGE_INTEGER QueryTime;
        DWORD   StorageDeviceNumber;
        WCHAR   StorageManagerName[8];
} DISK_PERFORMANCE, *PDISK_PERFORMANCE;

But the real problem lies in your LARGE_INTEGER.  You use:

typedef struct _LARGE_INTEGER {
  DWORD LowPart;
  LONG  HighPart;
} LARGE_INTEGER, *PLARGE_INTEGER;

The correct version is:

typedef union _LARGE_INTEGER {
    struct {
        DWORD LowPart;
        LONG HighPart;
    };
    struct {
        DWORD LowPart;
        LONG HighPart;
    } u;
    LONGLONG QuadPart;
} LARGE_INTEGER;

> I don't have any newer defintion and even if you can provide me with
> one I am not sure whether older NT versions will still work.
> 
> Well it might be a more simpler problem; adding a getlasterr might
> give sime clues.  I can't test it here.

I did, a month ago.  Try:

http://lists.gnupg.org/pipermail/gnupg-devel/2002-May/007155.html

or 

"The data area passed to a system call is too small."

  -- Keith

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7a-nr2 (Windows 2000) - GPGshell v2.30

iD8DBQE9IMEGBxrjkHkmmhIRAsCKAJ9YINBl9cn7T28jEqxls/BvLz8VzgCeMpxX
LvhgXrWhz23G4fEMT0jz7O8=
=v3og
-----END PGP SIGNATURE-----




More information about the Gnupg-devel mailing list