[Mono-list] CPUID??

Chris Howie cdhowie at gmail.com
Mon Aug 24 02:40:01 EDT 2009

On Wed, Aug 5, 2009 at 6:54 PM, Corscaria<ivier at hotmail.com> wrote:
> How would i get CPUID or any other hardware specific unique identifiers under
> mono? Normally i would get this from System.Management, but this isn't
> availible under mono. I am absolutely trying to aviod having to PInvoke an
> external library, as i dont want to, nor have the ability to compile a
> library for every OS mono runs on. I dont mind having to run different
> routine depending on wether it's mono or dotnet, just need it purely
> managed;

I am assuming you are inquiring specifically about Linux here.  The
ability to obtain the ID of the CPU(s) in a box is something that must
be supported by the kernel.  I do not think many stock distribution
kernels have this feature enabled, since it's not terribly useful in
the Linux world.

There may be other pieces of hardware you could look at, like hard
drives, but the way to obtain that info is likely do vary based on a
bunch of factors, like hardware vendors, Linux kernel version, Linux
kernel compilation options, and distribution.

> And incase you are wondering, i need it for a DRM scheme for my
> applications.

Implementing a DRM scheme in an IL-based language seems rather
pointless, given how easily IL is reverse-engineered.

Chris Howie

More information about the Mono-list mailing list