Roger Cigol

Current status: "Tokyo 10.2 looks good to me !" - 3 months ago
Member since: Thursday, 09 October 2014
Last login:
Profile viewed: 1,765 views

Your Rank: 33
Points: 85

Roger Cigol replied to the topic 'Holy smoke: can't change the icon in C++ Builder?!' in the forum. 5 days ago

Hi Emanuel,
It's not always possible to get the balance right with "warnings". A really smart IDE shouldn't give loads of unwanted warnings. It can be quite neat to assign different icons to different forms (as this is what appears on the task bar). It's "smart" that C++ Builder and Delphi allow this. You found the solution yourself so you're not so dumb either. Sounds to me as if both systems (ie Embarcadero and Emanuel are working well).
Regards, Roger

Read More...

Roger Cigol replied to the topic 'Problem VCL Form Application Delphi Starter' in the forum. 3 weeks ago

Hi Kevin,
You will probably have already spotted this !
https://community.embarcadero.com/forum/tools/4294-platform-environment-variable
Regards, Roger

Read More...

Roger Cigol replied to the topic 'Moving old project to Tokyo 10.2' in the forum. 3 weeks ago

Good morning Gil,
2009 is a very old version. It's all to do with the directory set ups in the project file. But the easiest way around it is to create a new project. Remove Form1 and then add all you old source code files. Then save the project.
It sounds long winded but it doesn't take that long and you only have to do it once.
Regards, Roger

Read More...

Roger Cigol replied to the topic 'Problem VCL Form Application Delphi Starter' in the forum. 3 weeks ago

Hi Kevin,
I don't know that I can help further.
You can go to this useful blog
https://community.embarcadero.com/blogs/entry/how-to-get-help-and-support-when-you-need-it-there-are-several-ways
which lists lots of ways to get help from Embarcadero, but not many of these are open to users of the free Delphi Starter edition. I have read lots of reports of difficulties with installing the starter edition when there are other versions of Delphi (or C++ Builder) on the same machine.
Maybe someone else will spot your problem on the community forum and be able to help.
Sorry to disappoint.
Regards, Roger

Read More...

Roger Cigol replied to the topic 'Problem VCL Form Application Delphi Starter' in the forum. 3 weeks ago

