Example #1
0
static INT_PTR srvRegister(WPARAM wParam, LPARAM lParam)
{
	CRYPTO_PROVIDER *p = (CRYPTO_PROVIDER*)lParam;
	if (p == NULL || p->dwSize != sizeof(CRYPTO_PROVIDER))
		return 1;

	CRYPTO_PROVIDER *pNew = new CRYPTO_PROVIDER(*p);
	pNew->pszName = mir_strdup(p->pszName);
	if (pNew->dwFlags & CPF_UNICODE)
		pNew->ptszDescr = mir_u2t(TranslateW_LP(p->pwszDescr, wParam));
	else
		pNew->ptszDescr = mir_a2t(TranslateA_LP(p->pszDescr, wParam));
	arProviders.insert(pNew);
	return 0;
}
Example #2
0
static INT_PTR srvTranslateString(WPARAM wParam, LPARAM lParam)
{
	if (wParam & LANG_UNICODE)
		return (INT_PTR)TranslateW_LP((const WCHAR*)lParam, wParam);
	return (INT_PTR)TranslateA_LP((const char *)lParam, wParam);
}