visual-c++

Visual C++ dump preprocessor defines

爱⌒轻易说出口 提交于 2020-06-23 06:05:11
问题 I'm trying to find out all the preprocessor defines of the Visual C++ compiler (MSVC). I can do gcc -dM -E - < /dev/null on GCC to dump all the preprocessor defines. Do we have something similar with the Visual C++ compiler compiler? I'm using Visual C++ 9.0. 回答1: There is no such command. However, MSDN (both online and offline) lists all the preprocessor defines, both Microsoft specific, standard defined and ANSI defines. 来源: https://stackoverflow.com/questions/4640267/visual-c-dump

how to Ignore certificate in HttpPOST request in WINAPI

十年热恋 提交于 2020-06-18 11:30:43
问题 I have a VC++ HttpPOST method which works fine for both 80 and 443 port. (on popular websites like google.com) Now when I connect to a secured host(172.17.9.93) having cgi script, Now when I connect using fiddler I get a warning of a invalid certificate and on accepting warning I am able to connect. same behaviour I have to do it in C++ which is to ignore the certificate using below flags SECURITY_FLAG_IGNORE_UNKNOWN_CA , INTERNET_FLAG_IGNORE_CERT_CN_INVALID and some combinations in function

Is there an alternative for visual C++ __declspec (property declaration attribute) in clang and gcc?

亡梦爱人 提交于 2020-06-14 07:51:08
问题 There is a Microsoft specific extension, which makes it possible to define property getters and setters like this: // declspec_property.cpp struct S { int i; void putprop(int j) { i = j; } int getprop() { return i; } __declspec(property(get = getprop, put = putprop)) int the_prop; }; int main() { S s; s.the_prop = 5; return s.the_prop; } Is there any way to define property declaration attribute with clang or gcc? If I search for __declspec , all I find is __declspec(dllexport) , but I am not

namespace system has no member Drawing in c++

a 夏天 提交于 2020-06-13 05:58:29
问题 when I am trying to use System::Drawing it giving error "namespace system has no member Drawing". Code: using namespace System::Drawing; 回答1: I think you didn't add the System::Drawing reference Goto Project -> References -> Common Properties -> Framework and References Click Add New References... button Under Assemblies -> Frameworks check System.Drawing and click ok. Update - 2017.8.22 You can click Project -> Add Reference... in Visual Studio 2015. 来源: https://stackoverflow.com/questions

catch(…) is not catching an exception, my program is still crashing

廉价感情. 提交于 2020-06-10 02:51:30
问题 I'm having a problem with a tester that my application crashes in initialization. I added more logging and exception handling but it still crashes with the generic "this program has stopped working" message rather than triggering my error handling. Given my main() looks like this and has catch(...) under what circumstances would this not be triggered? try{ simed::CArmApp app(0, cmd); for(bool done = false;!done;) { done = !app.frame(); } } catch(const std::runtime_error &e){

How to create multiple application instances in CANoe COM Server Interface

非 Y 不嫁゛ 提交于 2020-06-09 06:27:40
问题 I’m trying write client application to CANoe (application by Vector). I can fully control one application trough COM server objects but if i create a new application instance, gCanAppB, the original instance gCanAppA is closed. How can i tell to the COM Server, that open the new instance in new application window? My source code: Set gCanAppA = CreateObject( "CANoe.Application") Set gCanAppB = CreateObject( "CANoe.Application") gCanAppA.Open ("Easy.cfg") gCanAppA.CAPL.Compile gCanAppA

How to create multiple application instances in CANoe COM Server Interface

浪尽此生 提交于 2020-06-09 06:27:12
问题 I’m trying write client application to CANoe (application by Vector). I can fully control one application trough COM server objects but if i create a new application instance, gCanAppB, the original instance gCanAppA is closed. How can i tell to the COM Server, that open the new instance in new application window? My source code: Set gCanAppA = CreateObject( "CANoe.Application") Set gCanAppB = CreateObject( "CANoe.Application") gCanAppA.Open ("Easy.cfg") gCanAppA.CAPL.Compile gCanAppA

Credential provider not displayed for all users (Other user included)

旧街凉风 提交于 2020-05-28 04:58:10
问题 I am trying to show credential provider for all local and for other user(Domain users) in signing options but I am not able to. I developed this credential provider taking reference from here. I made following changes in _EnumerateCredentials and GetCredentialCount functions of CSampleprovider.cpp file. GetCredentialCount() HRESULT GetCredentialCount([out] DWORD* pdwCount, [out] DWORD* pdwDefault, [out] BOOL* pbAutoLogonWithDefault) { *pdwDefault = CREDENTIAL_PROVIDER_NO_DEFAULT;

Credential provider not displayed for all users (Other user included)

牧云@^-^@ 提交于 2020-05-28 04:57:27
问题 I am trying to show credential provider for all local and for other user(Domain users) in signing options but I am not able to. I developed this credential provider taking reference from here. I made following changes in _EnumerateCredentials and GetCredentialCount functions of CSampleprovider.cpp file. GetCredentialCount() HRESULT GetCredentialCount([out] DWORD* pdwCount, [out] DWORD* pdwDefault, [out] BOOL* pbAutoLogonWithDefault) { *pdwDefault = CREDENTIAL_PROVIDER_NO_DEFAULT;

wxWidgets setup in Microsoft Visual Studio 2017

家住魔仙堡 提交于 2020-05-25 07:38:37
问题 I've been trying to figure out for about 20 hours how to setup wxWidgets in Microsoft visual studio 2017. I've followed: https://wiki.wxwidgets.org/Microsoft_Visual_C%2B%2B_Guide https://raw.githubusercontent.com/wxWidgets/wxWidgets/WX_3_0_BRANCH/docs/msw/install.txt and other numerous websites on how to set it up. I've even followed some of the posts in this website like and youtube: How to set up wxWidgets 3.1.0 with Visual Studio 2015 I am literally stuck: I compiled it from source. And I