Archive for the ‘Development’ Category
Posted by jpluimers on 2013/05/28
A few notes for my research list:
One important thing that most of the code examples miss is to close the registry keys when they are done with them.
–jeroen
Posted in .NET, .NET 4.0, .NET 4.5, C#, C# 4.0, C# 5.0, Development, Software Development | Leave a Comment »
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/16
For 10 months ago, Iris started Asking a ‘stupid’ question, every day for 365 days.
Virtually all of them very valid questions that remind me of various stages in my software career, and will remind me during the stages still to come.
Her motto is “there is no such thing as a stupid question”.
I agree, and would go even further: keep the questions coming every day of your life, as it is the only way of learning.
Recommended reading!
–jeroen
via: For 10 months ago, Iris started Asking a ‘stupid’ question, every day for 365 days ».
Posted in Development, Software Development | 1 Comment »
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/10
Finder on your Mac by default does not show hidden files, and the console has vi, which lots of people find awkward to use.
There is an easy trick to open a hidden file like ~/.bash_profile (for instance to add an alias) with a visual text editor.
Just execute this in your terminal:
- Always with TextEdit
open -e ~/.bash_profile
- For the default text editor (usually TextEdit)
open -t ~/.bash_profile
- For a specific text editor (in this cast TextWrangler)
open -b com.barebones.textwrangler ~/.bash_profile
The man open(1) page has more information on the parameters you can pass to open.
–jeroen
PS: You can teach Finder to Quickly show and hide hidden files | Finder, Terminal | Mac OS X Tips.
Posted in Apple, bash, Development, Mac, Mac OS X / OS X / MacOS, Mac OS X 10.4 Tiger, Mac OS X 10.5 Leopard, Mac OS X 10.6 Snow Leopard, Mac OS X 10.7 Lion, MacBook, MacBook-Air, MacBook-Pro, OS X 10.8 Mountain Lion, Power User, Scripting, Software Development | 6 Comments »