Answer to Question #198966 in Java | JSP | JSF for Lucy ukoh

Question #198966

a) With suitable illustration, discuss the relationship between processes and threads and how a process is created in Windows.

AP,6

b) Using the Windows API, write a C/C++ system program to delete a file in the Windows file system. Compile and run the program and copy the source code into your answer booklet.

CR,8

c) Discuss the Windows registry and how it is use in data/information management. AN,6


1
Expert's answer
2021-05-28T04:27:13-0400

a) A process is a program in execution. That means it has been allocated processor time and all resources necessary for it to run. A thread on the other hand is a subcomponent of a process. A process may consist of one or more threads.


b)Create a DLL header file Remove.h and the driver program that make use of the file.



//DLL header file Remove.h
class REMOVE_API RemoveApi
{
public:
void Del(void);
};

//Driver program
#include<iostream>
#include<stdio.h>
#include "stdafx.h"
#include "Remove.h"//Include the Remove.h
#include<iostream>
using namespace std;
void Remove_api::Del(void)
{
   int delStatus; //Check if has been deleted or not 1 is deleted 0 otherwise
   char file[20]; //File name
   cout<<"Enter the name of file to delete: "<<endl;
   cin>>file;
   delStatus = remove(file);
   if(delStatus == 0)
       cout<<file<<" has been deleted."<<endl;
   else
       cout<<"Failed. Please try again."<<endl;
   return 0;
}



c)The registry is a Windows System hierarchical database that contains data that is critical for the operation of Windows Operating system, the applications and services. The data is structured in a hierarchical format. Each node in the tree is called a key. Each key can contain both subkeys and data entries called values.

The registry is organized in the following four root keys

  • HKEY_CLASSES_ROOT (HKCR)
  • HKEY_CURRENT_USER (HKCU)
  • HKEY_LOCAL_MACHINE (HKLM)
  • HKEY_USERS (HKU)
  • HKEY_CURRENT_CONFIG (HKCC)

The registry stores critical information such as the entire current configuration of various settings, user account information, software application configuration.

The windows registry can be edited to achieve various needs in the computer system


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS