-------------------------------------------------------
-- Simple .NET DLL
-- Martin C. Carlisle
-- 31 October 2003
--
-- simply has a counter which can be incremented and 
-- queried
-------------------------------------------------------
with Myformproject.Mainform;
with Mssyst.Windows.Forms;
use Mssyst.Windows.Forms;
with Mssyst.Windows.Forms.Label;
with Mssyst.String;
use Mssyst.String;
with Mssyst.Windows.Forms.Messagebox;
with Mssyst.Windows.Forms.Dialogresult;


package body Ada_Simple_Dll is
   Count : Integer;
   ---------------------
   -- Increment_Count --
   ---------------------

   procedure Increment_Count is
   begin
      Count := Count + 1;
   end Increment_Count;

   ------------------
   -- Return_Count --
   ------------------

   function Return_Count return Integer is
   begin
      return Count;
   end Return_Count;
   
   procedure Update_Text(Window : Myformproject.Mainform.Ref) is
      X : String := Integer'Image(Count);
      Result : Dialogresult.Valuetype;
      use Myformproject.Mainform;
      use mssyst.windows.forms.label;
   begin
      myformprojec.update_text(+x);
   end Update_Text;
   

begin
   -- I put this code in to demonstrate need to call adainit
   Count := -11;
end Ada_Simple_Dll;

