首页 > 解决方案 > uwp: desktop app, using "not allowed" APIs for app that will NOT be deployed via MS store. Does it work?

问题描述

I have a Windows desktop app, and I have a set of p/invoke APIs that I need to use, such as

[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]
static extern bool GlobalMemoryStatusEx([In, Out] MEMORYSTATUSEX lpBuffer);

I know this will fail certifications for MS store, but I don't care, since I do my own deployment. Having said that, the APIs work correctly in both Debug and Release.

Is there any issues I should be aware of - can this fail on my customer's machine?

标签: c#uwp

解决方案


虽然不建议这样做,但一般来说,如果您不想将包上传到 Store,这将起作用。


推荐阅读