From: "David Botton" <...> To: "Marceau, David" <..>, Subject: Re: FW: ADA DLL Date: Sun, 27 Jun 1999 00:36:40 -0400 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 [mailto:...] >>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:...] >>>Sent: Friday, June 25, 1999 5:02 PM >>>To: ... >>>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