0

in the program I'm using there is this code telling me if the operating system is Embedded

public static bool IsEmbedded
    {
        get 
        {
           Scada.Windows.API.OSVERSIONINFO osvi2 = new Scada.Windows.API.OSVERSIONINFO();
           osvi2.dwOSVersionInfoSize = (uint)Marshal.SizeOf(typeof(Scada.Windows.API.OSVERSIONINFO));
           Scada.Windows.API.GetVersionEx(ref osvi2);
           return ((osvi2.wSuiteMask & (short)0x40) != 0);
        }
    }

what I have to do is use a similar code to figure out when I'm on Windows 10 Enterprise.

Thanks so much

fede186
  • 89
  • 8
  • You don't need similar code. You need to read the documentation of the method and check what the values it returns mean – Panagiotis Kanavos Oct 12 '17 at 11:54
  • Thanks for your answer. If I ask for help is because I tried to read it and I could not understand it well. Otherwise I would not have written in the forum. – fede186 Oct 12 '17 at 12:07
  • Read and understand *what*? What are you asking? What did you try? Did you google for [OSVERSIONINFO](https://msdn.microsoft.com/en-us/library/windows/desktop/ms724834(v=vs.85).aspx) ? There are quite a few duplicates as well, like [this one](https://stackoverflow.com/questions/32193855/c-check-if-windows-10) – Panagiotis Kanavos Oct 12 '17 at 12:08
  • BTW what you posted uses a `Scada.Windows` library. Did you check *its* documentation? – Panagiotis Kanavos Oct 12 '17 at 12:09
  • Duplicate question [here](https://stackoverflow.com/questions/2819934/detect-windows-version-in-net). Use [System.Environment.OSVersion](https://msdn.microsoft.com/en-us/library/system.environment.osversion(v=vs.110).aspx) – Panagiotis Kanavos Oct 12 '17 at 12:10
  • I asked to see if there was someone who had already made it. Also because at this time I do not have a windows 10 enterprise PC on which to try the code. – fede186 Oct 12 '17 at 12:12
  • Yes. Check the links – Panagiotis Kanavos Oct 12 '17 at 12:12

0 Answers0