yes, it can be done in any language in which you can create a DLL that exports some functions, ie: C, C++, Delphi, Asm, etc... and even in VB, VB.NET and C#.
For a demo (well, it's a template, but it does the work):
Delphi Template and
Delphi Plugin Framework