Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

access.c File Reference

#include "Windef.h"
#include "WinGdi.h"
#include <wtypes.h>
#include "ICM.h"
#include "General.h"

Go to the source code of this file.

Functions

CMError CMGetProfileHeader (CMProfileRef prof, CMCoreProfileHeader *header)
CMError CMGetProfileElement (CMProfileRef prof, OSType tag, unsigned long *elementSize, void *elementData)
CMError CMGetPartialProfileElement (CMProfileRef prof, OSType tag, unsigned long offset, unsigned long *byteCount, void *elementData)
Boolean CMProfileElementExists (CMProfileRef prof, OSType tag)


Function Documentation

CMError CMGetPartialProfileElement CMProfileRef  prof,
OSType  tag,
unsigned long  offset,
unsigned long *  byteCount,
void *  elementData
 

Definition at line 85 of file ntgdi/icm/mscmm/mscmm/access.c.

References BOOL, cmElementTagNotFound, CMError, GetColorProfileElement(), and noErr.

00090 { 00091 BOOL bool; 00092 BOOL ret; 00093 00094 if (!byteCount) 00095 { 00096 return -1; 00097 } 00098 SetLastError(0); 00099 /*ret = IsColorProfileTagPresent( (HPROFILE)prof, (TAGTYPE)tag, &bool );*/ 00100 if( elementData == 0 ) *byteCount = 0; 00101 ret = GetColorProfileElement( (HPROFILE)prof, (TAGTYPE)tag, offset, byteCount, elementData, &bool ); 00102 if( ret ) return (noErr); 00103 /* GetColorProfileElement returns FALSE for calls with elementData = 0 00104 but byteCount is set correctly */ 00105 else if( elementData == 0 && GetLastError() == ERROR_INSUFFICIENT_BUFFER ) return (noErr); 00106 00107 return (cmElementTagNotFound); 00108 }

CMError CMGetProfileElement CMProfileRef  prof,
OSType  tag,
unsigned long *  elementSize,
void *  elementData
 

Definition at line 59 of file ntgdi/icm/mscmm/mscmm/access.c.

References CMError, CMGetPartialProfileElement(), and OSType.

00063 { 00064 return (CMGetPartialProfileElement(prof, tag, 0, elementSize, elementData)); 00065 }

CMError CMGetProfileHeader CMProfileRef  prof,
CMCoreProfileHeader header
 

Definition at line 30 of file ntgdi/icm/mscmm/mscmm/access.c.

00032 { 00033 BOOL bool; 00034 CMError ret = badProfileError; 00035 00036 bool = GetColorProfileHeader( (HPROFILE)prof, (PPROFILEHEADER) header ); 00037 if (header->magic == icMagicNumber && bool ) 00038 ret = noErr; 00039 00040 return (ret); 00041 }

Boolean CMProfileElementExists CMProfileRef  prof,
OSType  tag
 

Definition at line 123 of file ntgdi/icm/mscmm/mscmm/access.c.

References BOOL, Boolean, and IsColorProfileTagPresent().

00125 { 00126 BOOL bool; 00127 IsColorProfileTagPresent( (HPROFILE)prof, (TAGTYPE)tag, &bool ); 00128 return (BOOLEAN)bool; 00129 }


Generated on Sat May 15 19:42:48 2004 for test by doxygen 1.3.7