I don`t know the reason but my dll isn`t be able to load resources. Even that simple code below, fails.
CString str;
str.LoadResource(IDS_MYSTR);

I tried to create a modal dialog but it also failed to load resource of the dialog template.
CDialog myDlg(IDD_DIALOG_MYDLG);
myDlg.DoModal(); // Returns -1

I even tried to write;

CDialog *pMyDlg = new CDialog;
pMyDlg->Create(IDD_DIALOG_MYDLG); //Create(...) asserts


in dlgcore.cpp

BOOL CDialog::Create(LPCTSTR lpszTemplateName, CWnd* pParentWnd)
{
ASSERT(IS_INTRESOURCE(lpszTemplateName) || AfxIsValidString(lpszTemplateName));

m_lpszTemplateName = lpszTemplateName; // used for help
if (IS_INTRESOURCE(m_lpszTemplateName) && m_nIDHelp == 0)
m_nIDHelp = LOWORD((DWORD_PTR)m_lpszTemplateName);

#ifdef _DEBUG
if (!_AfxCheckDialogTemplate(lpszTemplateName, FALSE))
{


ASSERT(FALSE); // invalid dialog template

!!!! DEBUGGER STOPS EXECUTION {AFTER THE ASSERT(FALSE)} HERE !!!!!!

namePostNcDestroy(); // cleanup if Create fails too soon
return FALSE;
}
#endif //_DEBUG

......
.....
}

I don`t know how to overcome that problem. If you have experienced the same problem and/or know the solution, would you please let me know

Thanks in advance