The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,854 other subscribers

Archive for the ‘Delphi’ Category

Are Delphi programmers more happy than other programmers? (via: Sentiment Analysis of Github Commits)

Posted by jpluimers on 2013/06/07

Interesting graph here: Evented Github Adventure – Sentiment Analysis of Github Commits.

It seems that Delphi programmers have a much better happy/sad word rate than other programmers.

–jeroen

 

Posted in Delphi, Development, DVCS - Distributed Version Control, git, Software Development, Source Code Management | Leave a Comment »

Things That Turbo Pascal is Smaller Than

Posted by jpluimers on 2013/06/04

Things That Turbo Pascal is Smaller Than.

Well basically anything.

About 30k was the size our complete IDE in the 80s century.

(Thanks @pstalenh and @rand)

–jeroen

Posted in Delphi, Development, Pascal, Software Development, Turbo Pascal | 4 Comments »

Run batch file from Delphi IDE (via: Stack Overflow)

Posted by jpluimers on 2013/05/29

In pre-Galileo versions of Delphi it was easy to run a .BAT or .CMD file as a main project file: just press F9.

Thanks to iManBiglary for posting how to do this in modern Delphi versions. Paraphrased:

Add the file path to cmd.exe (easieist is to add $(ComSpec) which expands the %ComSpec% environment variable) in the tools menu, with /c$EDNAME as the parameter.
In addition, you can tell the IDE to save your file before running the external tool with the $SAVE macro

One of the things you can do with this is add a project containing a batch file that starts to assemble your build results to create a deployment set.

–jeroen

via: Run batch file from Delphi IDE – Stack Overflow.

Posted in Delphi, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Development, Software Development | Leave a Comment »

IBM Pascal Compiler Aug81 pdf (via: Bitsavers’ Index of /pdf/ibm/pc/dos)

Posted by jpluimers on 2013/05/26

Wow, I didn’t know that IBM had their own DOS based Pascal compiler for the PC in 1981, but they did, and BitSavers just uploaded their manual
IBM_Pascal_Compiler_Aug81.pdf

Edit:
document moved from http://bitsavers.trailing-edge.com/pdf/ibm/pc/dos/IBM_Pascal_Compiler_Aug81.pdf
to: http://bitsavers.trailing-edge.com/pdf/ibm/pc/languages/IBM_Pascal_Compiler_Aug81.pdf

It is part of their “Personal Computer Computer Language Series”

From the era of DOS Pascal compilers before Turbo Pascal.

–jeroen

via Index of /pdf/ibm/pc/dos.

Posted in BitSavers.org, Delphi, Development, History, IBM Pascal, Pascal, Software Development | 7 Comments »

Delphi XE2: spontaneous Product or License Validation Error | General

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 »

On my research list: Distinguishing USB devices

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 »

DataSnap in the Cloud – DelphiFeeds.com

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 »

Windows Message Loop and Application Reentrancy

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 »

Don’t pass interfaces between application architectures over a DLL boundary

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 »

A few notes on Delphi, WSDL and SOAP: passing nil values, Document/Literal versus RPC Encoded

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 »