HDF5 .NET CSharpExample1

I am trying to learn how to use the HDF5 .NET library. I am compiling with VS-2010 and my HDF5DotNet.dll is the .NET 4.0 version (from HDF5DotNet-Net4.0-x86.zip).

I am starting by trying to compile and run the project CSharpExample1 that is part of HDF5DotNet-src. That project was set up for VS-2008. I successfully upgraded the project file and fixed most of the problems (related to the use of type IntPtr). But I am stopped on the instantiation of the 3 delegate methods H5AllocCallback, H5FreeCallback, and H5AutoCallback (Program.cs, lines 295, 296, and 481).

Apparently, in the latest version of the HDF5DotNet.dll, the constructors for these Callback delegates now require 2 arguments (object, IntPtr) rather than a single argument (object) as was used in the original project. Can anyone provide me with an example of how to modify those 3 statements so that CSharpExample1 will compile? I have included a code snippet that shows lines 295 and 296 of Program.cs. The two statements require a 2nd argument of type IntPtr.

               // Now read it back again using our own memory manager

               H5AllocDelegate allocDelegate = new H5AllocDelegate(userAlloc);
               H5FreeDelegate freeDelegate = new H5FreeDelegate(userFree);

               H5PropertyListId memManagerPlist = H5P.create(H5P.Class.DATASET_XFER);


D.D. "Skip" Snyder
Snyder Geoscience, Inc
671 Crescent Ct
Grand Junction, CO 81505
(970) 254-0330
(970) 261-5825 (cell)