Newsgroups: comp.lang.smalltalk
Path: cantaloupe.srv.cs.cmu.edu!europa.chnt.gtegsc.com!howland.reston.ans.net!torn!nott!cunews!agora!rrybak
From: rrybak@chat.carleton.ca (Rafal Rybak)
Subject: using DLLs in VSE
X-Nntp-Posting-Host: agora.carleton.ca
Message-ID: <DDMwt5.HqG@cunews.carleton.ca>
Sender: news@cunews.carleton.ca (News Administrator)
Organization: Carleton University
X-Newsreader: TIN [version 1.2 PL2]
Date: Mon, 21 Aug 1995 00:17:29 GMT
Lines: 36


Hi, I have the following problem...

  I have read the help files provided in Visual Smalltalk for OS/2
and as far as I understand, the following steps are needed to use my
own DLLs:

  1. Create the DLL
  2. Create a subclass of DynamicLinkLibrary
  3. Add a class message 'fileName' to the subclass
     (this just returns the name of the dll file)
  4. send a message 'open' to this subclass
  5. send the api messages...

Some code to illustrate:

	| exampleLibrary |
	exampleLibrary := ExampleDLL open. "the DLL subclass"
	exampleLibrary firstApiCall        "message defining an api call" 
 
But, it turns out 'ExampleDLL open' returns a SmallInteger and not a
handle to a DLL.

Can someone please explain this to me?

Rafal


PS. the DLL is on the libpath and if I try the same code with DosDLL
(for example) then it works fine.


----------------------------------------------------------------------
Rafal Rybak
Email address: rrybak@chat.carleton.ca
----------------------------------------------------------------------
