3

I wonder whether there's a way to program a resource DLL for Windows Clusters in Delphi. I want to write a program that observes cluster state changes.

Judging from the MSDN API reference, all relevant functions are located in the ClusAPI.h and ResAPI.h headers, but unfortunately it seems as if they haven't been ported yet and HeaderConv seems to fail on them.

Does anyone has experience in doing such a thing?

Community
  • 1
  • 1
kaeff
  • 75
  • 7

2 Answers2

1

It's a very C-oriented API, with mandatory Dll entry points, tables of callback function pointers, and binary data blocks. I've been able to wrap a C#/.NET library with a C++/CLI interop layer, but it's definitely non-trivial.

Eric Nicholson
  • 4,053
  • 1
  • 28
  • 29
0

This would require a manual C header translation to Pascal code. If the API deals in pointers, you wouldn't have to translate any structures... this would make it comparatively simple to perform the translation as you'd only need to translate the function declarations themselves. If it passes structures (as opposed to pointers there-to) you would have to translate all of those structures as Delphi Records (or Packed Records as appropriate). Structure translations are far more time-consuming.

Sorry I can't offer an "instant solution", but at the info I've provided should help (if you didn't already know it).

LaKraven
  • 5,804
  • 2
  • 23
  • 49