I'm doing this in my code:
I just want to make absolutely doubly-doubly certain that you don't need to do any clean-up after these calls when you are done with the resource, because I just find it hard to believe (no offense Mr Gates) that Windows really doesn't to deallocate these loaded resources.
What happens if it runs out of pages to map the resources to memory?
- Code:
// Get a pointer to the binary resource
Inst=GetModuleHandle(NULL);
hr=FindResource(Inst,MAKEINTRESOURCE(Id),RT_RCDATA);
if (hr==NULL) return NULL;
hg=LoadResource(Inst,hr);
if (hg==NULL) return NULL;
Data=(unsigned char *)LockResource(hg);
if (pLen) *pLen=(int)SizeofResource(Inst,hr);
I just want to make absolutely doubly-doubly certain that you don't need to do any clean-up after these calls when you are done with the resource, because I just find it hard to believe (no offense Mr Gates) that Windows really doesn't to deallocate these loaded resources.
What happens if it runs out of pages to map the resources to memory?