Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!sdd.hp.com!wuarchive!cec2!news From: wilcox@wucs1.wustl.edu (Don Wilcox) Newsgroups: comp.windows.ms.programmer Subject: How to use GlobalDosAlloc()? Message-ID: <1991Jun6.200400.10453@cec1.wustl.edu> Date: 6 Jun 91 20:04:00 GMT Organization: Washington University, St. Louis MO Lines: 22 Another question on talking to TSRs. I have attempted to use a block of memory allocated by GlobalDosAlloc() as follows: I allocated the memory, and separated the paragraph from the descriptor. I used WinExec() to start a DOS program which will fill this new buffer. The program takes on command-line parameter which is the HIWORD of the values returned from GlobalDosAlloc(). When I have discovered that the DOS program has done its work, I GlobalLock the LOWORD from GDA() (not necessary since I am in 386Enh, but I do it anyways), and attempt to display the data using StretchDIBits(). The data is not in the buffer. In fact, further investigation shows that the 2 buffers do not point to the same part of memory. Anyone know what I am doing wrong? Just so you know, I am shifting the paragraph value 4 bits left before trying to use it as an address in the DOS program. Thanks for listening and helping (I love you all), Don Don Wilcox | "Hear, O Israel, the Lord your God, the Washington University in St. Louis | Lord is One." email: wilcox@cs.wustl.edu |