Hi, I've asked this one before without success, but I thought I'd try again.
I am using the C++ API to read messages out of a GW 6.5+ store. When I
do that, the operation sets the "Read Flag" of each message, indicating that
it has been read. I don't want this to happen - if the message is un-read,
I want
it to stay that way.

Supposedly in 6.5+, when running in trusted mode (and not trusted, for
version 7+)
there is supposed to be a "Peek Mode" variable that I can set, which will
the behavior I want. I have tried this, but it does not seem to work. I am
in trusted mode. It appears that the call to put_PeekMode works, but when I
check the status of that flag, it still says false. And of course,
messages still get
the read flag set. My code fragment is below. If anyone can tell me what
doing wrong, I would appreciate it.

// attempt to set peek mode for account. This occurs
// after a successful login. We are running in trusted mode

// this code here is just to prove that we are
// logged in and that pIGWAccount2 is valid.
// when run, we get the correct value for domain

strcpy(ScratchBuf, FROM_OLE_STRING(bStr));
com_Log("debug: path to domain: %s",ScratchBuf);

// Get currrent value of PeekMode. When run, this
// shows a value of FALSE
ret = pIGWAccount2->get_PeekMode(&vFlag);
if (vFlag) com_Log("debug: before put_Peek, mode is TRUE");
else com_Log("debug: before put_Peek, mode is FALSE");

// Now try to set PeekMode. The return value is 0, indicating
// that we set it without error

ret = pIGWAccount2->put_PeekMode(vFlag);
com_Log("debug: return from put peek: %lu",ret);

// Now read back the value that we supposedly just set.
// It still says FALSE, even though it should be TRUE

ret = pIGWAccount2->get_PeekMode(&vFlag);
if (vFlag) com_Log("debug: after put_Peek, mode is TRUE");
else com_Log("debug: after put_Peek, mode is FALSE");

// Further, if we then read some messages, the Read Flag gets
// set, which we are trying not to do