I have a Managed C++ DLL used by a C# application. I'm building with VS .NET
2002.
I have a resx file loaded with string data. The C# application can access
the string data fine, like so:
ResourceManager rm = new ResourceManager("DS.Names",
Assembly.GetExecutingAssembly());
String text = rm.GetString("1");
Now in my Managed C++ DLL I want to do the same thing:
ResourceManager* rm = new ResourceManager("DS.Names",
Assembly::GetExecutingAssembly());
System::String* text = rm->GetString("1");
However, while it compiles fine if fails with this error on the GetString
line:
'System.Resources.MissingManifestResourceException' occurred in
mscorlib.dll.
Clearly the C++ DLL cannot locate the resource.
Is it possible to share this resx file between C# and C++? If so, how?
Thanks.
Dave L - 04 May 2004 23:56 GMT
Ok, I think I've determined that resx files are not supported on .NET 2002
and C++.
Maybe .NET 2003 and Framework 1.1 supports this.
Can anyone confirm this?
Thanks.
> I have a Managed C++ DLL used by a C# application. I'm building with VS .NET
> 2002.
[quoted text clipped - 23 lines]
>
> Thanks.
Dave L - 05 May 2004 00:28 GMT
I found a work around.
Use the Resource File Generator (resgen.exe) and convert from a resx to a
resources file. Then ResourceReader can be used by C++ to read the data as
opposed to ResXResourceReader.
This can be automated in the build process.
> Ok, I think I've determined that resx files are not supported on .NET 2002
> and C++.
[quoted text clipped - 33 lines]
> >
> > Thanks.