Cs423-cotter1 Windows Operating Environment. cs423-cotter2 Windows Operating Environment 32 bit operating environment – Windows XP Microsoft Visual Studio.net,.net2005,

Slides:



Advertisements
Similar presentations
Information System Design Lab 5&6. User Interface Design.
Advertisements

Threads. Readings r Silberschatz et al : Chapter 4.
C Programming Day 1 based upon Practical C Programming by Steve Oualline CS550 Operating Systems.
Basic Network Concepts And Troubleshooting. A Simple Computer Network for File Sharing.
Visual Basic 2010 How to Program. © by Pearson Education, Inc. All Rights Reserved.2.
Visual Basic 2010 How to Program Reference: Instructor: Maysoon Bin Duwais slides Visual Basic 2010 how to program by Deitel © by Pearson Education,
Guide to Oracle10G1 Introduction To Forms Builder Chapter 5.
Gavin S Page OpenCV Tutorial Part I Using OpenCV with Microsoft Visual Studio.net November 2005.
A Guide to Oracle9i1 Introduction To Forms Builder Chapter 5.
1 Data Communications and Networking Socket Programming Part II: Design of Server Software Reference: Internetworking with TCP/IP, Volume III Client-Server.
Guidelines for working with Microsoft Visual Studio.Net.
Introduction to C Programming Overview of C Hello World program Unix environment C programming basics.
Lab2 TA Notes. Set up for Visual C++ New Workspace Win32 Console Application – This runs from a command line Chose Blank Project Add your.C file Build.
Introduction to.NET Microsoft announced in June 2000 A new software –development model that allows applications created in disparate programming languages.
Guidelines for working with Microsoft Visual Studio 6.
Integrity Check As You Well Know, It Is A Violation Of Academic Integrity To Fake The Results On Any.
Creating a Console Application with Visual Studio
Chapter 4: Threads Adapted to COP4610 by Robert van Engelen.
Computer Science 210 Computer Organization Introduction to C.
1 ENG236: ENG236: C++ Programming Environment (2) Rocky K. C. Chang THE HONG KONG POLYTECHNIC UNIVERSITY.
1 Chapter One A First Program Using C#. 2 Objectives Learn about programming tasks Learn object-oriented programming concepts Learn about the C# programming.
A First Program Using C#
OPENCV TUTORIAL OpenCV Windows 7 Microsoft Visual C++ Express 2010.
Network Programming using NetLink Sockets C++ Library
Project 2 Data Communication Spring 2010, ICE Stephen Kim, Ph.D.
1 INF160 IS Development Environments AUBG, COS dept Lecture 06 Title: Dev Env: Code::Blocks (Extract from Syllabus) Reference:
Computing IV Visual C Introduction with OpenCV Example Xinwen Fu.
Chapter 1: A First Program Using C#. Programming Computer program – A set of instructions that tells a computer what to do – Also called software Software.
Introduction to Threads CS240 Programming in C. Introduction to Threads A thread is a path execution By default, a C/C++ program has one thread called.
Network Management Tool Amy Auburger. 2 Product Overview Made by Ipswitch Affordable alternative to expensive & complicated Network Management Systems.
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
2. Introduction to the Visual Studio.NET IDE. Chapter Outline Overview of the Visual Studio.NET IDE Overview of the Visual Studio.NET IDE Menu Bar and.
CPSC 203 Introduction to Computers Lab 23 By Jie Gao.
EMerge Browser Managed Security Platform Module 3: Startup eMerge Certification Course  Physical connection  TCP/IP Characteristics of PC  Initial connection.
Engineering Computing I Chapter 1 – Part A A Tutorial Introduction.
Introduction to the Visual Studio.NET IDE (LAB 1 )
Programming with Visual C++ A short review of the process.
Today's Ninja Challenge: Make a Network Chat Program!
Using Microsoft Visual Studio 2005 Original by Suma Rao Revised by John G. McMahon ( 9/6/2008 )
Compiling a C Program. Before we can begin we must open a telnet session to phobos. There are a number of ways to do this, but the easiest is to click.
Programming with Visual Studio 2005.NET A short review of the process.
N from what language did C++ originate? n what’s input, output device? n what’s main memory, memory location, memory address? n what’s a program, data?
Module 1: Getting Started. Introduction to.NET and the.NET Framework Exploring Visual Studio.NET Creating a Windows Application Project Overview Use Visual.
Programming with Visual Studio.NET A short review of the process.
Module 2: Using Microsoft Visual Studio.NET. Overview Overview of Visual Studio.NET Creating an ASP.NET Web Application Project.
Microsoft Visual Basic 2005 BASICS Lesson 1 A First Look at Microsoft Visual Basic.
1 COMP445 Fall 2006 Lab assignment 1. 2 STEP1: Get the name of the second party STEP2: Get phone number from white pages CALLERRECEIVER STEP1: Plug the.
Bit-DSP-MicrocontrollerTMS320F2812 Texas Instruments Incorporated European Customer Training Center University of Applied Sciences Zwickau (FH)
1 Programming Environment and Tools VS.Net 2012 First project MSDN Library.
NetTech Solutions Common Connectivity Problems Lesson Eight.
Object-Oriented Application Development Using VB.NET 1 Chapter 2 The Visual Studio.NET Development Environment.
Open project in Microsoft Visual Studio → build program in “Release” mode.
Visual Basic.Net. Software to Install Visual Studio 2005 Professional Edition (Requires Windows XP Pro) MSDN Library for Visual Studio 2005 Available.
Sung-Dong Kim Dept. of Computer Engineering, Hansung University Chapter 3 Programming Tools.
Windows Server 2003 { First Steps and Administration} Benedikt Riedel MCSE + Messaging
Lecture 3: Getting Started & Input / Output (I/O)
Development Environment Setup
Computer Science 210 Computer Organization
Computer Terms Review from what language did C++ originate?
A bit of C programming Lecture 3 Uli Raich.
Chapter 6 – Routing.
Module 1: Getting Started
Quick Start Guide for Visual Studio 2010
TCL command in C, a simple example Nguyen Truong – GCS VN Aug 5, 2004
Computer Science 210 Computer Organization
Examining IP Addressing
Introduction to C Topics Compilation Using the gcc Compiler
Double click Microsoft Visual Studio 2010 on the Computer Desktop
Introduction to C Topics Compilation Using the gcc Compiler
Computer Terms Review from what language did C++ originate?
Presentation transcript:

