GetKerningPairs

  DWORD GetKerningPairs(hdc, nNumPairs, lpKernPairEntries)    
  HDC hdc;    
  DWORD nNumPairs;    
  LPKERNINGPAIR lpKernPairEntries;    

The GetKerningPairs function retrieves the character kerning pairs for the currently selected font for the given DC.

Parameters

hdc

Identifies the device context.

nNumPairs

Specifies the number pairs that will fit in the lpKernPairEntries array. If the font has more than nNumPairs kerning pairs an error will be returned.

lpKernPairEntries

Points to an array of KERNINGPAIR structures to receive the kerning pairs. The array must contain at least as many data structures as specified by the nNumPairs parameter. If this parameter is NULL, the function will return the total number of kerning pairs for the font.

Return Value

The return value is the number of kerning pairs returned. It is zero if the function failed.