by tim >> Sat, 26 Jul 2008 1:28:10 GMT
hi im having trouble returning a binary. the code im using is to calc ttf checksum like the example here about half way down the page
www.microsoft.com/typography/otspec/otff.htm
im not getting back any value from this:
extern "C" DllExport int JOMAPI
ttfCheckSum(DskBuffer* pBuffer, DskParam* pParams, DskParam* pReturn)
{
BYTE *data;
Size length;
ULONG *table;
ULONG sum = 0;
paramGetBinary(*pParams,data,length);
//if((length % 4) != 0) return 0;
table = (ULONG*)data;
ULONG Sum = 0L;
ULONG *endptr = table+((length+3) & ~3) / sizeof(ULONG);
while(table < endptr)
{
sum += *table++;
}
sum++; //just to check if above code does anything but this is still returning 00000000
return paramSetBinaryData(*pReturn,(BYTE*)∑,sizeof(ULONG));
}