With reference to CALID used in the code fragment in this article as such:
int ret;
DWORD value
CALID calid;
ret = GetLocaleInfoW( LOCALE_USER_DEFAULT,
LOCALE_ICALENDARTYPE | LOCALE_RETURN_NUMBER,
(LPWSTR)&value;,
sizeof(value) / sizeof(WCHAR) );
calid = value;
Note that LOCALE_RETURN_NUMBER is expecting a DWORD to be returned, so strictly you probably shouldn't pass in a CALID, except it happens to be a DWORD so it works.
The length that GetLocaleInfo() expects is in terms of the string, so sizeof(TCHAR) is correct, although I'd prefer use of the W version and WCHAR explicitly.
CALID is defined in WinNls.h as such:
//
// Calendar ID.
//
typedef DWORD CALID;