comp.lang.ada
 help / color / mirror / Atom feed
* Ada call from vc++
@ 2005-06-07  6:01 Matthias
  2005-06-07 16:41 ` James Alan Farrell
  2005-06-07 20:45 ` Björn Persson
  0 siblings, 2 replies; 3+ messages in thread
From: Matthias @ 2005-06-07  6:01 UTC (permalink / raw)


Hi all,

we have an c++-application that includes a dll with adacode. Another
c++-application starts this app with CreateProcess(...). After starting
the c++-app the following error comes up:
"Program terminated by an exception propagated out of the main
subprogram. Exception raised: ADA.IO_EXCEPTIONS.USE_ERROR. Executable
name... EIP EBP..."
If we start the c++-app with the adacode dll manually there is no error
message shown.
Somebody knows about this problem?

Matthias




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Ada call from vc++
  2005-06-07  6:01 Ada call from vc++ Matthias
@ 2005-06-07 16:41 ` James Alan Farrell
  2005-06-07 20:45 ` Björn Persson
  1 sibling, 0 replies; 3+ messages in thread
From: James Alan Farrell @ 2005-06-07 16:41 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 660 bytes --]

Matthias wrote:
> Hi all,
> 
> we have an c++-application that includes a dll with adacode. Another
> c++-application starts this app with CreateProcess(...). After starting
> the c++-app the following error comes up:
> "Program terminated by an exception propagated out of the main
> subprogram. Exception raised: ADA.IO_EXCEPTIONS.USE_ERROR. Executable
> name... EIP EBP..."
> If we start the c++-app with the adacode dll manually there is no error
> message shown.
> Somebody knows about this problem?
> 
> Matthias
> 

What Ada compiler did you use to make the DLL?

If it is gnat, then there is a function ada_init() that must be called 
from c++.

James

[-- Attachment #2: jfarrell.vcf --]
[-- Type: text/x-vcard, Size: 88 bytes --]

begin:vcard
fn:James Alan Farrell
n:Farrell;James
org:GrammaTech
version:2.1
end:vcard


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Ada call from vc++
  2005-06-07  6:01 Ada call from vc++ Matthias
  2005-06-07 16:41 ` James Alan Farrell
@ 2005-06-07 20:45 ` Björn Persson
  1 sibling, 0 replies; 3+ messages in thread
From: Björn Persson @ 2005-06-07 20:45 UTC (permalink / raw)


Matthias wrote:
> we have an c++-application that includes a dll with adacode. Another
> c++-application starts this app with CreateProcess(...). After starting
> the c++-app the following error comes up:
> "Program terminated by an exception propagated out of the main
> subprogram. Exception raised: ADA.IO_EXCEPTIONS.USE_ERROR. Executable
> name... EIP EBP..."
> If we start the c++-app with the adacode dll manually there is no error
> message shown.

The RM says: "The exception Use_Error is propagated if an operation is 
attempted that is not possible for reasons that depend on 
characteristics of the external file."

So you'll have to think of things like: Are there any differences in 
which files the DLL tries to access? Does the program get the same 
standard in, standard out and standard error files in both cases? Any 
parameters that might change how it operates on the files?

If you have the source code it'll help you a lot if you can get a stack 
trace and see where the exception comes from.

-- 
Bj�rn Persson                              PGP key A88682FD
                    omb jor ers @sv ge.
                    r o.b n.p son eri nu



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-06-07 20:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-07  6:01 Ada call from vc++ Matthias
2005-06-07 16:41 ` James Alan Farrell
2005-06-07 20:45 ` Björn Persson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox