c++builder

Is Static link of DLL (using *.lib) possible from code only (without add to project, something like #pragma link “…”)?

故事扮演 提交于 2021-01-29 05:54:40
问题 I am upgrading my preexisting CAD/CAM project (quite big one > 10MByte of code) and have to add some special measuring equipment. The problem is I have more than one supplier of the measuring system (although is already decided which one to use) and I want to configure them (using #define in case vendor is changed in future) with code to use only selected device type. So I have something like: #define use_vendor1 //#define use_vendor2 //#define use_vendor3 and some of the vendors APIs require

How to comment out chunk of code in multi-line macro?

泄露秘密 提交于 2021-01-29 05:37:39
问题 I have a complex multi line macro code in C++ (that process some geometry and computes its physical properties in RT) which is used many times and can not be converted to function (without huge space and performance hits). The problem is I sometimes need to configure the code inside disabling parts of code (in compile time for specific tasks/machines) something like this: #define some_macro \ bla; \ bla; \ if (0) \ { \ bla; \ bla; \ bla; \ } \ bla; As you can see this leads to multiples of

Several errors during building shockwave ActiveX(Flash) in C++ Builder 2010

邮差的信 提交于 2021-01-29 04:35:30
问题 I have found one site where there is an instruction on how to build Shockwave ActiveX in C++ Builder but with errors. It comes from Chinese ... http://hi.baidu.com/luoshupeng/blog/item/c5bdaf446aed0988b3b7dc20.html Does anyone know how to build ShockWave ActiveX in C++ builder 2010 as I had a transition from c++ builder 6 to c++ builder 2010 and much used to it, however it's possible to build it in c++ builder 6. Errors are smth like these:::: Checking project dependencies... Compiling

IHTMLDocument2 and Internet Explorer 11 changes on Windows 7

纵然是瞬间 提交于 2021-01-28 00:15:57
问题 I use TWebBrowser to have HTML editor in my application and of course it depends on version of Internet Explorer installed. I noticed after installation of the brand new Internet Explorer 11 on Windows 7 that my editor has changed. Paragraphs no longer seem to have same HTML code. HTML generated before when I pressed enter key: <P> </P> HTML generated now: <P><BR></P> This gives me additional line in my editor which doesn't look right. <P> itself has a new line, <BR> is completely useless

Why does example code access deleted memory in IUnknown?

时光总嘲笑我的痴心妄想 提交于 2020-07-23 04:56:24
问题 Quite a number of examples when using interfaces such as IUnknown , in this example IDocHostUIHandler but it doesn't really matter - use code similar to this: class TDocHostUIHandlerImpl : public IDocHostUIHandler { private: ULONG RefCount; public: TDocHostUIHandlerImpl():RefCount(0){ } // IUnknown Method HRESULT __stdcall QueryInterface(REFIID riid, void **ppv) { if (IsEqualIID(riid,IID_IUnknown)) { *ppv = static_cast<IUnknown*>(this); return S_OK; } else if (IsEqualIID(riid, IID

Why does example code access deleted memory in IUnknown?

匆匆过客 提交于 2020-07-23 04:56:08
问题 Quite a number of examples when using interfaces such as IUnknown , in this example IDocHostUIHandler but it doesn't really matter - use code similar to this: class TDocHostUIHandlerImpl : public IDocHostUIHandler { private: ULONG RefCount; public: TDocHostUIHandlerImpl():RefCount(0){ } // IUnknown Method HRESULT __stdcall QueryInterface(REFIID riid, void **ppv) { if (IsEqualIID(riid,IID_IUnknown)) { *ppv = static_cast<IUnknown*>(this); return S_OK; } else if (IsEqualIID(riid, IID

Why does example code access deleted memory in IUnknown?

Deadly 提交于 2020-07-23 04:54:07
问题 Quite a number of examples when using interfaces such as IUnknown , in this example IDocHostUIHandler but it doesn't really matter - use code similar to this: class TDocHostUIHandlerImpl : public IDocHostUIHandler { private: ULONG RefCount; public: TDocHostUIHandlerImpl():RefCount(0){ } // IUnknown Method HRESULT __stdcall QueryInterface(REFIID riid, void **ppv) { if (IsEqualIID(riid,IID_IUnknown)) { *ppv = static_cast<IUnknown*>(this); return S_OK; } else if (IsEqualIID(riid, IID

struct tm tm_isdst disagrees with BST

孤街浪徒 提交于 2020-07-22 06:12:58
问题 I'm in the UK. I'm using C++ builder 10.2 with the clang compiler. The following code #include <stdio.h> #include <conio.h> #include <time.h> #ifdef _WIN32 #include <tchar.h> #else typedef char _TCHAR; #define _tmain main #endif int _tmain() { printf("TZ set = %s\r\n",putenv("TZ=Europe/London")==0 ? "true" : "false"); printf("TZ=%s\r\n",getenv("TZ")); for (int dst = 0, year = 2017; year <= 2023; year++) for (int mon = 1; mon <= 12; mon++) for (int mday = 1; mday <= 31; mday++) { struct tm st