S
sealo
Hello, dear guys,
I met another curious issue of finding the resources.
There was a dynamic file, which include a resource:
/////////////////////////////////////////////////////////////////////////////
//
// RCDATA
//
IDR_FX_CLASSICMATERIAL RCDATA "..\\Shaders\
\ClassicMaterial.fx"
And, the app could load the dll, and working fine.
But, I convert it into the the static lib, then it broken down. I
check the code in the library, the error was in FindResource function:
HRSRC hResource = ::FindResource(gModule,
MAKEINTRESOURCE(IDR_FX_CLASSICMATERIAL), RT_RCDATA);
The return value was zero. I don't know why this happen if it's static
library.
The error message was : "The speicified type cannot be found in the
image file"
I first guest maybe it's HINSTANCE fault, but when I add the header
IMAGE_DOS_HEADER, it still the same fault.
Have you met this issue before?
I met another curious issue of finding the resources.
There was a dynamic file, which include a resource:
/////////////////////////////////////////////////////////////////////////////
//
// RCDATA
//
IDR_FX_CLASSICMATERIAL RCDATA "..\\Shaders\
\ClassicMaterial.fx"
And, the app could load the dll, and working fine.
But, I convert it into the the static lib, then it broken down. I
check the code in the library, the error was in FindResource function:
HRSRC hResource = ::FindResource(gModule,
MAKEINTRESOURCE(IDR_FX_CLASSICMATERIAL), RT_RCDATA);
The return value was zero. I don't know why this happen if it's static
library.
The error message was : "The speicified type cannot be found in the
image file"
I first guest maybe it's HINSTANCE fault, but when I add the header
IMAGE_DOS_HEADER, it still the same fault.
Have you met this issue before?