Click here to Skip to main content
15,922,512 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: While running my application , Machine (PC) gets slow Pin
Stephen Hewitt29-Jun-06 20:45
Stephen Hewitt29-Jun-06 20:45 
GeneralCPU usage is more - While running my application , Machine (PC) gets slow Pin
zahid_ash29-Jun-06 20:59
zahid_ash29-Jun-06 20:59 
GeneralRe: CPU usage is more - While running my application , Machine (PC) gets slow Pin
Stephen Hewitt29-Jun-06 21:06
Stephen Hewitt29-Jun-06 21:06 
GeneralRe: CPU usage is more - While running my application , Machine (PC) gets slow Pin
zahid_ash29-Jun-06 21:18
zahid_ash29-Jun-06 21:18 
GeneralRe: CPU usage is more - While running my application , Machine (PC) gets slow Pin
blue_rabbit29-Jun-06 21:41
blue_rabbit29-Jun-06 21:41 
GeneralRe: CPU usage is more - While running my application , Machine (PC) gets slow Pin
Stephen Hewitt30-Jun-06 3:51
Stephen Hewitt30-Jun-06 3:51 
Questionproblem in STL list erase method Pin
Raj Prathap29-Jun-06 20:15
Raj Prathap29-Jun-06 20:15 
AnswerRe: problem in STL list erase method Pin
Michael Dunn29-Jun-06 20:59
sitebuilderMichael Dunn29-Jun-06 20:59 
GeneralRe: problem in STL list erase method Pin
Raj Prathap29-Jun-06 21:19
Raj Prathap29-Jun-06 21:19 
AnswerRe: problem in STL list erase method Pin
Stephen Hewitt29-Jun-06 21:01
Stephen Hewitt29-Jun-06 21:01 
GeneralRe: problem in STL list erase method Pin
Raj Prathap29-Jun-06 21:09
Raj Prathap29-Jun-06 21:09 
Questionabout Ctime Pin
vasusree29-Jun-06 20:12
vasusree29-Jun-06 20:12 
AnswerRe: about Ctime Pin
_AnsHUMAN_ 29-Jun-06 21:08
_AnsHUMAN_ 29-Jun-06 21:08 
GeneralRe: about Ctime Pin
happy_ram29-Jun-06 21:11
happy_ram29-Jun-06 21:11 
QuestionRe: about Ctime Pin
David Crow30-Jun-06 3:04
David Crow30-Jun-06 3:04 
Questionplease help.. urgent [modified] Pin
sriv_1829-Jun-06 20:02
sriv_1829-Jun-06 20:02 
AnswerRe: please help.. urgent Pin
Cedric Moonen29-Jun-06 20:31
Cedric Moonen29-Jun-06 20:31 
GeneralRe: please help.. urgent Pin
sriv_1830-Jun-06 23:23
sriv_1830-Jun-06 23:23 
GeneralRe: please help.. urgent Pin
Cedric Moonen1-Jul-06 2:03
Cedric Moonen1-Jul-06 2:03 
AnswerRe: please help.. urgent Pin
Hamid_RT29-Jun-06 20:43
Hamid_RT29-Jun-06 20:43 
QuestionSave button and encryption.... [modified] Pin
we3Guy29-Jun-06 19:55
we3Guy29-Jun-06 19:55 
QuestionMSMQ Sample App Pin
Rinu_Raj29-Jun-06 19:38
Rinu_Raj29-Jun-06 19:38 
AnswerRe: MSMQ Sample App Pin
Hamid_RT29-Jun-06 20:16
Hamid_RT29-Jun-06 20:16 
QuestionSizeOfResource () problem using String Table Pin
sach!!29-Jun-06 19:06
sach!!29-Jun-06 19:06 
hi !!

I am facing some problem retrieving size of a string from string Table. I am using FindResource() function to get handle for the resource.
I refered MSDN and get to know that String Table is stored as a block of memory of 16. Thus FindResource() will always give me address of that block. I am successfully retrieving handle to the block where the desired string is present.

The problem is I know at which place/ index the string is present in that block. But dont know how to retrieve it!! I want to get its size.

Can somebody plz help me on this!

Thx in advance

I am posting the code here
LPSTR GetErrorString(UINT uiStringId)
{
	int iRetVal=0;
	DWORD dwResSize=0;
	char temp[10];
	HRSRC hRes;

	//get the ID of the block
                DWORD nID = (uiStringId >> 4) + 1;

	//get the offset of the item within the block
	DWORD nitemID = uiStringId % 0x10;

	//get handle to the beginning of the block of 16 strings, where each string begins with its size
	hRes = FindResource(gl_hModule,MAKEINTRESOURCE(nID), RT_STRING); 

	
                //how to get the size of the string here, curretly giving the size of the block
               dwResSize=SizeofResource(gl_hModule,hRes);

    ....
...
..}

AnswerRe: SizeOfResource () problem using String Table Pin
Optimus Chaos29-Jun-06 20:22
Optimus Chaos29-Jun-06 20:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.