🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.ms.programmer
Article #1597

Re: GlobalDosAlloc not exported in libs?

#1597
From: Mark Carlin
Date: Sun, 10 Mar 1991 14:34
25 lines
1439 bytes
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.
Technical Details
Message-ID: <1991Mar10.143402.12577@siesoft.co.uk>
Path: arc1-ca.pugleaf.net!utzoo!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!stl!siesoft!silver.siesoft.co.uk!mjc
References: <1991Feb13.165724.18629@linus.mitre.org>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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