cs423-cotter1 Windows Operating Environment

cs423-cotter2 Windows Operating Environment 32 bit operating environment – Windows XP Microsoft Visual Studio.net,.net2005, 6.0 STB Rooms 460, 462, 464 –75 machines – P4 class –Personal storage on remote machines Q: drive (60 MB), Y: drive (100MB) –Most programs on local hosts

cs423-cotter3 Windows Operating Environment Tools Available on SCE machines: –Web Browsers (Netscape, Explorer) –Business tools (MS Office) –Math tools (Maple, Matlab) –Programming tools ( MSVC++6.0, etc. ) –ftp –telnet –etc.

cs423-cotter4 Find IP Address of XP Machine Start -- Programs -- Command Prompt Brings up a text window At text prompt: route print C:\users> route print Active Routes: Network Address Netmask Gateway Address Interface Metric

cs423-cotter5 Using ipconfig: Q:\>ipconfig Windows 2000 IP Configuration Ethernet adapter Local Area Connection: Connection-specific DNS Suffix. : ddns.umkc.edu IP Address : Subnet Mask : Default Gateway : Q:\>

cs423-cotter6 Windows Programming Environment - MS Dev Studio

Visual Studio.NET

cs423-cotter8 Windows Programming Start New Project Microsoft Visual Studio.Net Start -- Programs -- MS Visual Studio -- MS Visual Studio To create a new project: –From Start Page: Create -- Project –Identify storage location for new project –Provide Project name –OK

New Project Window

cs423-cotter11 Windows Programming Add / Create files Project – Add Existing Item – C++ File Locate desired files. Repeat for all needed files For new files: Project -- Add New Item – C++ File Identify file.

cs423-cotter14 Windows Programming Add Libraries Project -- Properties linker tab -- category = Input -- add library names to “Additional Dependencies” for sockets, add “wsock32.lib”

