A synchronization object is an object whose handle can be specified in one of the wait functions to coordinate the execution of multiple threads. More than one process can have a handle to the same synchronization object, making interprocess synchronization possible.

REF :: handouts Page No. 343

QNo.2 Define owner drawn items?

Answer:-

Owner-drawn items require an application to take total responsibility for drawing selected (highlighted), selected, and cleared states.

REF :: handouts Page No. 236

QNo.3 Give two disadvantages of the DLL version

Answer:-

Saves memory and reduces swapping.

Many processes can use a single DLL simultaneously, sharing a single copy of the DLL in memory.

Saves disk space.

Many applications can share a single copy of the DLL on disk. In contrast, each application built with a static link library has the library code linked into its executable image as a separate copy.

The application displays the dialog box (if it is not already displayed) by using the ShowWindow function. The application destroys the dialog box by using the DestroyWindow function. To support keyboard navigation and other dialog box functionality, the message loop for the dialog box must call the IsDialogMessage function.

REF :: handouts Page No. 267

QNo.7 Socket connect ?

Answer:-

The connect () system call connects the socket referred to by the file descriptor sockfd to the address specified by addr

Address in pointer is incremented or decremented by the size of the object it points to (char = 1 byte, int = 2 bytes, ...)

REF :: handouts Page No. 21

QNo.10 what is Bind Function?

Answer:-

The bind function is used on an unconnected socket before subsequent calls to connect or listen functions.

REF :: handouts Page No. 364

QNo.11 what is the purpose of Pager control?

Answer:-

A pager control is a window container that is used with a window that does not have enough display area to show all of its content.

REF :: handouts Page No. 305

QNo.12 what is the Mean by Resource definition Statement?

Answer:-

The resource-definition statements define the resources that the resource compiler puts in the resource (.Res) file. After the .Res file is linked to the executable file, the application can load its resources at run time as needed.

REF :: handouts Page No. 213

QNo.13 why static variables are not destroyed when function returns

Answer:-

The static variable is not destroyed on exit from the function; instead its value is preserved, and becomes available again when the function is next called.

Routing group boundaries and SMTP target destinations determine how Exchange 2000 Server encodes mail. Exchange 2000 will encode as quoted-printable or 7-bit or Transport-Neutral Encapsulation Format (TNEF) when sending between two servers /recipients in different routing groups, and to the Internet.

Exchange 2000 Server will encode in Binary or Summary TNEF when sending to a recipient/server in the same routing group.

A hot key is a key combination that generates a WM_HOTKEY message, a message the system places at the top of a thread's message queue, bypassing any existing messages in the queue

REF :: handouts Page No. 199

QNo.17 Unregister the Class function

Answer:-The process must destroy all windows using the class before the .dll is unloaded and call the UnregisterClass function.

REF :: handouts Page No. 76

QNo.18 What happen if we use DEFwinPRoc instead of dialog procedure in dialog.

Answer:-

if you call any function that results in your dialog procedure receiving a window message, the nested window message could overwrite the return value you set using DWL_MSGRESULT.

REF :: handouts Page No. 130

QNo.18 If you include CS_DBLCLKS in your window call style, the windows procedure receives which message for double click. (Specify exact sequence).

Answer:-

An application-defined window does not, by default, receive double-click messages. Because of the system overhead involved in generating double-click messages, these messages are generated only for windows belonging to classes that have the CS_DBLCLKS class style. Your application must set this style when registering the window class. For more information, see Window Classes.

REF :: handouts Page No. 208

QNo.19 Enumeration increase level of abstraction?

Answer:-

The enum declaration creates a new integer type. By convention the first letter of an enum type should be in uppercase. The list of values follows, where the first name is assigned zero, the second 1, etc.

REF :: handouts Page No. 36

QNo.20 Provide the Description of EDIT Control given below

Answer:-

EM_CANUNDO EM_GETTEXTLIMIT EM_GETHANDLE

