I am trying to use my own API method ( GetNativeSystemInfo), which is marked as supported for both phone and desktop applications in Windows 8.1. In the documentation, she is listed as living in kernel32.dll. Big! So, my first P / Invoke attempt looked like this:
[DllImport("kernel32.dll", CharSet = CharSet.Unicode, ExactSpelling = false, PreserveSig = true)]
private static extern void GetNativeSystemInfo(ref SYSTEM_INFO lpSysInfo);
Unfortunately, this does not work on real devices - kernel32 was not found! As it happens, there is kernelBase.dll, and therefore, my second attempt:
[DllImport("kernelBase.dll", CharSet = CharSet.Unicode, ExactSpelling = false, PreserveSig = true)]
private static extern void GetNativeSystemInfo(ref SYSTEM_INFO lpSysInfo);
While this works fine on my phone, this leads to the completion of the certification of the application; the method name and "kernelBase.dll" do not seem to be white.
Is this WACK surveillance or a bug that makes this API unusable in Store apps? My goal is to get information about the running processor (architecture, type, etc.), and I would prefer not to go to C ++ for something so simple. If this API is not practical, is there any other way to get this information?
source
share