WPD Service api implimentation (Status Service) to get free space on WPD device

400 views Asked by At

I want to get the free space on the WPD device. I am trying to implement the WPDServiceApi. I am currently implementing the status service of WPD services. i picked up the the code samples from Windows7DEK. There are lots of type mismatches coming into existence during compilation. I am not able to build that sample at all. Initially there were a lot of missing includes which i have resolved successfully. Now i am getting type mismatches like (PSLGUID) was expected and sample is just sending (GUID) type parameter. This is just a random example. Anyone have any experience on status service? i just want to get the free space on the device.

1

There are 1 answers

0
Aid Vllasaliu On

I've been working with such project recently, but in Delphi.

Please look at this MSDN article.

It says that WPD Storage Properties supports the following storage properties.

Where WPD_STORAGE_CAPACITYreturns the capacity of the device in BYTES.

I've used this file as a reference before, it's in Python, but easily undarstandable.

It is part of the Calibre source code.