tags:

views:

68

answers:

2

I'm wondering if is it there any easy, and common between .NET and Mono, way to retrieve machine statistics (eg. free space left, total memory, etc.). Under the .NET 2.0 profile I was able to identify DriveInfo class, but in the previous versions (1.0, 1.1) and Compact framework, which I would like to support, there's nothing like this. I already excluded the WMI API, since it's not supported by Mono and Compact Framework.

Anyone has ideas about it?

A: 

Mono supports the DriveInfo class. You should be able to get this information the same way in Mono as you do in Microsoft's .NET implementation.

Reed Copsey
I know that: my point is that DriveInfo is not supported by CF and 1.0/1.1 ...
Antonello
Yes - but it IS supported on Mono. On CF, you'll have to P/Invoke.
Reed Copsey
A: 

There's no way to do most of those things with .NET CF without resorting to P/Invoking Windows Mobile API. So you can strike out cross-platform compatibility with it right away.

As per making this work on .NET 1.1 (I'll pretend you did not mention 1.0...) - why? Do you have any Windows NT 4.0 clients that require this?

skolima