20#ifdef INCLUDE_CMD_ASSOC
29 DWORD dwFileTypeLen = 0;
60 WARN(
"Cannot allocate memory for pszFileType!\n");
77 if (dwFileTypeLen != 0)
138 WARN(
"Cannot allocate memory for pszExtName!\n");
143 for (dwKeyCtr = 0; dwKeyCtr < dwNumKeys; ++dwKeyCtr)
145 DWORD dwBufSize = dwExtLen;
146 lRet =
RegEnumKeyEx(hKeyClasses, dwKeyCtr, pszExtName, &dwBufSize,
152 if (*pszExtName ==
_T(
'.'))
258 if (pEqualSign !=
NULL)
260 PTSTR pszFileType = pEqualSign + 1;
267 if (*pszFileType == 0)
static VOID ErrorMessage(_In_ DWORD dwErrorCode, _In_opt_ PCWSTR pszMsg,...)
static LONG PrintAssociation(IN PCTSTR pszExtension)
static LONG AddAssociation(IN PCTSTR pszExtension, IN PCTSTR pszType)
INT CommandAssoc(LPTSTR param)
static LONG PrintAllAssociations(VOID)
static LONG RemoveAssociation(IN PCTSTR pszExtension)
static LONG PrintAssociationEx(IN HKEY hKeyClasses, IN PCTSTR pszExtension)
VOID ConOutResPaging(BOOL StartPaging, UINT resID)
#define ConOutPrintf(szStr,...)
#define ConErrResPrintf(uID,...)
#define STRING_ASSOC_ERROR
#define STRING_ERROR_WHILE_PROCESSING
#define STRING_ASSOC_HELP
#define RegCloseKey(hKey)
#define ERROR_NOT_ENOUGH_MEMORY
#define ERROR_FILE_NOT_FOUND
#define KEY_CREATE_SUB_KEY
#define REG_OPTION_NON_VOLATILE
#define KEY_ENUMERATE_SUB_KEYS
#define HKEY_LOCAL_MACHINE