Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!stl!siesoft!silver.siesoft.co.uk!mjc From: mjc@siesoft.co.uk (Mark Carlin) Newsgroups: comp.windows.ms.programmer Subject: Re: GlobalDosAlloc not exported in libs? Message-ID: <1991Mar10.143402.12577@siesoft.co.uk> Date: 10 Mar 91 14:34:02 GMT References: <1991Feb13.165724.18629@linus.mitre.org> Organization: Siemens Nixdorf Information Systems (SDG), Bracknell, UK. Lines: 25 GlobalDosAlloc () and GlobalDosFree () are accessible from the library. The problem is with windows.h not defining function prototypes for them. The trick is to define the function prototypes yourself and to remember that they are of type PASCAL. Try the following declarations: DWORD PASCAL GlobalDosAlloc (DWORD dwbytes); WORD PASCAL GlobalDosFree (WORD wSelector); These functions should only be used if you really can't find a more windows friendly way of achieving your objectives. I would hazard a guess and suggest that if your intention is to communicate with a a DOS program, such as a TSR, then you may have another problem to follow; altering segment registers and issuing a software interrupt in in enhanced mode will cause a protection violation. To overcome this you may have to mess around with DPMI (DOS Protected Mode Interface). Mark Carlin This posting is not issued on behalf of, or for, Siemens Nixdorf Informations Systems.