1. | How would you find the brushes or fonts used by the system to draw menus, dialog boxes and text? GetStockObjct |
2. | How would you start a new thread? Afxbeginthread – for worker thread only global fuction passed as parameter For ui thread , a class derived from CWinThread passed as parameter |
3. | When should an application call _beginthread rather than CreateThread? If apliation is using C run-time library (CRT) then. |
4. | How would you check if a process has terminated? GetexitCode() |
5. | Why would you use a critical section instead of a mutex? Are there any situations when a mutex would have to be used? Mutexes are slower thatn CS. If we want to synchronise two thread across different processes then |
6. | Name five IPC mechanisms supported by Window XP. What about Windows CE? |
7. | What is the difference between implicit and explicit loading of a dll? Static linking which loads automatically.- loaded throughout life of program Explicit – can use loadlibrary – take the fuction ptr use and unload library. |
8. | What is the Message Compiler and when would it be used? |
9. | How would you declare a string which could be used in an ANSI or UNICODE build? Which header would you include to support functions which could use either version of this string? Enclosed inside _T() macro for unicoade for ansi normal one (Without) |
10. | What are BSTRs and when are they used? They double byte strings used for COM. |
11. | What is the difference between a variable of type INT and a variable of type INT_PTR? One is the varialbe, another is pointer to some location |
12. | How would you determine the correct size of icons for fitting into a standard windows caption? |
13. | Why is it bad to call FindWindow based on a Window Title? |
14. | What is the difference between GetWindowRect and GetClientRect? How do you find the client rect of a child window inside another window relative to the parent? Window - It’s the size of window frame. Clients- working area. Get the handle to the child window. And call getclientrect |
15. | What form of Unicode encoding is standard on Windows? What other character encoding formats are you likely to encounter? |
16. | You find yourself drawing a string where letters appear as box characters on the screen. Why might this happen, and what would you do about it? What if the string contains characters from different code pages? It’s a different character set. |
17. | What interface do all COM classes implement and what is its purpose? Interface is the way of communicating with com. |
18. | What do you do if you have a pointer to a COM object implementing one interface but need to use another? |
19. | What is the difference between a SendMessage and a PostMessage? One sent to window never returns until handler is executed. Posted to message queue. Returns immediately Later on picked up and proccessed |
20. | Why do windows have class names and window names? It is registered to widows database to keep track of the activities. |
21. | We are building using a "Pocket PC 2003" SDK, for compatibility, but also running on "Mobile 5 Pocket PC" devices. On the |
22. | Describe the different approaches you can use to synchronise threads/processes in win32. 1. Critcal section – user for syncroinising threads from same process . Mutexes – user for syncroinising threads from different process . Semaphore – maintains resource counting against process use. |
23. | Describe the basics of the WNDPROC architecture. Its call back . having switch statement for proceeding messages. |
24. | What is a GUID and where is it used? Globally uniq id to identify a com distinctly. |
Polymorphism is the ability of different objects to react in an individual manner to the same message. This notion was imported from natural languages. For example, the verb "to close" means different things when applied to different objects. Closing a door, closing a bank account, or closing a program's window are all different actions; their exact meaning is determined by the object on which the action is performed. Most object-oriented languages implement polymorphism only in the form of virtual functions. But C++ has two more mechanisms of static (meaning: compile-time) polymorphism: Operator overloading. Applying the += operator to integers or string objects, for example, is interpreted by each of these objects in an individual manner. Obviously, the underlying implementation of += differs in every type. Yet, intuitively, we can predict what results are. Templates. A vector of integers, for example, reacts differently from a vector of string objects when it receives ...
Comments