Saturday, July 9, 2016

Windows Programming

Windows NT began supporting multi-threaded applications as so it was fully re-entrant and makes applications to run on it based on the preemptive approach.

What is a difference between an interrupt and an exception?

Interrupt is an asynchronous event, which does happen out of the context ( Means not related to what the process is executing) and are majorly generated by I/O device, processor clocks or timers etc. Whereas an exception is a synchronous condition happens due to the execution of a particular instruction. And one can reproduce this by running the program second time with the same setup and environment used.

How is 'trap' different from 'interrupt' and 'exception'?

Trap is a processor's mechanism to capture an execution thread when an interrupt or an exception occurs and transferring control to a trap handler, which is a function specific to a particular interrupt or exception.

What are the advantages of using DLL’s?

DLLs can be loaded during run-time (or program execution) when it is needed and hence it will not be part of the executable binary image. So EXE and DLL can vary independently and NO need to recompile the EXE when DLL is changed. And can be reused in other Applications too.

What are the different types of DLL’s?

SDK DLL (without MFC): Is a old style of creating DLL with pure Win32 calls.
Regular: Is an MFC DLL and can be used by both MFC and Non MFC Applications like VB and other languages, which supports DLL access. 
Extension: Is also an MFC DLL and can be used by MFC Applications only.