comp.lang.ada
 help / color / mirror / Atom feed
From: "DuckE" <nospam_steved94@home.com>
Subject: Re: How do I use cards.dll from Aonix OA?
Date: Sat, 08 Sep 2001 03:26:28 GMT
Date: 2001-09-08T03:26:28+00:00	[thread overview]
Message-ID: <Edgm7.49292$MK5.28698754@news1.sttln1.wa.home.com> (raw)
In-Reply-To: 9na792$iqi$1@newstoo.ericsson.se

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" <qsbpefr@esavionics.se> 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?
> >
> >
>
>





  reply	other threads:[~2001-09-08  3:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-30 11:08 How do I use cards.dll from Aonix OA? Petter Fryklund
2001-08-30 17:53 ` tmoran
2001-08-31  6:27   ` Petter Fryklund
2001-08-31 17:37     ` tmoran
2001-09-03 11:03       ` Petter Fryklund
2001-09-07 10:44         ` Petter Fryklund
2001-09-08  3:26           ` DuckE [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-08-31 17:55 Beard, Frank
2001-08-31 18:09 ` tmoran
replies disabled

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