# &#39;GetClut&#39; and &#39;SetClut&#39; return invalid pointer error in Windows

**URL:** <https://psychtoolbox.discourse.group/t/39-getclut-39-and-39-setclut-39-return-invalid-pointer-error-in-windows/823>\
**Category:** Uncategorized\
**Created:** [February 14, 2004, 3:14am UTC](https://psychtoolbox.discourse.group/t/39-getclut-39-and-39-setclut-39-return-invalid-pointer-error-in-windows/823 "2004-02-14T03:14:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mogwaisc](https://avatars.discourse-cdn.com/v4/letter/m/838e76/32.png) [@mogwaisc](https://psychtoolbox.discourse.group/u/mogwaisc)\
**Post date:** [February 14, 2004, 3:14am UTC](https://psychtoolbox.discourse.group/t/39-getclut-39-and-39-setclut-39-return-invalid-pointer-error-in-windows/823/1 "2004-02-14T03:14:07Z")

</div>

Hi again, another question if anyone can answer it.  
  
I'm using Matlab 6.5 and WinXP Pro with the PsychToolbox.  
  
I've successfully run OffscreenDemo, yet when I try to use SCREEN with  
the 'GetClut' or 'SetClut' arguments, I get an error there is no valid  
window or screen pointer. This is in spite of the fact I've tried  
specifically specifying the screen in the window or screen pointer  
parameter (0) before the 'GetClut' or 'SetClut' arguments. I also get  
the same error if I create a rect by calling  
"whichScreen=SCREEN('Screens') first, and using whichScreen as a  
variable for the window or screen pointer parameter.  
  
What's more, if I type the commands from the OffscreenDemo m-file into  
the command line that contain the 'SetClut' argument, I get the same  
error.  
  
This is driving me batty... why does it work with the OffscreenDemo  
m-file but not when I type the commands into the command line verbatim  
from the script? Can anyone help me out with this?  
  
Paul Thiem  
UC Santa Cruz
