This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01BEC194.09D464AC Content-Type: text/plain; charset="iso-8859-1" Yup been there done that. The problem ada wants the dll to be loaded in some vm address that has a lot of space to it. In windows 95, the way the os gives heap/stack to each exe/dll is different than nt. And from what I can see ada asks for a lot in the dll. In NT, this problem doesn't arise since it can create big vm's with lots of heap/stack and if you look at a c++ debugger output while loading your dll on nt, you will see an outputdebugstring message say nt relocating adadll.dll. What is happening here is the space where it tried to load the dll the first time was too small, so NT gives it another place with more space. Windows 95 does not do this magic. That's all I can say. It will work on NT but not on windows 95 unless it is the first dll loaded from a c/c++ client. If you load it after anything else forget it. -----Original Message----- From: Roger Pearse Sent: Sunday, June 27, 1999 9:59 AM To: David Botton Cc: Marceau, David Subject: Re: FW: ADA DLL David, Thanks very much for that - I'll give it a go under NT and see how I get along. The explanation about the DLL is helpful - I'm very hazy about these things. Best wishes, Roger Pearse In message <002801bec056$a734d310$6018b70a@db3.max5.com>, David Botton >The GNU tools have a bug that prevents proper DLL creation on Windows 95/98. >(although sometimes it works). If you create the DLL on an NT machine it >works even on a Win95/98 machine. The problem is in the linking stage >garbage gets pulled in to the DLL on Win95/98. > >The problem you are experience with Regsvr32 and adadll.dll is that >adadll.dll is not a COM object (and shouldn't be) Regsvr32 is used to >register a COM objects that are housed in a dll, but not regulard dlls like >adadll.dll > >For more information on how to use DLLs from VB get the book HardCore Visual >Basic. An on-line version is available free on the internet as part of >Microsoft MSDN library. > >David Botton > > >-----Original Message----- >From: Roger Pearse >To: Marceau, David >Date: Saturday, June 26, 1999 10:37 AM >Subject: Re: FW: ADA DLL > > >>Thank you for this. I compiled up the adadll.dll fine. I don't have >>Visual C++ 6.0 SP1, so I can't test that, but I have an old copy of >>VC++2.0, and that worked fine, and client.exe ran OK. However I still >>have a problem. >> >>I'm running Windows 95 - the original version - and GNAT 3.11p. >> >>When I try to regsvr32 adadll.dll by typing the following at the prompt >>in the directory I created it in. >> >> \windows\system\regsvr32 adadll.dll >> >>I still get the same error: >> >> LoadLibrary("Adadll.dll") failed. >> GetLastError returns 0x00000000 >> >>which I can send you a bitmap of, if you wish. I've tried to reference >>the DLL in visual basic, but it returns error 7. >> >>Any tips welcome. I don't know anything about DLL's - I just want to >>use some Ada code I have in Visual Basic - but I can't help feeling that >>there is perhaps something not right about the DLL if it won't run >>through regsvr32? >> >>Roger Pearse >> >>In message <4DFBB7642174D211B51300A02496442C1E0C31@lsec_po.lsec.lete.dnd >>.ca>, Marceau, David writes >>> >>>-----Original Message----- >>>From: Marceau, David >>>Sent: Friday, June 25, 1999 6:32 PM >>>To: 'David Botton' >>>Subject: RE: ADA DLL >>> >>> >>>Using GNAT Dlls from C (van Dijk & Marceau) >>>http://www.adapower.com/articles/howto-gdllc.html >>> >>>I confirmed this recipe. This is the one Jerry gave me and I followed it >to >>>the letter and it works. >>>Use this one. Just to remind you that for debug use -g and avoid -O2 and >>>avoid -s in the linker. >>> >>>-----Original Message----- >>>From: David Botton >>>Sent: Friday, June 25, 1999 6:21 PM >>>To: Marceau, David; 'Roger Pearse' >>>Subject: Re: ADA DLL >>> >>> >>>Take a look at the following articles: >>> >>>Create DLLs with GNAT (Derks) >>>http://www.adapower.com/articles/howto-gdll.html >>> >>>Using GNAT Dlls from C (van Dijk & Marceau) >>>http://www.adapower.com/articles/howto-gdllc.html >>> >>> >>>In particular take a look at the second article as it contains a simple >>>project to build a DLL with GNAT. >>> >>>David Botton >>> >>> >>>-----Original Message----- >>>From: Marceau, David >>>To: 'Roger Pearse' >>>Cc: 'David Botton' >>>Date: Friday, June 25, 1999 6:04 PM >>>Subject: RE: ADA DLL >>> >>> >>>>Here is what you're going to do in order for me to help: >>>>1)Whatever you're environment is tell it to me: >>>>what os? >>>>what compiler version? >>>>what c++ compiler version? >>>> >>>>2)When you build, give me your steps. >>>>3)What exactly are the errors...I mean redirect the output to a file and >>>>paste it into your email to me. >>>> >>>>I am in the process of moving this weekend so you won't be hearing from >me >>>>until monday night. >>>> >>>> >>>>-----Original Message----- >>>>From: Roger Pearse [mailto:rpearse@chieftainsys.demon.co.uk] >>>>Sent: Friday, June 25, 1999 5:02 PM >>>>To: marceau@lsec.lete.dnd.ca >>>>Subject: ADA DLL >>>> >>>> >>>>Sorry to email you directly - hope you don't mind. From David Botton's >>>>site I understand you have a sample project to create a simple ADA DLL. >>>>I'm interested in learning how to do this, and would appreciate the >>>>code. I tried the COM examples on the AdaPower site and they didn't >>>>work for me - they wouldn't register on my system - and anyway I >>>>couldn't help feeling I'd prefer to try something simpler first. >>>> >>>>Any help greatly appreciated. (I'm away during the week, btw). >>>> >>>>Roger Pearse >>>>____________________________________________________________________ >>>>Roger Pearse >>>>Chieftain Systems Ltd <>< >>>>____________________________________________________________________ >>>>** Remove 'spamtrap' from my header to get my real email address ** >>>> >> >>____________________________________________________________________ >>Roger Pearse >>Chieftain Systems Ltd <>< >>____________________________________________________________________ >>** Remove 'spamtrap' from my header to get my real email address ** >> > ____________________________________________________________________ Roger Pearse Email:rpearse@spamtrap.chieftainsys.demon.co.uk Chieftain Systems Ltd <>< ____________________________________________________________________ ** Remove 'spamtrap' from my header to get my real email address ** ------_=_NextPart_001_01BEC194.09D464AC Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable RE: FW: ADA DLL