Add Libraries

To support Multi-threaded Programs: Select Project  Program Properties Select C/C++ tab –Code Generation subtab Runtime Library item: –Default is “Single-threaded Debug (/MLd)” –Select “Multi-threaded Debug DLL (/MDd)”

cs423-cotter20 Windows Programming Select Active Configuration Two compile configurations available –Release –Debug Build – select “Configuration Manager” Select either Debug or Release –Note that debug versions create large (megabyte) files.

Active / Debug Configuration

cs423-cotter23 Windows Programming Build and Execute Project Build -- Build “project_name” Check message window for compile and link status. If no errors are indicated, execute program. Debug – “Start Debugging” or “Start Without Debugging”

cs423-cotter26 Windows Threads Similar in concept to processes, but designed to identify multiple activities that can be scheduled independently. All programs have at least 1 thread -- main ( ) program Any thread can create new threads.

cs423-cotter27 Windows Threads In C language (console mode): unsigned long _beginthread ( void(_cdecl *start_address)(void *), unsigned stack_size, void *arglistv ); Required Header: Required Libraries: LIBCMT.LIB or MSVCRT.LIB

cs423-cotter28 _beginthread ( ) void(_cdecl *start_address)(void *), –Start address of the routine that will begin the thread –The routine must have no return value unsigned stack_size, –Provide either a stack size for new thread or, if value is 0, use the same stack size as “parent thread” uses. void *arglist –Address of data item passed to new thread or NULL if nothing passed

cs423-cotter29 consum.cpp - multithreading #include voidaddem(void *); int main(int argc, char *argv[]) { int number = 4; _beginthread( addem, 0,(void *)&number); number++; addem(&number); return 0; }

cs423-cotter30 consum.cpp - multithreading void addem(void * vcount) { int i, count, sum; sum = 0; count = *(int *)vcount; for (i=0; i<=count; ++i) { printf("The value of i is %d\n", i); fflush(stdout); sum += i; } printf("The sum is %d\n", sum); fflush(stdout); }

cs423-cotter31 consum.cpp - Results The value of i is 0 The value of i is 1 The value of i is 2 The value of i is 3 The value of i is 4 The value of i is 5 The sum is 15

cs423-cotter32 consum2.cpp - multithreading #include voidaddem(void *); int main(int argc, char *argv[]) { int number = 4; _beginthread( addem, 0,(void *)&number); Sleep (100L); number++; addem(&number); return 0; }

cs423-cotter33 consum2.cpp - multithreading void addem(void *vcount) { inti, sum, count; count = *(int *)vcount; sum = 0; for (i=0; i<=count; ++i) { printf("The value of i is %d\n", i); fflush(stdout); sum += i; } printf("The sum is %d\n", sum); fflush(stdout); }

cs423-cotter34 consum.cpp - Results The value of i is 0 The value of i is 1 The value of i is 2 The value of i is 3 The value of i is 4 The sum is 10 The value of i is 0 The value of i is 1 The value of i is 2 The value of i is 3 The value of i is 4 The value of i is 5 The sum is 15

consumfloat.cpp #include,, voidp_func(void *); int flag; int main(int argc, char *argv[]) { floatnum, num2; num = 9.0f; num2 = 12.0f; flag = 0; _beginthread(p_func, 0, (void *)&num); while (flag == 0) ; p_func((void *)&num2); return 0; } cs423-cotter 35

consumfloat.cpp void p_func(void * vcount) { float *numptr; int number, i, prod; flag = 1; numptr = (float*) vcount; number = (int) *numptr; prod = 1; for (i = 1; i <= number; i++) prod = prod * i; printf("The number is %d\n", number); printf ("The factorial product is %d\n", prod); printf("The float is %5.2f\n", *numptr); fflush(stdout); } cs423-cotter36

Consumfloat.cpp Results The number is 9 The factorial product is The float is 9.00 The number is 12 The factorial product is The float is Press any key to continue...

cs423-cotter38 Summary Many Windows Integrated Development Environments (IDEs) available to develop C++ programs. –UMKC Labs provide Microsoft Visual Studio Multi-threading supported in Windows IDEs. –Just remember to correctly load the correct runtime libraries.