Hi Kevin,
This looks like something fairly fundamental with the installation.
You are doing all the right things. After you click on the VCL forms application you should get a single form created that you should be able to compile and run. (although it won't do much until you add stuff).
Out of interest do you get the same issue if you select MultiDevice Application? (this can also be used to create a Windows 32 or Windows 64 bit application but it uses the FireMonkey framework instead of VCL which allows the same code to be recompiled to target Android or other devices)?
Regards, Roger

Read More...

Roger Cigol replied to the topic 'Does C++ Builder come with an HTTP Client class?' in the forum. 3 weeks ago

Hi Adrian,
This is exactly what C++ Builder is good at !
Start by looking at
https://community.embarcadero.com/blogs/entry/learn-how-to-use-the-new-json-features-in-rad-studio-10-seattle-webinar-march-2nd-wednesday
and
https://community.embarcadero.com/blogs/entry/march-17-webinar-learn-how-to-quickly-build-and-deploy-a-complete-rest-json-based-enterprise-business-application
You might also find some interesting articles at
//www.embarcadero.com/rad-in-action
It is complicated to decide what is the right version for you. There are a lot of options.
You need to carefully study the "feature matrix" which is at
https://www.embarcadero.com/docs/rad-studio-feature-matrix.pdf
Hope this points you in the right direction.
Regards, Roger

Read More...

Roger Cigol replied to the topic 'C++ Builder version 5 project troubles in RAD 10.2' in the forum. 1 month ago

Hi Jeff,
Did you also replace the code inside the YourProjectName.cpp file (ie the file where the main() function is? I am guessing this is your mistake.
Have a look at YourProjectName.cpp
Does it have a line #include for file tchar.h ? (if not, add this line near the top of the file)
Then you need to check the point where the main function is declared. Here's an excerpt from a typical C++ "MyProjectName.cpp" (actually the one I am working on this morning) which you can use to get an idea of what to try:
//.... more USEFORM statements above here (created by the IDE)
USEFORM("GUI_Main.cpp", MainForm);
USEFORM("GUI low level\GUI_YesNoPrompt.cpp", YesNoPromptForm);
//


int WINAPI _tWinMain(HINSTANCE, HINSTANCE, LPTSTR, int)
{
try
{
Application->Initialize();
Application->MainFormOnTaskBar = true;
Application->CreateForm(__classid(TMainForm), &MainForm);
// etc......(created by the IDE)
// note that the _tWinMain is converted to WinMain by the inclusion of the tchar.h
Let me know if this helps.
Regards, Roger

Read More...

Roger Cigol replied to the topic 'Problem VCL Form Application Delphi Starter' in the forum. 1 month ago

Hi Kevin,
Strange. Checking obvious thing first: In your project manager window you will see your list of files for your project. Close to the top is the "target platform". Have you got his set to Windows32 or Windows64?
Regards, Roger

Read More...

Roger Cigol replied to the topic 'Using a VS 64-bit DLL in XE8' in the forum. 1 month ago

Hi Ben,
I think you need "IMPORTS" (not "EXPORTS")
Regards, Roger

Read More...

Roger Cigol replied to the topic 'Using a VS 64-bit DLL in XE8' in the forum. 1 month ago

Hi Ben,
I remembered reading this article. It's old, but it gives you an idea of what you need to do:
http://bcbjournal.org/articles/vol4/0012/Using_Visual_C_DLLs_with_CBuilder.htm
Regards, Roger

Read More...

Roger Cigol replied to the topic 'Using a VS 64-bit DLL in XE8' in the forum. 1 month ago

Hi Ben,
You need to tell the linker that this function is coming from an external dll.
You do this by creating either a lib file or a import definition file and adding this
to your project.
IF you were creating the dll yourself using RAD Studio C++ you could configure
the compiler/linker used to create the dll to automatically create the *.lib file for you.
But you are NOT doing this. Using visual studio dll you get into the problems of
incompatible name mangling. You need to create a text file which is an import
definition file and add the name of the function you want to call. I think you can
also add a "translated name" which is the name you want to use for the function
inside your C++ program.
Not an explicit solution, I realise, but a pointer to help you in the right direction,
drafted out during a coffee break whilst I am working on an urgent s/w project
for a customer.
Regards, Roger

Read More...

Roger Cigol replied to the topic 'C++ Builder - How Create a fast large file' in the forum. 1 month ago

Hi Rostislav,
An excellent bit of code by you.
If you had originally posted something like
"using << for chars on a file stream takes 1 second to create a 10MB file and I want to create a 1GB file in less than a second" you might have got the solution you were looking for. Although finding a solution for yourself is always a better way than relying on the goodwill of others (particularly as this is how one learns).
There does seem to be a bit of code missing after Data = new Byte[BlockSize] which I am guessing is where you initialise the newly created array Byte[] to your file initialisation value.
Anyway, a useful posting.
Regards Roger

Read More...

Roger Cigol replied to the topic 'C++ Builder - How Create a fast large file' in the forum. 1 month ago

Hi Rostislav,
Any introduction to C++ book will tell you how to do this. I would respectfully suggest that you will learn much more effectively if you start with a good text book rather than relying on the forum.
Over coffee, using Seattle 10.1 this works:

#include <fstream>

void CreateAFile(void)
{
String FileName = "C:\\Trash\\Data.bin"; // your file name here
int NumOfBytesInFile = 20; // change 20 to a very large number for a very large file
char ByteRepeatedInFile = 0x00; // this is binary zero. If you wanted ascii zero then use '0'
ofstream OutFile(AnsiString(FileName).c_str(), std::ios_base::binary); // open file in binary mode (no windows crlf issues)
if (OutFile.is_open()) {
for (int i = 0; i < NumOfBytesInFile; i++) {
OutFile << ByteRepeatedInFile;
}
OutFile.close();
}
// happy to help: regards, Roger.

Read More...

Roger Cigol replied to the topic 'C++ Builder 10.2 - default compiler' in the forum. 2 months ago

Hi Zeljko,
My guess is that Embarcadero want to keep the "first impression" favourable for "new to Embarcadero" users.
Defaulting to the Classic compiler results in significantly faster compilation.
It's a two second job to change of course.
All about marketing - not technical. Probably important, but not very interesting !
Regards, Roger.

Read More...

Roger Cigol updated blog post Where it's at ! in Blogs 2 months ago

I add programming hints and tips, mostly related to Embarcadero C++ but also including thoughts on general problem solving or anything else on a blog away from the Embarcadero site. Click here to read it:  

Roger Cigol created new blog post Where it's at ! in Blogs 2 months ago

I add programming hints and tips, mostly related to Embarcadero C++ but also including thoughts on general problem solving or anything else on a blog away from the Embarcadero site. Click here to read it: