Andi B. wrote:
Hi,
I wanted to implement high memory usage in pmprintf package cause it
eats up all my lower shared memory in one use case. As far as I see this
does not work.
Is it possible to give high mem to another process via DosGiveSharedMem
and queue? As I understand the pmprintf caller (pmprintf.dll) allocates
the high memory and put a string into it. The pointer to the string is transfered to the monitor program (pmprintf.exe - the server) via a
queue (DosOpenQueue). But the server always get a null pointer instead
the pointer to the string.
Any ideas?
Isn't the problem that some 16bit API is involved? Looking at os2safe.h (GCC/libc), I see this,
```
/*
* Note! The DOS queue API does not work with data, but with addresses, request
* numbers, priorities and process IDs. I.e. the data address you give
* DosWriteQueue is NOT used to memcpy() what it points to into some
internal
* buffer that is then queued. Instead that address is converted to
16-bit and
* placed on the queue.
*
* This means that the data pointer passed to DosWriteQueue CANNOT be a
high
* address! (The wrappers below makes sure all the other pointer
parameters
* can be pointing to high memory, though.)
*/
#define DosCreateQueue SafeDosCreateQueue
#define DosOpenQueue SafeDosOpenQueue
#define DosPeekQueue SafeDosPeekQueue
#define DosQueryQueue SafeDosQueryQueue
#define DosReadQueue SafeDosReadQueue
```
Dave
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)