What is the difference between hinsrtance and hprevinstance
in WinMain function?

Answers were Sorted based on User's Feedback



What is the difference between hinsrtance and hprevinstance in WinMain function? ..

Answer / sagar sawant

if you are using 32-bit os then the entry to the
hPrevInstance is always NULL.
It was used in the 16 bit os where the instance of
previosly running application was saved . so that it can be
refered again ! due the memory restriction.

Is This Answer Correct ?    6 Yes 0 No

What is the difference between hinsrtance and hprevinstance in WinMain function? ..

Answer / fahim

hInstance : will be having the handle of the current
instance
hPrevInctance : will be having the handle of last instance
hPrevInstance is NULL if only one instance is running

Is This Answer Correct ?    4 Yes 0 No

What is the difference between hinsrtance and hprevinstance in WinMain function? ..

Answer / manish

int WINAPI WinMain(HINSYANCE,HINSTANCE(prev),LPSTR,int)
hPrevInstance is usefull at 16 bit plateform .Its value
alwys NULL at 32 bit plateform.
hprevInstance is Handle to the previous instance of the
application.
hInstance strores current running application

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More MFC Interview Questions

Which Macro is a Super set of other two macro DECLARE_SERIAL,DECLARE_DYNAMIC and DECLARE_DYNCREATE. ?

2 Answers   Sony,


What is the base class for MFC

3 Answers   HCL,


1)how to Display the File Dialog Box, in MFC ?

1 Answers  


What four types of properties are supported by an ActiveX control?

1 Answers  


Tell me the work of HTREDUCE and HTZOOM

1 Answers   E Logic,






General purpose classes in MFC

1 Answers   TCS,


1)why we cant create more than one instance of the class Derived from CWinApp

5 Answers   Alstom,


If application hangs while SendMessage is waiting for the result, how you handle it?

2 Answers  


What is difference between the TCP/IP and UDP socket

5 Answers   Invensys,


Explain Doc/View architecture

6 Answers   Huawei,


what is the use of AFX_MANAGE_STATE ?

4 Answers   HCL,


Can you explaing the relashionship between document,frame and view ?

2 Answers  


Categories