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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c5a05c757ae3decf X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-09-07 20:26:28 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!sn-xit-01!supernews.com!newshub2.rdc1.sfba.home.com!news.home.com!news1.sttln1.wa.home.com.POSTED!not-for-mail From: "DuckE" Newsgroups: comp.lang.ada References: <9mn9k0$dqf$1@newstoo.ericsson.se> <9mvmsf$ld1$1@newstoo.ericsson.se> <9na792$iqi$1@newstoo.ericsson.se> Subject: Re: How do I use cards.dll from Aonix OA? X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Message-ID: Date: Sat, 08 Sep 2001 03:26:28 GMT NNTP-Posting-Host: 24.248.45.203 X-Complaints-To: abuse@home.net X-Trace: news1.sttln1.wa.home.com 999919588 24.248.45.203 (Fri, 07 Sep 2001 20:26:28 PDT) NNTP-Posting-Date: Fri, 07 Sep 2001 20:26:28 PDT Organization: Excite@Home - The Leader in Broadband http://home.com/faster Xref: archiver1.google.com comp.lang.ada:12922 Date: 2001-09-08T03:26:28+00:00 List-Id: I don't know if it's the most direct way, but try this: DECLARE cdt_Str : Interaces.C.Char_Array := Interfaces.C.To_C( "C:\WINDOWS\SYSTEM\CARDS.DLL" ); BEGIN DLL := LoadLibrary( cdt_str(0)'UNCHECKED_ACCESS ); END; I haven't tested this, but it is very similar to other code that I use which does work. SteveD "Petter Fryklund" wrote in message news:9na792$iqi$1@newstoo.ericsson.se... > I tried to use LoadLibrary in the following example: > > cdt_Str : constant String := "C:\WINDOWS\SYSTEM\CARDS.DLL" & > Character'First; > > DLL : Hinstance; > > .... > > DLL := LoadLIbrary (cdt_Str); > > but this only returned 0, which I assume is no good. > > Any suggestions? > > > Petter Fryklund wrote in message <9mvmsf$ld1$1@newstoo.ericsson.se>... > >cards.dll is used by ie solitaire and others games needing a card deck ;-) > >It's probably present in most WIndows systems. I'm trying to learn Windows > >programming and having some fun while I'm doing it :-) I'm a bridge > fanatic. > >I have a command line deal generator that I'd like to convert graphics. > > > >tmoran@acm.org wrote in message ... > >>>No, cdtInit is the initialization of cards.dll. I started with that one > >just > >>>to see if I could use any routine in there. I tried to add the file > >>>cards.dll to the files in the project, but that was obviously not right. > I > >>>couldn't fine any instructions on how to tell the linker where to look. > Do > >>>you know? > >> If cdtInit is an entry point in cards.dll then you need to call the OS > >>functions (LoadLibraryA et al) to *dynamically* load the DLL and give you > >>a pointer to cdtInit. At *link time* cards.dll need not even exist. > >>You can either code your own OS calls, or find a routine in a .lib > >>that knows how to do it, and then statically link from that .lib Where > >>did cards.dll come from and did it have an associated .lib file? > > > > > >