Yup been there done that.  The problem ada wants = the dll to be loaded in some vm address that has a lot of space to = it.  In windows 95, the way the os gives heap/stack to each = exe/dll is different than nt.  And from what I can see ada asks = for a lot in the dll.  In NT, this problem doesn't arise since it = can create big vm's with lots of heap/stack and if you look at a c++ = debugger output while loading your dll on nt, you will see an = outputdebugstring message say nt relocating adadll.dll.  What is = happening here is the space where it tried to load the dll the first = time was too small, so NT gives it another place with more space.  = Windows 95 does not do this magic.  That's all I can say.  It = will work on NT but not on windows 95 unless it is the first dll loaded = from a c/c++ client. If you load it after anything else forget = it.

-----Original Message-----
From: Roger Pearse [mailto:rpearse@chieftai= nsys.demon.co.uk]
Sent: Sunday, June 27, 1999 9:59 AM
To: David Botton
Cc: Marceau, David
Subject: Re: FW: ADA DLL


David,

Thanks very much for that - I'll give it a go under = NT and see how I get
along.  The explanation about the DLL is = helpful - I'm very hazy about
these things.

Best wishes,

Roger Pearse

In message = <002801bec056$a734d310$6018b70a@db3.max5.com>, David = Botton
<David@Botton.com> writes
>The GNU tools have a bug that prevents proper = DLL creation on Windows 95/98.
>(although sometimes it works). If you create the = DLL on an NT machine it
>works even on a Win95/98 machine. The problem is = in the linking stage
>garbage gets pulled in to the DLL on = Win95/98.
>
>The problem you are experience with Regsvr32 and = adadll.dll is that
>adadll.dll is not a COM object (and shouldn't = be) Regsvr32 is used to
>register a COM objects that are housed in a dll, = but not regulard dlls like
>adadll.dll
>
>For more information on how to use DLLs from VB = get the book HardCore Visual
>Basic. An on-line version is available free on = the internet as part of
>Microsoft MSDN library.
>
>David Botton
>
>
>-----Original Message-----
>From: Roger Pearse = <rpearse@chieftainsys.demon.co.uk>
>To: Marceau, David = <marceau@lsec.lete.dnd.ca>; David@botton.com
><David@botton.com>
>Date: Saturday, June 26, 1999 10:37 AM
>Subject: Re: FW: ADA DLL
>
>
>>Thank you for this.  I compiled up the = adadll.dll fine.  I don't have
>>Visual C++ 6.0 SP1, so I can't test that, = but I have an old copy of
>>VC++2.0, and that worked fine, and = client.exe ran OK.  However I still
>>have a problem.
>>
>>I'm running Windows 95 - the original = version - and GNAT 3.11p.
>>
>>When I try to regsvr32 adadll.dll by typing = the following at the prompt
>>in the directory I created it in.
>>
>>        = \windows\system\regsvr32 adadll.dll
>>
>>I still get the same error:
>>
>>        = LoadLibrary("Adadll.dll") failed.
>>        = GetLastError returns 0x00000000
>>
>>which I can send you a bitmap of, if you = wish.  I've tried to reference
>>the DLL in visual basic, but it returns = error 7.
>>
>>Any tips welcome.  I don't know = anything about DLL's - I just want to
>>use some Ada code I have in Visual Basic - = but I can't help feeling that
>>there is perhaps something not right about = the DLL if it won't run
>>through regsvr32?
>>
>>Roger Pearse
>>
>>In message = <4DFBB7642174D211B51300A02496442C1E0C31@lsec_po.lsec.lete.dnd
>>.ca>, Marceau, David = <marceau@lsec.lete.dnd.ca> writes
>>>
>>>-----Original Message-----
>>>From: Marceau, David
>>>Sent: Friday, June 25, 1999 6:32 = PM
>>>To: 'David Botton'
>>>Subject: RE: ADA DLL
>>>
>>>
>>>Using GNAT Dlls from C (van Dijk & = Marceau)
>>>http://www.adapower.com/articles/howto-gdllc.html<= /FONT>
>>>
>>>I confirmed this recipe.  This is = the one Jerry gave me and I followed it
>to
>>>the letter and it works.
>>>Use this one.  Just to remind you = that for debug use -g and avoid -O2 and
>>>avoid -s in the linker.
>>>
>>>-----Original Message-----
>>>From: David Botton [mailto:David@Botton.com]
>>>Sent: Friday, June 25, 1999 6:21 = PM
>>>To: Marceau, David; 'Roger = Pearse'
>>>Subject: Re: ADA DLL
>>>
>>>
>>>Take a look at the following = articles:
>>>
>>>Create DLLs with GNAT (Derks)
>>>http://www.adapower.com/articles/howto-gdll.html
>>>
>>>Using GNAT Dlls from C (van Dijk & = Marceau)
>>>http://www.adapower.com/articles/howto-gdllc.html<= /FONT>
>>>
>>>
>>>In particular take a look at the second = article as it contains a simple
>>>project to build a DLL with GNAT.
>>>
>>>David Botton
>>>
>>>
>>>-----Original Message-----
>>>From: Marceau, David = <marceau@lsec.lete.dnd.ca>
>>>To: 'Roger Pearse' = <rpearse@chieftainsys.demon.co.uk>
>>>Cc: 'David Botton' = <David@botton.com>
>>>Date: Friday, June 25, 1999 6:04 = PM
>>>Subject: RE: ADA DLL
>>>
>>>
>>>>Here is what you're going to do in = order for me to help:
>>>>1)Whatever you're environment is = tell it to me:
>>>>what os?
>>>>what compiler version?
>>>>what c++ compiler version?
>>>>
>>>>2)When you build, give me your = steps.
>>>>3)What exactly are the errors...I = mean redirect the output to a file and
>>>>paste it into your email to = me.
>>>>
>>>>I am in the process of moving this = weekend so you won't be hearing from
>me
>>>>until monday night.
>>>>
>>>>
>>>>-----Original Message-----
>>>>From: Roger Pearse [mailto:rpearse@chieftai= nsys.demon.co.uk]
>>>>Sent: Friday, June 25, 1999 5:02 = PM
>>>>To: marceau@lsec.lete.dnd.ca
>>>>Subject: ADA DLL
>>>>
>>>>
>>>>Sorry to email you directly - hope = you don't mind.  From David Botton's
>>>>site I understand you have a sample = project to create a simple ADA DLL.
>>>>I'm interested in learning how to do = this, and would appreciate the
>>>>code.  I tried the COM examples = on the AdaPower site and they didn't
>>>>work for me - they wouldn't register = on my system - and anyway I
>>>>couldn't help feeling I'd prefer to = try something simpler first.
>>>>
>>>>Any help greatly appreciated.  = (I'm away during the week, btw).
>>>>
>>>>Roger Pearse
>>>>_______________________________________________= _____________________
>>>>Roger Pearse
>>>>Email:rpearse@spamtrap.chieftainsys.demon.co.uk=
>>>>Chieftain Systems = Ltd         <><
>>>>_____________________________________= _______________________________
>>>>** Remove 'spamtrap' from my header = to get my real email address  **
>>>>
>>
>>_______________________________________________________= _____________
>>Roger Pearse
>Email:rpearse@spamtrap.chieftainsys.demon.co.uk
>>Chieftain Systems = Ltd         <><
>>_______________________________________________________= _____________
>>** Remove 'spamtrap' from my header to get = my real email address  **
>>
>

_______________________________________________________________= _____
Roger = Pearse           =        = Email:rpearse@spamtrap.chieftainsys.demon.co.uk
Chieftain Systems = Ltd         <><
_______________________________________________________________= _____
** Remove 'spamtrap' from my header to get my real = email address  **

------_=_NextPart_001_01BEC194.09D464AC--