DoModal throws an access violation only for one language
I have a few dialogs, icons, bitmaps, strings that I've localized in the
I've created a separate resource only dll which has a separate RC file for
This project also has a different build configuration for each language.
So that in that configuration only that dll will build and the resources
pane in the project properties will be set to the proper culture for each
I am loading that dll from a COM c++ dll in the following way:
m_hDll = ::LoadLibraryEx(filename.c_str(),NULL,LOAD_LIBRARY_AS_DATAFILE);
ATLASSERT(m_hDll != NULL);
It loads successfully and loads the correct file.
For all the languages, but german, everything else also works good.
For german, DoModal throws an access violation.
Debugging MFC shows that this line throws the exception :
hWnd = ::CreateDialogIndirect(hInst, lpDialogTemplate,
hInst, lpDialogTemplate, AfxDlgProc are all fine and valid adresses.
m_hWnd of the pParentWnd is not :
m_hWnd CXX0030: Error: expression cannot be evaluated
At first I was getting an assertion failure in the MFC code, in
COccManager::CreateDlgControls, on the following lines :
COleControlSiteOrWnd *pTemp = new COleControlSiteOrWnd(::GetDlgItem
After a couple of reruns it became an access violation.
The interesting part is that if I switch to a non german regional setting
and load the german resources file, it works.
Once the regional settings are set to german loading any language resource
file produces the same failure on DoModal.
I've compared the build configuration settings and the rc file to the other
languages and their rc and definitions.
It's all the same besides the language setting parts...
Any ideas ?
What to look for ?
Can it be a problem with the german language pack installtion ???
The other problem is for all the languages :
One of the ctrls of the dialog is an ATL Composite Ctrl which comes from
another project. It is supposed to show the text TEXT.
What happens is that my dialog shows the language extension, according to
the culture in my regional settings, right before that text:
Where does that come from ? How do I get rid of that ?
By Mike Tsakiris in forum .NET
Last Post: 10-04-2002, 06:32 PM
By FloridaSteve in forum Database
Last Post: 12-11-2001, 09:02 PM
By Jason Thorn in forum .NET
Last Post: 02-12-2001, 01:03 PM
By Blither in forum Database
Last Post: 01-14-2001, 02:09 PM
By Andy in forum VB Classic
Last Post: 12-30-2000, 06:24 AM
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL