Jose wrote:
I guess it should be obvious. Do I look stupid now? 8-)
Ah, bloody hell. Jeez. Well, yeah. After staring at it for five minutes, it struck me: you forgot a
struct in the
sizeof-operator. I've been in the habit of
typedef'ing my structures so I don't have to write down the keyword all the time, and as an added bonus can use a simple type to indicate a pointer to the structure. So the missing keyword never bothered me, as I have not written one myself in such a situation since 1998 :-D. (C++ does this automatically for you, by the way, and I think this is a Good Thing.)
In your case it would mean that you write:
typedef struct Message_to_OtherProcess MtoOP;
typedef struct Message_to_OtherProcess *MtoOPptr;and then use program lines like
if (!(Message_to_OtherProcess = (MtoOPptr)AllocMem(sizeof(MtoOP), MEMF_CLEAR|MEMF_PUBLIC)))I can recommend such abbreviations, they help you guard against mistakes like this, plus it makes programs easier to read: there is never any confusion about whether something is a true variable, or a meta-variable.