Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!lll-winken!elroy.jpl.nasa.gov!sdd.hp.com!spool.mu.edu!snorkelwacker.mit.edu!bloom-beacon!eru!kth.se!cyklop.nada.kth.se!news From: d85-caj@dront.nada.kth.se (Catrin Johnson) Newsgroups: comp.os.os2.programmer Subject: Multithreaded DLLs Message-ID: <1991Mar5.203638.28038@nada.kth.se> Date: 5 Mar 91 20:36:38 GMT Distribution: comp.os.os2.programmer Organization: Royal Institute of Technology, Stockholm, Sweden Lines: 42 I am using IBM os/2 ver 1.2 and have to develop an application in IBM Pascal/2.This application has to use a DLL that I created earlier using Microsoft C (ver 5.1).This is a multithreaded DLL which uses the C runtime library CRTLIB.DLL, provided with the compiler. When a C application uses my DLL it has to be linked with crtexe.obj, which I assume performs some initialization. I have not been able to make the Pascal application make use of this DLL, and in fact I have hardly been able to make it interact with the operating system at all. So, my questions are the following: 1: Doscalls are declared in a file called doscalls.int. In my case this file is pretty old, and was created for os/2 ver 1.0, which may be a problem. I have only tried a few doscalls, but they are seldom successful. DosCreateThread returns 164, which is an error code unknown to me. DosSemSetWait crashes the system, I do not remember the error code. DosAllocSeg seems to be successful, but I do not know how to handle the word type address received when sending it to DosCreateThread, which asks for an integer4 type address. Anyone out there who has succesfully used the doscalls from Pascal?? 2: How do I link an object module created by the Pascal compiler with an object module created by the C compiler if they both need their runtime libraries? I get a number of multiply defined symbols. 3: Is it possible for a Pascal application to use a DLL which uses CRTLIB.DLL, and if so, how? 4: Does anyone know how to make the otherwise excellent debugger MultiScope understand that there are variables declared in a Pascal program? It informs me that there is no global or local data, no matter how many variables I declare. Please answer by email to: d85-caj@nada.kth.se and please do so even if you only know the answer to one or a few questions. Regards Catrin