I was hoping that was the case, but my code looks like this so I think it's
more complicated:

Void TestColor( void )
{
RGBColorType    palmColor;
UInt16          colorIndex;

    palmColor.r = 0;
    palmColor.g = 0;
    palmColor.b = 0;

    colorIndex = WinRGBToIndex( &palmColor );
}

The RGBColorType is allocated right there on the stack so there's no chance
of having a null pointer. I've tested some more and tried to use
WinSetForeColorRGB if the device has direct color. That 'causes an identical
crash. From what I can see from the stack trace it looks like
WinSetForeColorRGB calls WinRGBToIndex which explains why.

Could something be wrong with my Form?

Eric


On 3/24/02 9:53 AM, "Joe" <[EMAIL PROTECTED]> wrote:
> It seems likely that you have passed a NULL pointer in to
> WinRGBToIndex(), which expects a pointer to a RGBColorType.
> 
> For Example:
> 
> RGBColorType *rgbP = NULL;
> IndexedColorType ict;
> ...
> ict = WinRGBToIndex(rgbP);  // rbbP is 0x00000000 so this fails
> 
> --- Eric Snider <[EMAIL PROTECTED]> wrote:
>> I'm having problems with WinRGBToIndex() on the Visor
>> Prism.  Here's the report from the Emulator:
>> 
>>     "Ultimate (1.0) just read from memory location 0x00000000,
>>      which is in low memory..."
>> 
>> When this happens it's on a call to WinRGBToIndex().
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Movies - coverage of the 74th Academy Awards?
> http://movies.yahoo.com/


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to