how to include rcdata in a exe file included in a .rc2 file,which is included in a dll file

302 Views Asked by At

I am creating a project in vs2017, i have created a "windows desktop wizard-windows Applicatio(.exe) project" and i have included "windows desktop wizard- dynamic link library(.dll) project.

I have included all the resource file in the dll file.i have to include localized language string of the application.i have .rc2 file available which has different strings defined in a specific language.I have 40 .rc2 files each containing RCDATA(cum string) in different languages and i am trying to load those RCDATA from my exe project.

i got the handle of the dll,but when i am using the following code i am getting NULL.

hHRSRC = FindResourceEx( hInst, RT_RCDATA, MAKEINTRESOURCE(ID), langid);

where hInst= handle of dll; Id= id of the RCDATA defined in .rc2 file

PS. when i am including all the .rc2 files in my exe project,it is working properly. getlasterror() giving the error no. 1814. so i guess RCDATA is not defined to exe project,how can i define it and is there any specific way to add .rc2 file in the dll project which enables the project to read it!?

0

There are 0 best solutions below