J
Jose Luis Bravo
Hellow,
We are using VS 2003 (C#) to develop applications running on a handheld
device over
Windows CE NET 4.2. The operating system used is made using Platform Builder
4.2,
(our system is based on a PXA255 proccessor) and our problem is the
following:
Some weeks ago, we started to use a new dual-language (spanish-english)
operating system
image and, suddenly, the applications we had been using with the previous OS
images
(only in spanish) stopped to work due to a generic
"PlatformNotSupportedException".
When we did some checks, we saw that, whatever the default language in the
SO be, spanish
or english, the applications only worked if we set the "regional settings"
to
"english-United States". We jumped over this problem for a time due to more
important issues, but
now we are trying to find a solution again...
After some research, what we have seen is this:
1) the exact point where the Exception is being thrown: when the application
launch the first
Form, his constructor call InitializeComponent() and, after defining a
ResourceManager object,
when it try to load a resource using GetObject() the Exception is thrown;
the information
shown is this:
CultureInfo::ctor+0xb3
CultureInfo::get_Parent+0x25
ResourceManager::InternalGetResourceSet+0x13b
ResourceManager::GetObject+0x2a
ResourceManager::GetObject+0x8
Form1::InitializeComponent+0x58
Form1::ctor+0xc
Form1::Main+0x5
So, apparently, it is due to a problem with the language settings, as it
could be expected...
2)
When i use both CultureInfo.CurrentCulture.LCID and
CultureInfo.CurrentUICulture.LCID on
the device, the returned value in both cases is 0x0c0a (matching with
spanish-international
sorting as it should). The two codes supported in our OS image are 0x0c0a
and 0x0409
(english-USA).
3)
Looking the documentation, it seems that ResourceManager should take the
resources associated
to the cultural reference of the current thread, that, according to what i
have explained,
should be 0x0c0a... so *i suppose* that the problem must be that the
resources included in
the binary are not associated with that reference, and maybe they are
associated with
0x0409, or something so...
Does anybody have an idea on what is happening? Maybe i should add some
compiler options to
force the association with the other cultural reference? if so, how it must
be done? I would
like to note that, indeed, there is nothing culture-specific in those
resources (they are
mostly bitmaps), so we don't want satellite assemblies or the like.
If somebody could give me an orientation, it would be greatly appreciated...
Thanks in advance.
We are using VS 2003 (C#) to develop applications running on a handheld
device over
Windows CE NET 4.2. The operating system used is made using Platform Builder
4.2,
(our system is based on a PXA255 proccessor) and our problem is the
following:
Some weeks ago, we started to use a new dual-language (spanish-english)
operating system
image and, suddenly, the applications we had been using with the previous OS
images
(only in spanish) stopped to work due to a generic
"PlatformNotSupportedException".
When we did some checks, we saw that, whatever the default language in the
SO be, spanish
or english, the applications only worked if we set the "regional settings"
to
"english-United States". We jumped over this problem for a time due to more
important issues, but
now we are trying to find a solution again...
After some research, what we have seen is this:
1) the exact point where the Exception is being thrown: when the application
launch the first
Form, his constructor call InitializeComponent() and, after defining a
ResourceManager object,
when it try to load a resource using GetObject() the Exception is thrown;
the information
shown is this:
CultureInfo::ctor+0xb3
CultureInfo::get_Parent+0x25
ResourceManager::InternalGetResourceSet+0x13b
ResourceManager::GetObject+0x2a
ResourceManager::GetObject+0x8
Form1::InitializeComponent+0x58
Form1::ctor+0xc
Form1::Main+0x5
So, apparently, it is due to a problem with the language settings, as it
could be expected...
2)
When i use both CultureInfo.CurrentCulture.LCID and
CultureInfo.CurrentUICulture.LCID on
the device, the returned value in both cases is 0x0c0a (matching with
spanish-international
sorting as it should). The two codes supported in our OS image are 0x0c0a
and 0x0409
(english-USA).
3)
Looking the documentation, it seems that ResourceManager should take the
resources associated
to the cultural reference of the current thread, that, according to what i
have explained,
should be 0x0c0a... so *i suppose* that the problem must be that the
resources included in
the binary are not associated with that reference, and maybe they are
associated with
0x0409, or something so...
Does anybody have an idea on what is happening? Maybe i should add some
compiler options to
force the association with the other cultural reference? if so, how it must
be done? I would
like to note that, indeed, there is nothing culture-specific in those
resources (they are
mostly bitmaps), so we don't want satellite assemblies or the like.
If somebody could give me an orientation, it would be greatly appreciated...
Thanks in advance.