We wrote a COM in-proc Server(dll)(say x.dll) which is dynamically linking to a library(say y.dll) which is using win32 API’s. We have observed a different behavior of the same win32 API when launched from windows8 Desktop Apps and Metro Apps.
When the COM in-proc Server dll(x.dll) is loaded from desktop Apps, all the win32 API in library(y.dll) are working fine.But when x.dll in launched from metroApps all the win32 API in y.dll are failing.
Is this the default behaviour for Windows8 win32 API ? It would be good if some one can provide me any documentation related to using win32 API in dll’s which can be launched from both desktop and MetroApps.
Thank You
Only a subset of the Windows API is available to a Windows Store app. The MSDN documentation for each API function specifies whether the function may be called from a Desktop app or from a Windows Store app. For example, the following appears at the bottom of the documentation for
GetProcAddress:This function may be called from both Desktop apps and Windows Store apps. If a function does not say that it is supported in a Windows Store app, it may not be called from a Windows Store app. For example,
LoadLibrarydoes not say that it is callable from a Windows Store app, so it cannot be called. (Note that while there are ways to call unsupported functions, doing so necessarily yields undefined behavior.)Also note that Windows Store apps run with low privileges and have restricted access to the system.