Newsgroups: comp.lang.smalltalk
Path: cantaloupe.srv.cs.cmu.edu!rochester!cornellcs!newsstand.cit.cornell.edu!portc01.blue.aol.com!portc02.blue.aol.com!howland.erols.net!blackbush.xlink.net!ins.net!heeg.de!hmm
From: hmm@heeg.de (Hans-Martin Mosner)
Subject: Re: Problem: DLL & C Connect using Win95
Message-ID: <E17o4F.7C7@heeg.de>
Sender: uucp@heeg.de
Organization: Georg Heeg Objektorientierte Systeme, Dortmund, FRG
X-Newsreader: TIN [version 1.2 PL2]
References: <3292F56F.41C67EA6@ic.ac.uk>
Date: Thu, 21 Nov 1996 08:12:15 GMT
Lines: 38

Mette Kristine Hauge (mkh@ic.ac.uk) wrote:
: I have a problem loading libraries using DLL & C Connect in Win95. 
: My code was originally written using WIN3.11.

: I have written an ExternalInterface Subclass MapAPI:

: ExternalInterface subclass: #MapAPI
: includeFiles:'windows.h '
: includeDirectory: 'c:\bc45\include'
: libraryFiles: 'gdi.exe user.exe krnl386.exe'
: libraryDirectories: 'c:\windows\system'
: .
: .
: .

: When using WIN95 the libraryFiles gdi.exe user.exe and krnl386.exe
: under c:\windows\system is not loaded using DLL & C Connect.
: That is, I get the following error message in VisualWorks 2.5:
: 'Cannot Load Library' (or something like that) when I try to run my
: program.
: This was not a problem when I used WIN3.11

When porting to Win95 and Win NT, you should only use the 32-bit
windows APIs. Their library files are USER32, GDI32 and KERNEL32.
You don't need to append the .DLL suffix. Also, you don't need
to tell the ExternalInterface where the files are, as Windows will
already know that they are in the SYSTEM directory.

The 32-bit APIs are also part of the Win32s subsystem that is
already required to run VisualWorks on Win3.11, so the modified
MapAPI class should work on Win3.11, too.

Hans-Martin
--
+--- Hans-Martin Mosner ---- Senior Smalltalk Guru :-) ---+
| These opinions are entirely ficticious.  Any similarity |
| to real opinions is purely coincidental and unintended. |
+--- <hmm@heeg.de> ------ URL:http://www.heeg.de/~hmm/ ---+
