Archive for the ‘Delphi’ Category
Posted by jpluimers on 2013/05/24
Every once in a while an AV in Delphi manifests itself in a very odd way.
Usually it is refactoring, code completion or any of the ‘insight’ features doing odd things.
This time, it got me into a Product or License Validation Error | General:
Product or License Validation Error
|
Your Embarcadero product or license can’t be validated.
If you see this page when you’re using a valid license and official version of the software, please submit an installation support case for further assistance.
If you need a trial license and official trial software download, visit our Trial Downloads page.
To purchase a product license and receive a certified download, please see our How to Buy page.
|
Too bad the error hard-quits Delphi, thereby loosing all your work since the last save. Even more reason to safe often.
None of the reasons mentioned in Starting Delphi or C++ Builder results in Product or License Validation Error applied.
Restarting Delphi XE2 solved the problem.
–jeroen
Posted in Delphi, Delphi XE2, Development, Software Development | 7 Comments »
Posted by jpluimers on 2013/05/23
So I won’t forget:
delphi – How to distinguish flash drives? – Stack Overflow.
In that answer, Dan C talks about VID / PID (Vendor ID and Product ID) and how to get some of the serials without WMI.
–jeroen
Posted in Delphi, Delphi XE3, Development, Software Development | Leave a Comment »
Posted by jpluimers on 2013/05/22
On my research list (Thanks Uwe!): DataSnap in the Cloud – DelphiFeeds.com.
It shows you how to do DataSnap from the Azure clound, including getting some of the default Delphi database demos to work on SQL Server (erm, SQL Azure).
–jeroen
Posted in Delphi, Delphi XE, Delphi XE2, Delphi XE3, Development, Software Development | Leave a Comment »
Posted by jpluimers on 2013/05/21
One of the things you must be careful with is reentrancy in your application through a message loop.
The most obvious way is Application.ProcessMessages: it will loop until all messages from the Windows message queue are processed, whether your application is ready for them or not.
A less obvious way is because of modal dialogs or forms. They have their own message loop which might cause global reentrancy in your application (for instance through TTimer objects).
That was the case for this problem: stack overflow with repeated DispatchMessageW in the call stack.
A couple of ways to try to avoid these issues:
- Don’t cause a secondary message loop.
You can refrain from calling Application.ProcessMessages, but you cannot always avoid modal dialogs.
- Protect each of your event handlers by disabling the path to it as soon as it gets called.
This means disabling the Enabled property for instance of TTimer, TControl, TAction, or other objects that cause events.
–jeroen
via: windows – stack overflow with repeated DispatchMessageW in the call stack – Stack Overflow.
Posted in Delphi, Development, Software Development | 7 Comments »
Posted by jpluimers on 2013/05/15
It is unwise to pass objects allocated in one framework over a DLL boundary to a different framework.
In the case of Using C dll in delphi return nothing, someone tries to pass an Interface to some memory in the C side over to Delphi.
Unless that interface is COM based, don’t do that!
In a more general way: don’t pass memory allocated on the DLL side over to the client side, no matter what kind of client you have.
From the DLL, either pass simple types, or fill buffers allocated at the client side.
Edit:
There was a nice Delphi DLL return string from C# … .NET 4.5 Heap Corruption but .NET 4.0 works? Explain please? – Stack Overflow question explaining in detail what to do for strings in a specific case: use the COM heap on the Delphi side using CoTaskMemAlloc (actually it uses the OLE task memory allocator as the Old New Thing explains).
–jeroen
via: Using C dll in delphi return nothing – Stack Overflow.
Posted in .NET, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, Delphi, Delphi 1, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 3, Delphi 4, Delphi 5, Delphi 6, Delphi 7, Delphi 8, Delphi x64, Delphi XE, Delphi XE2, Delphi XE3, Development, Software Development | 5 Comments »
Posted by jpluimers on 2013/05/14
I had some notes on Delphi WSDL and SOAP peculiarities somewhere, but I misplaced them.
Luckily, I found some links that explain most of my notes well:
–jeroen
Posted in Conference Topics, Conferences, Delphi, Delphi 2007, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Development, Event, SOAP/WebServices, Software Development | Leave a Comment »
Posted by jpluimers on 2013/05/09
Posted in .NET, C++, Cloud Development, COBOL, CommandLine, Delphi, Development, Fortran, iSeries, Java, Pascal, RegEx, Scripting, Software Development, Web Development, xCode/Mac/iPad/iPhone/iOS/cocoa | 3 Comments »
Posted by jpluimers on 2013/05/08