EM_CANUNDO

Returns TRUE if the edit control operation can be undone.

EM_GETTEXTLIMIT

The size can be up to a predefined limit of approximately 32 kilobyte (KB) for single-line edit controls. Because this limit can change, it is called a soft limit

EM_GETHANDLE

Returns a handle identifying the buffer containing the multiline edit control's text. It is not processed by single-line edit controls.

REF :: handouts Page No. 277

QNo.21 What is mutex object?

Answer:-

The CreateMutex function creates or opens a named or unnamed mutex object.

REF :: handouts Page No. 346

QNo.22 how variables can share their resources across multiple process?

Answer:-Variables can be shared across multiple processes by making the separate data section as following.

Specifies the data segment where initialized variables are stored in the .obj file. OBJ files can be viewed with the dumpbin application. The default segment in the .obj file for initialized variables is .data. Variables initialized to zero are considered uninitialized and are stored in .bss.

REF :: handouts Page No. 330

QNo.23 Scope of variables in DLL file?

Answer:-

Variables defined in DLL have scope in memory until the DLL is loaded. After unloading, the variable scope is vanished. Locally defined variables are accessed within the DLL only. The variables that are set to export variables can be accessed outside the DLL if the DLL is statically linked.

REF :: handouts Page No. 329

QNo.24 the column was given about Status code of HTTP, Bad request, Request not found etc we have to match the column according to the correct status code number

Answer:-

Request line is followed by 2 Carriage-Return /Line-feed sequences.

Content-type: text/html

Content-Length:2061 Headers delimited by CR/LF sequence

Crlf Actual data follows the headers

REF :: handouts Page No. 382

QNo.24 if variables declared as export?

Answer:-

Variables declared and initialized in a scope are deleted when execution leaves that scope

REF :: handouts Page No. 66

QNo.25 about keyboard accelerator (5)

Answer:-

A keyboard accelerator, also known as a shortcut key, is a keystroke or combination of keystrokes that generates a WM_COMMAND message. Keyboard accelerators are often used as shortcuts for commonly used menu commands, but you can also use them to generate commands that have no equivalent menu items. Include keyboard accelerators for any common or frequent actions, and provide support for the common shortcut keys where they apply.

REF :: handouts Page No. 220

QNo.26 Can macro takes two arguments. Explain it with example (5)

Answer:-

Function-like macros can take arguments, just like true functions. To define a macro that uses arguments.

you insert parameters between the pair of parentheses in the macro definition that make the macro function-like. The parameters must be valid C identifiers, separated by commas and optionally whitespace.

REF :: handouts Page No. 47

QNo.27 There are three types of assertion. write any two names

Answer:-

Preconditions

Specify conditions at the start of a function.

Post conditions

Specify conditions at the end of a function.

Invariants

Specify conditions over a defined region of a program.

REF :: handouts Page No. 49

QNo.28 Explain CGI

Answer:-

CGI is Common Gateway Interface. Win32 executable execute by the server. All browser request data is available at stdin (read using scanf() etc.) and all output sent to stdout (output using printf etc.) is sent to the browser instead of the server screen.

REF :: handouts Page No. 396

QNo.29 purpose of using of REbar control

Answer:-

Rebar controls act as containers for child windows. An application assigns child windows, which are often other controls, to a rebar control band.

This macro expands to the name of the current input file, in the form of a C string constant. This is the path by which the preprocessor opened the file, not the short names specified in #include or as the input file name argument.

This macro expands to the current input line number, in the form of a decimal integer constant. While we call it a predefined macro, it's a pretty strange macro, since its "definition" changes with each new line of source code.

REF :: handouts Page No. 41

QNo.31 Difference between shortcut key and system menu

Answer:-

Shortcut key

A keyboard accelerator, also known as a shortcut key

Include keyboard accelerators for any common or frequent actions, and provide support for the common shortcut keys where they apply.

System menu

