CompuServe Thread

#DLL from Pascal

2 messages in this thread
#2718From: David DoroshOct 11, 1991 6:27 PM
I know there was a file here that had Turbo pascal source for a DLL. Does anyone know which one? Thanks, David There is 1 Reply.
#2753From: Rick Sands/OROct 12, 1991 10:24 AM
Here is a Turbo Pascal DLL skeleton: LIBRARY Pas; Uses WinTypes, WinProcs; Function FileExist(Filename:pChar):Integer; EXPORT; { <<– NOTE } var Fp:File; begin assign(Fp, Filename); {$I-} reset(Fp,1); {$I+} { Open file as Binary } if IOResult = 0 then { Did it open? } begin FileExist := -1; { VB True } Close(Fp) { Don't forget to close } end else FileExist := 0 { VB False } end; EXPORT FileExist Index 1; { <<– NOTE } begin end. In VB, Declare Function FileExist Lib "PAS.DLL" (byval Filename as String) as Integer;