Lucida Console Sample (thanks Wikimedia!)
I’m in search to see if there is a better programmers font than the monospaced Lucida Console mainly to be used in Visual Studio, Delphi, the Windows console, Xcode and Eclipse. What I love about Lucida Console design is the relatively large x-height combined with a small leading (often called “line height”). This combines very readable text, and a lot of code lines in view. Lucida has two small drawbacks, see the second image at the right:
- The captial O and digit 0 (zero) are very similar.
- Some uppercase/lowercase character pairs are alike (because of the large x-height)
But, since the font hasn’t been updated for a very long time, lots of Unicode code points that are now in current fonts, are missing from Lucida Console (unless you buy the [Wayback] most recent version that has 666 characters from Fonts.com) Well, there are dozens of monospaced fonts around, so I wonder: which ones do you like? In the mean while, I’m going to do some experimenting with fonts mentioned in these lists:
A few fonts I’m considering (I only want scalable fonts, so raster .fon files are out):
I have tried Adobe Source Code Pro about half a year ago. That didn’t cut it: problem with italics in Delphi, and not enough lines per screen. [Wayback] New Open Source monospaced font from Adobe: Source Code Pro.
–jeroen
Posted in .NET, Adobe Source Code Pro, Apple, Delphi, Delphi 2007, Delphi XE3, Development, Encoding, Font, Lucida Console, Mac, Mac OS X / OS X / MacOS, Power User, Programmers Font, Software Development, Typography, Unicode, Visual Studio 11, Visual Studio 2005, Visual Studio 2008, Visual Studio 2010, Visual Studio and tools, Windows, Windows 7, Windows 8, Windows Server 2008 R2, Windows XP, xCode/Mac/iPad/iPhone/iOS/cocoa | 43 Comments »
Posted by jpluimers on 2013/05/02
for my link archive:
–jeroen
Posted in .NET, C#, Delphi, Delphi 2007, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Development, Software Development | 1 Comment »
Posted by jpluimers on 2013/05/01
This is more elaborate English version of a short Dutch message I recently sent to explain the differences between VCL and FMX:
Do not regard FMX as a replacement for VCL: they are different kinds of frameworks.
VCL is a wrapper around Windows Controls. In itself, it has not much functionality: it exposes the underlying Windows functionality. The exception are data aware controls that provide basic functionality for writing data aware applications. There is a huge 3rd party market for extending VCL support, for instance providing extra Windows functionality, enriching data aware behaviour (look at all those fancy data aware grids), and many more.
FMX is the FireMonkey X-platform framework. Major functionalities are vector based 2D, 3D drawing and controls, and support for styles and composition.
When introducing FMX in Delphi XE2, Embarcadero also introduced a new way of data binding that is shared with FMX and VCL. FMX extends this a bit to some basic data aware controls.
Gone are most of the platform specific features like drag & drop, full blown Windows Shell ListViews, etc. There are some controls that manifests themselves differently on each supported platform (like Pickers), but most of that is currently left to the 3rd party FMX component market.
So if you want FMX to replace VCL, then be prepared for quite some shopping in the 3rd party market.
CLX tried to be a full blown cross platform VCL replacement, but that didn’t work very well.
–jeroen
Posted in Delphi, Delphi XE2, Delphi XE3, Delphi XE4, Development, FireMonkey, OS X FMX, Software Development | Tagged: component market, data binding, fmx, software, technology, vcl, windows controls | 1 Comment »