Click here to Skip to main content
15,867,750 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
When I use

C++
ATLENSURE_SUCCEEDED


is used with in a code, the compiled binary (.exe) won't run on Windows Server 2012. That makes it harder to test on leased virtual desktop machines, as all virtual desktops are in fact machines with Windows Server 2012 and not any Windows Desktop OS. What could be the reason and how it be fixed, either by making a change in the code or by any pre-installation on the virtual server. The error is:
Quote:
Expression: __atl_condVal - Debug Assertion Failed!

Just to be clear, the same exe runs perfectly on any Windows desktop OS version from 7 to 10, but fails with this error on Windows Server 2012.

What I have tried:

Generally speaking I tested the same exe on Windows desktop versions and on Windows Server. I verified that there aren't any runtime libraries or debug libraries missing.
Posted
Comments
Jochen Arndt 11-Jun-18 8:07am    
What function has been called for which the return value is passed to ATLENSURE_SUCCEEDED()?

What is the value of that HRESULT?
Michael Haephrati 11-Jun-18 8:10am    
HRESULT hr = ::CoInitializeSecurity(
NULL,
-1,
NULL,
NULL,
RPC_C_AUTHN_LEVEL_DEFAULT,
RPC_C_IMP_LEVEL_IMPERSONATE,
NULL,
EOAC_NONE,
NULL);

ATLENSURE_SUCCEEDED(hr);
Richard MacCutchan 11-Jun-18 8:51am    
You still have not given us the error code.
Richard MacCutchan 11-Jun-18 8:54am    
At a guess (looking at CoInitializeSecurity function (COM)[^]) you need a value for the first parameter.
Michael Haephrati 15-Jun-18 7:22am    
I can't get an error code because when I run the executable on any Windows desktop OS, it never fails, however when I run it on a server, it crashes and since I don't have any IDE installed I can't get the error code.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900