Asked by:
Calls to any function of my statically linked library calls unwanted APIs, what's wrong?

Question
-
.a file is statically linked to my project. (I have compiled it on Windows with mingw64)
i can include it in my Metro style native c++ application and i can call and perfectly run it.
The problem is, when i call any of the functions in this dll, my application fails the validation.
Functions in the .a library are innocent but there is something which calls forbidden APIs while reaching to the innocent function in my library.
An example to one of these innocent functions: only fills integer array with numbers for use later in the application.
What's the thing that i miss? Why my call to the innocent function triggers unused functions? I did not use any of these functions (failed functions can be seen below in the log)
<?xml version="1.0" encoding="UTF-16" ?> <WTT-Logger> <RTI ID="454638994" Machine="xxx" ProcessName="C:\Program Files\Windows Kits\8.0\App Certification Kit\TE.exe" ProcessID="3576" ThreadID="6656" BaseTime="2012:4:15 12:51:38:267" Frequency="1948736" /> <CTX ID="384048256" Current="WTTLOG" Parent="ROOT" /> <Machine Build="8250.00" Platform="AMD64" OS="Windows 8 Consumer Preview" ServicePack="" Version="6.2" BuildLab="winmain_win8beta_se" BuildDate="120330-1316" Language="Turkish" Config="n/a" CA="395597" LA="395841" > <rti id="454638994" /> <ctx id="384048256" /> </Machine> <Msg UserText="Test Authoring and Execution Framework v2.9k for x64" CA="396509" LA="396697" > <Data> <WexTraceInfo ThreadId="6656" ProcessId="3576" TimeStamp="142090194363"/> </Data> <rti id="454638994" /> <ctx id="384048256" /> </Msg> <RTI ID="3641750464" Machine="xxx" ProcessName="C:\Program Files\Windows Kits\8.0\App Certification Kit\TE.exe" ProcessID="3576" ThreadID="6820" BaseTime="2012:4:15 12:51:38:302" Frequency="1948736" /> <CTX ID="2229317740" Current="Microsoft.Windows.SoftwareLogo.Tests.SupportedApis.SupportedApis.ExecuteTest" Parent="WTTLOG" /> <StartTest Title="Microsoft.Windows.SoftwareLogo.Tests.SupportedApis.SupportedApis.ExecuteTest" TUID="" CA="464933" LA="465082" > <Data> <WexTraceInfo ThreadId="6820" ProcessId="3576" TimeStamp="142090263236"/> </Data> <rti id="3641750464" /> <ctx id="2229317740" /> </StartTest> <WexProperty BaseLvl="Msg" Priority="0x10000000" UserText="ClrRuntimeVersion" CA="465328" LA="465438" > <Data> <WexTraceInfo ThreadId="6820" ProcessId="3576" TimeStamp="142090263634"/><WexValue><![CDATA[4.0.30319.0]]></WexValue> </Data> <rti id="3641750464" /> <ctx id="2229317740" /> </WexProperty> <WexProperty BaseLvl="Msg" Priority="0x10000000" UserText="OriginalName" CA="465592" LA="465786" > <Data> <WexTraceInfo ThreadId="6820" ProcessId="3576" TimeStamp="142090264050"/><WexValue><![CDATA[C:\Program Files\Windows Kits\8.0\App Certification Kit\microsoft.windows.softwarelogo.tests.dll]]></WexValue> </Data> <rti id="3641750464" /> <ctx id="2229317740" /> </WexProperty> <WexProperty BaseLvl="Msg" Priority="0x10000000" UserText="TaefTestType" CA="466170" LA="466360" > <Data> <WexTraceInfo ThreadId="6820" ProcessId="3576" TimeStamp="142090264292"/><WexValue><![CDATA[Managed]]></WexValue> </Data> <rti id="3641750464" /> <ctx id="2229317740" /> </WexProperty> <WexProperty BaseLvl="Msg" Priority="0x10000000" UserText="OriginalName" CA="466573" LA="466679" > <Data> <WexTraceInfo ThreadId="6820" ProcessId="3576" TimeStamp="142090264878"/><WexValue><![CDATA[Microsoft.Windows.SoftwareLogo.Tests.SupportedApis.SupportedApis]]></WexValue> </Data> <rti id="3641750464" /> <ctx id="2229317740" /> </WexProperty> <WexProperty BaseLvl="Msg" Priority="0x10000000" UserText="OriginalName" CA="466935" LA="467075" > <Data> <WexTraceInfo ThreadId="6820" ProcessId="3576" TimeStamp="142090265250"/><WexValue><![CDATA[Microsoft.Windows.SoftwareLogo.Tests.SupportedApis.SupportedApis.ExecuteTest]]></WexValue> </Data> <rti id="3641750464" /> <ctx id="2229317740" /> </WexProperty> <RTI ID="2919870508" Machine="xxx" ProcessName="C:\Program Files\Windows Kits\8.0\App Certification Kit\TE.exe" ProcessID="3576" ThreadID="2772" BaseTime="2012:4:15 12:51:40:455" Frequency="1948736" /> <Warn File="" Line="-1" UserText="API GetConsoleScreenBufferInfo in kernel32.dll is not supported for this application type. Application5.exe calls this API." CA="4661972" LA="4662144" > <Data> <WexTraceInfo ThreadId="3752" ProcessId="7068" TimeStamp="142094459498"/> </Data> <rti id="2919870508" /> <ctx id="2229317740" /> </Warn> <Warn File="" Line="-1" UserText="API GetModuleHandleA in kernel32.dll is not supported for this application type. Application5.exe calls this API." CA="4668971" LA="4669059" > <Data> <WexTraceInfo ThreadId="3752" ProcessId="7068" TimeStamp="142094466684"/> </Data> <rti id="2919870508" /> <ctx id="2229317740" /> </Warn> <Warn File="" Line="-1" UserText="API GetStdHandle in kernel32.dll is not supported for this application type. Application5.exe calls this API." CA="4675039" LA="4675124" > <Data> <WexTraceInfo ThreadId="3752" ProcessId="7068" TimeStamp="142094473024"/> </Data> <rti id="2919870508" /> <ctx id="2229317740" /> </Warn> <Warn File="" Line="-1" UserText="API SetConsoleTextAttribute in kernel32.dll is not supported for this application type. Application5.exe calls this API." CA="4683146" LA="4683218" > <Data> <WexTraceInfo ThreadId="3752" ProcessId="7068" TimeStamp="142094481147"/> </Data> <rti id="2919870508" /> <ctx id="2229317740" /> </Warn> <EndTest Title="Microsoft.Windows.SoftwareLogo.Tests.SupportedApis.SupportedApis.ExecuteTest" TUID="" Result="Fail" Repro="" CA="5425507" LA="5425654" > <Data> <WexTraceInfo ThreadId="6820" ProcessId="3576" TimeStamp="142095224014"/> </Data> <rti id="3641750464" /> <ctx id="2229317740" /> </EndTest> <PFRollup Total="1" Passed="0" Failed="1" Blocked="0" Warned="0" Skipped="0" CA="5502924" LA="5503038" > <rti id="454638994" /> <ctx id="384048256" /> </PFRollup> </WTT-Logger>
Sunday, April 15, 2012 1:20 PM
All replies
-
Hello,
You can check if the APIs in your DLL can be supported in Metro App.
http://msdn.microsoft.com/en-us/library/windows/desktop/br205757.aspxBest regards,
JesseJesse Jiang [MSFT]
MSDN Community Support | Feedback to us
- Proposed as answer by Jesse Jiang Wednesday, April 25, 2012 7:03 AM
Monday, April 16, 2012 7:37 AM