[DllImport("dmcl40.dll",EntryPoint="dmAPIDeInit", CharSet=CharSet.Ansi, ExactSpelling=true,CallingConvention=CallingConvention.Cdecl )] private static extern int dmAPIDeInit();
Partially complete... http://workspaces.gotdotnet.com/dm