Search found 1776 matches

by rlebeau
Fri Feb 26, 2021 9:59 am
Forum: Technical
Topic: Installing C++ Builder 6.0 on Win server 2012
Replies: 1
Views: 15

Re: Installing C++ Builder 6.0 on Win server 2012

How about installing it one time in a VM, and then move the VM around as needed?
by rlebeau
Wed Feb 24, 2021 1:14 pm
Forum: Technical
Topic: COM library initialization with C++Builder routine
Replies: 1
Views: 48

Re: COM library initialization with C++Builder routine

But, before the instantiation I need to initialize the COM library and here, where I cannot find a C++ Builder routine and forced to use the WINAPI function, HRESULT CoInitializeEx( LPVOID pvReserved, DWORD dwCoInit); . Am I missed something or this is the way COM should be used in case of no Type ...
by rlebeau
Wed Feb 17, 2021 3:20 pm
Forum: Technical
Topic: String with 0/1 representation of binary to convert
Replies: 14
Views: 1192

Re: String with 0/1 representation of binary to convert

LexRutter wrote: Wed Feb 17, 2021 12:10 pm It's often quite difficult to locate proper references.
Get yourself some good C++ books. And when you need online references, start with CppReference.com, which would have told you immediately that std::to_wstring() is declared in the <string> header:
screeshot.png
screeshot.png (114.66 KiB) Viewed 200 times
by rlebeau
Wed Feb 17, 2021 12:02 pm
Forum: Technical
Topic: Filtering keystrokes using FMX
Replies: 6
Views: 136

Re: Filtering keystrokes using FMX

LexRutter wrote: Tue Feb 16, 2021 9:42 pm I'd certainly appreciate any suggestions on how to get this to function under Android.
Sorry, I can't help with that. I'm not an Android developer, and I don't have FMX's source code for Android to look at.
by rlebeau
Wed Feb 17, 2021 11:49 am
Forum: Technical
Topic: String with 0/1 representation of binary to convert
Replies: 14
Views: 1192

Re: String with 0/1 representation of binary to convert

This is the code block in question: do { ModNum = DivNum%8; StrOut = std::to_wstring(ModNum); // This line errors under Windows10 only Bufr[CountOct] =StrOut[0]; CountOct--; DivNum = DivNum/8; }while (DivNum>=8); it compiles and runs properly using FMX when the target OS is Android. The same code t...
by rlebeau
Tue Feb 16, 2021 6:12 pm
Forum: Technical
Topic: Filtering keystrokes using FMX
Replies: 6
Views: 136

Re: Filtering keystrokes using FMX

The following code runs very nicely when used in a VCL based program. It compiles nicely under FMX, the program loads and runs in both Windows and Android, but this code is completely ignored when running on either platform. Which event are you actually using? In one place I trap on Key == vkReturn...
by rlebeau
Tue Feb 16, 2021 5:53 pm
Forum: Technical
Topic: String with 0/1 representation of binary to convert
Replies: 14
Views: 1192

Re: String with 0/1 representation of binary to convert

Unfortunately the best choices - std::to_wstring() (and std::to_string()) - will not compile under Windows using FMX. Why not? What does the code look like, and what do the error messages say? Are you using a C++11-enabled clang compiler, or are you using the classic Borland compiler? And again, as...
by rlebeau
Sun Feb 14, 2021 2:18 pm
Forum: Technical
Topic: String with 0/1 representation of binary to convert
Replies: 14
Views: 1192

Re: String with 0/1 representation of binary to convert

The larger problem I've been dealing with is a relatively painless method of dealing with user input in other number bases. There's plenty to handle Hex & Decimal, but Octal, Binary, and BCD are nearly untouched. wcstol()/std::stol() can handle decimal, hex, and octal. Embarcadero's RTL has StrToBc...
by rlebeau
Fri Feb 12, 2021 3:25 pm
Forum: Technical
Topic: String with 0/1 representation of binary to convert
Replies: 14
Views: 1192

Re: String with 0/1 representation of binary to convert

The suggested code: __int64 i1 = wcstoll(Edit1->Text.c_str(), NULL, 2); (as well as the std:: version) still errors-out. The message is: wchar.h(146): candidate function not viable: no known conversion from 'WideChar *' (aka 'char16_t *') to 'const wchar_t *' for 1st argument UnicodeString uses 'wc...
by rlebeau
Mon Feb 01, 2021 5:22 pm
Forum: Technical
Topic: Getting abstract class like getting Interface from TObject?
Replies: 3
Views: 255

Re: Getting abstract class like getting Interface from TObject?

My problem with Delphi interfaces is that I get weird result every time I use them. For example i have some class that inherit from interfaces and when I use TInterfacedObject as the docwiki says it raises exception when I use the TObject class if I used GetInterface with it to get one of my interf...
by rlebeau
Mon Feb 01, 2021 10:44 am
Forum: Technical
Topic: Embarcadero and AvSetMmThreadPriority
Replies: 11
Views: 794

Re: Embarcadero and AvSetMmThreadPriority

I saw that the avrt.h header file does not contain the functions I call. Yes, it does. Look again more carefully: _Success_(return != NULL) AVRTAPI HANDLE WINAPI AvSetMmThreadCharacteristicsA ( _In_ LPCSTR TaskName, _Inout_ LPDWORD TaskIndex ); _Success_(return != NULL) AVRTAPI HANDLE WINAPI AvSetM...
by rlebeau
Mon Feb 01, 2021 10:34 am
Forum: Technical
Topic: Getting abstract class like getting Interface from TObject?
Replies: 3
Views: 255

Re: Getting abstract class like getting Interface from TObject?

First off, you have to remember that TObject is written in Delphi, so it and its descendants are treated special in C++. They follow Delphi class rules, not C++ class rules. Delphi doesn't support multiple inheritance of classes, like C++ does. In Delphi, a class can have at most 1 base class, but i...
by rlebeau
Mon Feb 01, 2021 9:54 am
Forum: Technical
Topic: Embarcadero and AvSetMmThreadPriority
Replies: 11
Views: 794

Re: Embarcadero and AvSetMmThreadPriority

thanks Remy, but in the .lib installed with Embarcadero, when I compile, the following functions do not exist: [ilink32 Error] Error: Unresolved external 'AvSetMmThreadCharacteristicsW' referenced from D:\EMBC\MIDI_EXPERIMENT\WIN32\DEBUG\UNIT1.OBJ [ilink32 Error] Error: Unresolved external 'AvSetMm...
by rlebeau
Sat Jan 30, 2021 1:22 pm
Forum: Technical
Topic: Embarcadero and AvSetMmThreadPriority
Replies: 11
Views: 794

Re: Embarcadero and AvSetMmThreadPriority

I looked for the avrt.lib file and I found it, but strangely the compiler can't find it. LIB files are handled by the linker, not the compiler. And the linker is not supposed to look for that LIB file by default. Only a small subset of core system LIB files are automatically linked into programs by...
by rlebeau
Fri Jan 29, 2021 12:28 pm
Forum: Technical
Topic: Embarcadero and AvSetMmThreadPriority
Replies: 11
Views: 794

Re: Embarcadero and AvSetMmThreadPriority

mark_c wrote: Thu Jan 28, 2021 11:16 am yes, in the version of Embarcadero that I use, the .lib was not present
Odd that the avrt.h header file would be present, but not the corresponding avrt.lib file. Did you check your IDE's \LIB\PSDK subfolder, and not just its main \LIB folder?