From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.224.163.14 with SMTP id y14mr29136322qax.3.1374520136367; Mon, 22 Jul 2013 12:08:56 -0700 (PDT) X-Received: by 10.49.118.232 with SMTP id kp8mr477106qeb.10.1374520136351; Mon, 22 Jul 2013 12:08:56 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!news.glorb.com!gh1no98193qab.0!news-out.google.com!dk8ni1201qab.0!nntp.google.com!cb17no14814qab.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 22 Jul 2013 12:08:56 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=20.132.68.148; posting-account=71T85QoAAACdj14SLDEMBv_3HCGzGIoF NNTP-Posting-Host: 20.132.68.148 References: <54f7f0d4-29ef-4de0-94d8-8320e8df24e2@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <18255aa3-c926-4e18-a8a6-d19fe6b3ad93@googlegroups.com> Subject: Re: .h header file in ObjectAda 8.2.2 source code? From: dd24fan Injection-Date: Mon, 22 Jul 2013 19:08:56 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: news.eternal-september.org comp.lang.ada:16476 Date: 2013-07-22T12:08:56-07:00 List-Id: Thanks for the insight. My latest debugging efforts have pointed me to the Initialization of the device. I do have a compare of what the C code is doing because the vendor has software in a analyzer/simulator that i was able to run. Here is the snippet of the C code: ============== . . . S16BIT s16Result = 0x0000; S16BIT s16DevNum = LOGICAL_DEVICE_NUMBER; . . /* Initialize device */ s16Result = Initialize(s16DevNum, ACCESS_CARD, MODE, 0, 0, 0); . . ============== ACCESS_CARD is defined as 16BIT MODE is U16BIT The last 3 parameters are defined U32BIT so in my latest ada code i have this: ============== . . function Initialize (DevNum : S16Bit_Type; wAccess: S16Bit_Type; Mode : U16Bit_Type; Mem_Wrd_Size : U32Bit_Type; Reg_Addr : U32Bit_Type; Mem_Addr : U32Bit_Type ) return S16Bit_Type; pragma Import (Stdcall, Initialize, "Initialize"); . . procedure Open (Device_Num : in S16Bit_Type; Is_Open : in out Boolean; Good : out Boolean) is Result : S16Bit_Type; ACCESS_CARD : U16Bit_Type := 16#0000#; MODE : S16Bit_Type := 1; . . begin Good := False; Results := Gb.Msgbox(Text => "procedure Open begin", Caption => "procedure Open begin", Style => 4, Handle => Gb.Handle(Form)); -- Initialize device Result := Initialize (S16Bit_Type (Device_Num), ACCESS_CARD, MODE, 16#00000000#, 16#00000000#, 16#00000000#); Print (Device_Num, "Initialize => ", Result); Results := Gb.Msgbox(Text => "Initialized?", Caption => "Initialized?", Style => 4, Handle => Gb.Handle(Form)); . . . ============== Some notes: Device_Num is originally defined as an integer elsewhere in the code so I type cast it.