The GetSystemMenu function allows the application to access the window menu (also known as the system menu

Menu items on the window menu send WM_SYSCOMMAND messages

REF :: handouts Page No. 241

QNo.31 difference between send message () and post message ()

Answer:-

send message ()

post message ()

SendMessage control is not returned to the calling application until the window that the message was sent to has completed processing the sent message,

calls the window procedure for the specified window and does not return until the window procedure has processed the message.

SendMessage is a synchronous function.

PostMessage control is returned to the calling application immediately, regardless of weather or not the sent message has been processes.

Sends a message in the message queue associated with the thread and returns without waiting for the thread to process that messaage.

Threads major disadvantage is that they make the system slow because thread uses the time sharing concept that is another name multitasking.

A multitasking operating system divides the available processor time among the processes or threads that need it.

REF :: handouts Page No. 334

QNo.32 in my application, we are enable enumeration variable to findResource but not found? What I do for this behavior

Answer:-

FindResource replacement and how to change control style more then once in Application. As deeper we're digging in Silverlight 2.0, we finding more and more WPF things and we're really missing in Silverlight. One of such things is FindResources.

In WPF I had Visual and Logical tree, so I was able to travel the tree to find resource I need. Let's see an example of the application. We have one resource defined in App level

List box items are sorted, arranged in multiple columns, drawn by the application, and so on.

Pointer Arithmetic

Deal with performing addition and subtraction operations on pointer variables.

REF :: handouts Page No. 21 ,287

QNo.34 Define pager and list-view

Answer:-

Pager:-

A pager control is a window container that is used with a window that does not have enough display area to show all of its content

List-view

A list-view control is a window that displays a collection of items. The control provides several ways to arrange and display the items.

REF :: handouts Page No. 305

QNo.35 GetParent Syntax?

Answer:-

HWND GetParent

(

HWND hWnd // handle to child window

);

REF :: handouts Page No. 186

QNo.36 what is the purpose of Bind Function?

Answer:- The bind function associates a local address with a socket. The bind function is used on an unconnected socket before subsequent calls to connect or listen functions. It is used to bind to either connection-oriented (stream) or connectionless (datagram) sockets. When a socket is created with a call to the socket function, it exists in a namespace (address family), but it has no name assigned to it. Use the bind function to establish the local association of the socket by assigning a local name to an unnamed socket.

REF :: handouts Page No. 377

QNo.37 what is the purpose of List View Control?

Answer:-

List View is another useful control in windows systems.

List view control list the items in its window. These items can be selected and clicked on each click list box send notification message to its parent window.

List View control makes data binding easier than previous controls. It has included styling with CSS, flexible pagination, and sorting, inserting, deleting, and updating features.

REF :: handouts Page No. 298

QNo.38 what is a custom resource?

Answer:-

Resource is binary data that you can add to the executable file of a Windows-based application. A resource can be either standard or defined. The data in a standard resource describes an icon, cursor, menu, dialog box, bitmap, enhanced metafile, font, accelerator table, message-table entry, string-table entry, or version information. An application- defined resource, also called a custom resource, contains any data required by a specific application.

A DLL (Dynamic Link Library) is a file that can be loaded and executed by programs dynamically. Basically it's an external code repository for programs. Since usually several different programs reuse the same DLL instead of having that code in their own file, this dramatically reduces required storage space. A synonym for a DLL would be library.

DLL does not have main function but exe has main function

Here DLL is in process component, both component and consumer will share same memory and Exe is out process component, it will run in its own memory.

An exe is an executable program. A DLL (Dynamic Link Library) is a file that can be loaded and executed by programs dynamically. Basically it's an external code repository for programs. Since usually several different programs reuse the same DLL instead of having that code in their own file, this dramatically reduces required storage space. A synonym for a DLL would be library.

DLL file it is usually the file contains information about programs. EXE is file which can be run and reading a information from DLL and other files to execute program.

When a minimized window is maximized, Windows requests the application to repaint the client area. The WM_PAINT message is sent when the system or another application makes a request to paint a portion of an application's window. The message is sent when the UpdateWindow or RedrawWindow function is called, or by the DispatchMessage function when the application obtains a WM_PAINT message by using the GetMessage or PeekMessage function.

The resource-definition statements can be divided into the following categories:

Resources

Controls

Statements

REF :: handouts Page No.214

QNo.41 Write down any three parameter of send function?

The flags parameter can be used to influence the behavior of the function beyond the options specified for the associated socket.

Calling send with a zero len parameter is permissible and will be treated by implementations as successful

addr: Optional pointer to a buffer that receives the address of the connecting entity, as known to the communications layer.

REF :: handouts Page No.383

QNo.41 briefly explain Checkbox?

Check Boxes

A check box consists of a square box and application-defined text (label), an icon, or a bitmap, that indicates a choice the user can make by selecting the button. Applications typically display check boxes in a group box to permit the user to choose from a set of related, but independent options. For example, an application might present a group of check boxes from which the user can select error conditions that produce warning beeps. A check box can be one of four styles: standard, automatic, three-state, and automatic three-state, as defined by the constants BS_CHECKBOX, BS_AUTOCHECKBOX, BS_3STATE, and BS_AUTO3STATE, respectively. Each style can assume two check states: checked (a check mark inside the box) or cleared (no check mark). In addition, a three-state check box can assume an indeterminate state (a grayed box inside the check box). Repeatedly clicking a standard or automatic check box toggles it from checked to cleared and back again. Repeatedly clicking a three-state check box toggles it from checked to cleared to indeterminate and back again. When the user clicks a check box (of any style), the check box receives the keyboard focus. The system sends the check box's parent window a WM_COMMAND message containing the BN_CLICKED notification code. The parent window doesn't acknowledge this message if it comes from an automatic check box or automatic three-

state check box, because the system automatically sets the check state for those styles. But the parent window must acknowledge the message if it comes from a check box or three-state check box because the parent window is responsible for setting the check state for those styles. Regardless of the check box style, the system automatically repaints the check box once its state is changed.

REF :: handouts Page No.282

QNo.42 Write down the basic socket operation.

Answer:-

The following are the basic operations performed by both server and client systems.

1. Create an unbound socket

2. Binding Server

3. Connecting Client

4. Listen

5. Accept

6. Send

7. Receive 27.7 Windows Socket Library

REF :: handouts Page No.358

QNo.43What is mean by process 2marks

Answer:-

When you tell your computer to run a program, a new process is created which runs the code in that program. A process is an instance of a program

Resource Only DLL contains only resource of different language and local types. Resource only DLLs do not contain Entry Point or any DllMain Function.

Use of resource-only DLL is for internationalization

REF :: handouts Page No.322

QNo.46 How can I return multiple values from a function? Illustrate the concept using C++

code (5 marks)

you can only return 1 variable using "return". there is a way to do what you want though. basically you pass the address of the "two" and "five" variables. example: int n, two, five; fcnName(n, &two, &five) //no need to return anything { //your function code }

QNo.47 If you include CS-DBLCLKS in your window call style, the windows procedure receives which message for double click. (Specify exact sequence)

Answer:-

CS_DBLCLKS class style. Your application must set this style when registering the window class. For more information, see Window Classes.

A double-click message is always the third message in a four-message series. The first two messages are the button-down and button-up messages generated by the first click. The second click generates the double-click message followed by another button-up message. For example, double-clicking the left mouse button generates the following message sequence:

REF :: handouts Page No.208

QNo.48How do I restrict my window so it can't be resized larger or smaller than a certain size?

Answer:-

You restrict your window's size by handling the WM_GETMINMAXINFO message. Your handler receives a pointer to a MINMAXINFO struct, which you fill in with the minimum and/or maximum size for your window. Here is an example that keeps the window between 100x150 and 600x400 pixels in size.