Newsgroups: comp.lang.smalltalk
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!oitnews.harvard.edu!canopus.hbs.edu!news-in.tiac.net!uunet!in2.uu.net!news2.new-york.net!not-for-mail
From: vlad@world2u.com (Vlastimil Adamovsky)
Subject: Re: SE: and DLLs - anyone try it?
X-Newsreader: Forte Free Agent 1.0.82
X-Nntp-Posting-User: (Unauthenticated)
Message-ID: <E0H7v3.M02@news2.new-york.net>
References: <327FF73A.60D4@ix.netcom.com>
X-Trace: 847329804/28479
X-Nntp-Posting-Host: i123.153.world2u.com
Date: Thu, 7 Nov 1996 01:24:34 GMT
Lines: 34

Thomas Gagne <tgagne@ix.netcom.com> wrote:

>I've looked at the documentation for creating C DLLs for use with SE and
>I'm a little confused.  

It is not the best place to look at. Look at how SE communicates with Windows.
It calls Windows API. Look at a class (for example) GdiDLL. I don't remember
exact. I cannot load it now, because I am running 24bit color graphics, so I try
to remember the stuff....

Look at API signatures. You have two kinds, api: and c: calling conventions.

>Has anyone tried this and gotten it to work? 

It works very well. Don't forget though, you have to create 16-bits DLL. 

>Should I be using the Pascal calling convention instead of the C
>convention?  

It's up to you.

>How are return values returned?  How are structures
>actually passed around?  

You have actually many examples there. Directly in the SE code. Use debugger to
walk around. It really helps.




 Vlastimil Adamovsky
 ** C++ and Smalltalk consultant **
 * http://www.stepweb.com *

