Windows to Linux Porting Library

Size: px
Start display at page:

Download "Windows to Linux Porting Library"

Transcription

1 Library Windows to Linux Porting Library ( W2LPL ) ADONTEC, All Rights Reserved.

2 This document describes how to use the W2LPL library within a custom application. Technical Support You can reach ADONTEC technical support by at support@adontec.com or most secure, via Support. Copyright Notice ADONTEC, All Rights Reserved. This documentation contains proprietary information of ADONTEC and distribution is limited to authorized licensees of ADONTEC. Any unauthorized reproduction or distribution of this document is strictly prohibited. 2-16

3 Introduction The process of porting code from Microsoft Windows* to Linux is not always an easy task. There are many differences between the APIs provided by Windows and Linux. In many cases it is not clear and by far not that easy to replace Windows specific code with equivalent Linux code. The Windows to Linux Porting Library (W2LPL) allows to easily port code from Windows to Linux operating systems. The library offers access to many commonly used functions provided by the Windows API. In order to correctly use this library please consult the documentation that follows in the next sections. How to use? In order to use the W2LPL library the header file w2lpl.h must be included into the C++ project. To compile and link the project use the library libw2lpl.so. Place this library to a directory that can be found by the compiler and linker. A simple example is shown below. For more details please consult the samples provided. Example: Consider the following makefile example. Suppose we have the following file structure: /usr/home/dev/adontec/w2lpl/common/ libw2lpl.so... /usr/home/dev/adontec/w2lpl/tests/simple_test_project/ w2lpl.h test.cpp makefile The makefile is as follows: DEFS := OBJS :=./test.o LIBS_PATH := "./../../common/" LIBS_RPATH := '$$ORIGIN/../../common/' EXE_NAME := test LIBS := -L$(LIBS_PATH) -lw2lpl all: $(EXE_NAME) # Link objects $(EXE_NAME): $(OBJS) g++ -Wl,-rpath=$(LIBS_RPATH) -o"$@" $(OBJS) $(LIBS) # Compile C++ source files %.o:./%.cpp g++ $(DEFS) -Wall -c -o"$@" "$<" * The standard WIN32 API of Windows (x86/x64). 3-16

4 To build this project open a console and go to the project folder, e.g.: $ cd /usr/home/dev/adontec/w2lpl/tests /simple_test_project Execute makefile: $ make all What to ship? Include the shared library libw2lpl.so with your application, if your are using it. Nothing to ship if using the static library. 4-16

5 The functions of W2LPL Most of the functions included in this library are already documented in the Windows API manual. The functionality of the functions is kept the same as in Windows. In some functions there may exist some limitations. For more details please read the description of each function. Time Sleep void WINAPI Sleep(DWORD ms); Suspends the current thread for ms milliseconds. GetSysTime TSYSTIME WINAPI GetSysTime(void); The functions GetSysTime and GetElapsedTime offer time measurement with millisecond precision. The return value of this function is the current timestamp. Example: TSYSTIME starttime = GetSysTime(); // do some work... printf( Elapsed time = %d\n, GetElapsedTime(startTime)); GetElapsedTime TSYSTIME WINAPI GetElapsedTime(TSYSTIME Start); The functions GetSysTime and GetElapsedTime offer time measurement with millisecond precision. The return value of this function is the time in milliseconds that elapsed since Start. 5-16

6 Critical Section InitializeCriticalSection void WINAPI InitializeCriticalSection(LPCRITICAL_SECTION lpcriticalsection); Initializes a critical section object. DeleteCriticalSection void WINAPI DeleteCriticalSection(LPCRITICAL_SECTION lpcriticalsection); Releases all resources used by an unowned critical section object. EnterCriticalSection void WINAPI EnterCriticalSection(LPCRITICAL_SECTION lpcriticalsection); Waits for ownership of the specified critical section object. The function returns when the calling thread is granted ownership. LeaveCriticalSection void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION lpcriticalsection); Releases ownership of the specified critical section object. TryEnterCriticalSection BOOL WINAPI TryEnterCriticalSection(LPCRITICAL_SECTION lpcriticalsection); Attempts to enter a critical section without blocking. If the call is successful, the calling thread takes ownership of the critical section. 6-16

7 Inifile WritePrivateProfileString BOOL WINAPI WritePrivateProfileString( LPCTSTR lpappname, LPCTSTR lpkeyname, LPCTSTR lpstring, LPCTSTR lpfilename); Copies a string into the specified section of an initialization file. GetPrivateProfileString DWORD WINAPI GetPrivateProfileString( LPCTSTR lpappname, LPCTSTR lpkeyname, LPCTSTR lpdefault, LPTSTR lpreturnedstring, DWORD nsize, LPCTSTR lpfilename); Retrieves a string from the specified section in an initialization file. GetPrivateProfileInt DWORD WINAPI GetPrivateProfileInt( LPCTSTR lpappname, LPCTSTR lpkeyname, int ndefault, LPCTSTR lpfilename); Retrieves an integer associated with a key in the specified section of an initialization file. 7-16

8 GetPrivateProfileSection DWORD WINAPI GetPrivateProfileSection( LPCTSTR lpappname, LPTSTR lpreturnedstring, DWORD nsize, LPCTSTR lpfilename); Retrieves all the keys and values for the specified section of an initialization file. 8-16

9 Handle CloseHandle BOOL WINAPI CloseHandle(HANDLE hobject); Closes an open object handle. 9-16

10 Event CreateEvent HANDLE WINAPI CreateEvent( PVOID lpeventattributes, BOOL bmanualreset, BOOL binitialstate, LPCTSTR lpname); Creates or opens an event object. Remarks: The parameters lpeventattributes and lpname are ignored. WaitForSingleObject DWORD WINAPI WaitForSingleObject(HANDLE hobject, DWORD dwmilliseconds); Wait on an event object. WaitForMultipleObjects DWORD WINAPI WaitForMultipleObjects( DWORD dwcount, const HANDLE *lphandles, BOOL bwaitall, TSYSTIME dwmilliseconds); Wait on multiple event objects. SetEvent BOOL WINAPI SetEvent(HANDLE hobject); Sets the specified event object to the signaled state

11 PulseEvent BOOL WINAPI PulseEvent(HANDLE hobject); Sets the specified event object to the signaled state and then resets it to the nonsignaled state after releasing the appropriate number of waiting threads. ResetEvent BOOL WINAPI ResetEvent(HANDLE hobject); This function sets the state of the specified event object to nonsignaled

12 Threads _beginthreadex unsigned long WINAPI _beginthreadex( void *security, unsigned stack_size, PSTART_ADDRESSEX pstartaddress, void *arglist, unsigned initflag, unsigned *thrdaddr); Create a thread. Remarks: The parameters security and initflag are ignored. _beginthread unsigned long WINAPI _beginthread( PSTART_ADDRESS pstartaddress, unsigned stack_size, void *arglist); Create a thread. GetCurrentThread HANDLE WINAPI GetCurrentThread(); Retrieves the handle of the calling thread. GetCurrentThreadId DWORD WINAPI GetCurrentThreadId(void); Retrieves the thread identifier of the calling thread

13 GetExitCodeThread BOOL WINAPI GetExitCodeThread(HANDLE hthread, LPDWORD lpexitcode); Retrieves the termination status of the specified thread

14 File operations FindFirstFile HANDLE WINAPI FindFirstFile( LPCTSTR lpfilename, LPWIN32_FIND_DATA lpfindfiledata); Searches a directory for a file or subdirectory with a name that matches a specific name (or partial name if wildcards are used). FindNextFile BOOL WINAPI FindNextFile(HANDLE hfindfile, LPWIN32_FIND_DATA lpfindfiledata); Continues a file search from a previous call to the FindFirstFile. FindClose void WINAPI FindClose(HANDLE hfindfile); Closes a file search handle opened by the FindFirstFile

15 Libraries LoadLibrary HMODULE WINAPI LoadLibrary(LPCTSTR lpfilename); Loads the specified module into the address space of the calling process. The specified module may cause other modules to be loaded. FreeLibrary BOOL WINAPI FreeLibrary(HMODULE hmodule); Frees the loaded dynamic-link library (DLL) module. GetProcAddress FARPROC WINAPI GetProcAddress(HMODULE hmodule, LPCSTR lpprocname); Retrieves the address of an exported function or variable from the specified dynamic-link library (DLL)

16 Samples Based on the owned W2LPL license one or more samples are included to demonstrate the use of the library: play_with_cs, play_with_event, test_findfile

Automated import / export for CMDFlash slave files.

Automated import / export for CMDFlash slave files. Automated import / export for CMDFlash slave files On Microsoft IIS Platforms it's now possible to automate the packing/unpacking of slave's files CmdFlashini file is automatically created at the cmdflashexe

More information

Multi-core Architecture and Programming

Multi-core Architecture and Programming Multi-core Architecture and Programming Yang Quansheng( 杨全胜 ) http://www.njyangqs.com School of Computer Science & Engineering 1 http://www.njyangqs.com Programming with Windows Threads Content Windows

More information

Multithreading Applications in Win32

Multithreading Applications in Win32 Copyright, 2012 Multimedia Lab., Multithreading Applications in Win32 (Chapter4. Synchronization) Seong Jong Choi chois@uos.ac.kr Multimedia Lab. Dept. of Electrical and Computer Eng. University of Seoul

More information

About INtime Win32 and real time extension system calls

About INtime Win32 and real time extension system calls About INtime Win32 and real time extension system calls Contents Overview How the Win32 API (iwin32) fits in the INtime environment INtime Win32 system calls Porting a Windows application to INtime Overview

More information

Get detailed information from

Get detailed information from MS Windows API for Processes/Threads In MS Windows, the system call interface is not documented. Instead the MS Windows API is documented, which helps with being able to run programs portably across muliple

More information

Multithreading Application in Win32

Multithreading Application in Win32 Copyright, 2000 Multimedia Lab., Multithreading Application in Win32 Chapter 3_Hurry Up and Wait Eung-Sang Kim Kim-0103@mmlab.net Multimedia Lab. Dept. of Electrical and Computer Eng. University of Seoul

More information

Win32 Programming. Jim Fawcett CSE775 Distributed Objects Spring 2012

Win32 Programming. Jim Fawcett CSE775 Distributed Objects Spring 2012 Win32 Programming Jim Fawcett CSE775 Distributed Objects Spring 2012 References Programming Applications for Microsoft Windows, 4 th Edition, Jeffrey Richter, Microsoft Press, 1999 Unicode, More Unicode

More information

Processing in Frequency Domain

Processing in Frequency Domain Will Pirkle FFT Processing (or Frequency Domain Processing) is a complete DSP topic on its own - thick books have been written about using the frequency domain representation of a signal for analysis or

More information

PCI Software Manual [for Windows 95/98/NT/2000/XP]

PCI Software Manual [for Windows 95/98/NT/2000/XP] PCI-1002 Software Manual [for Windows 95/98/NT/2000/XP] Warranty All products manufactured by ICP DAS are warranted against defective materials for a period of one year from the date of delivery to the

More information

Threads in Java. Threads (part 2) 1/18

Threads in Java. Threads (part 2) 1/18 in Java are part of the Java language. There are two ways to create a new thread of execution. Declare a class to be a subclass of Thread. This subclass should override the run method of class Thread.

More information

UFG-10 Family. Frame Grabbers. Easy Programming Guide. Windows

UFG-10 Family. Frame Grabbers. Easy Programming Guide. Windows UFG-10 Family Frame Grabbers Easy Programming Guide Windows Introduction Copyright This manual, Copyright 2014 Unigraf Oy. All rights reserved Reproduction of this manual in whole or in part without written

More information

DLL Software Manual. Copyright 2015 by ICP DAS. All rights are reserved.

DLL Software Manual. Copyright 2015 by ICP DAS. All rights are reserved. Version 1.4, Jun. 2015 SUPPORTS Board includes PISO-C64(U), PEX-C64, PISO-P64, PISO-P64U(-24V), PEX-P64(-24V), PISO-730U, PISO-730(-5V), PEX-730, PISO-730A(-5V), PEX-P32A32, PISO-32A32(U)(-5V), PISO-P32C32(U)(-5V),

More information

Socket I/Os in Windows. Dae-Ki Kang

Socket I/Os in Windows. Dae-Ki Kang Socket I/Os in Windows Dae-Ki Kang Agenda TCP Server/Client Multi-Threads Synchronization Socket IO Model WSAAsyncSelect Model WSAEventSelect Model UDP Server/Client Overlapped Model Completion Port Model

More information

How to Talk To Windows. What did it say?

How to Talk To Windows. What did it say? How to Talk To Windows What did it say? 1 DOS was essentially subservient. Your program was the master. When you wanted some service from DOS you called DOS it obeyed. You could even bypass DOS and communicate

More information

UFG-10 MC. Frame Grabbers. Easy Programming Guide. Windows

UFG-10 MC. Frame Grabbers. Easy Programming Guide. Windows UFG-10 MC Frame Grabbers Easy Programming Guide Windows Copyright Introduction This manual, Copyright 2014 Unigraf Oy. All rights reserved Reproduction of this manual in whole or in part without written

More information

Opticon H25. System Controls SDK Framework. H25 System Controls SDK Framework.

Opticon H25. System Controls SDK Framework. H25 System Controls SDK Framework. Opticon H25 System Controls SDK Framework Copyright Opticon. All rights reserved. This information is subject to change without prior notice. For availability, contact your local representative. Documentation

More information

RTX 5.0 Reference Guide

RTX 5.0 Reference Guide RTX 5.0 Reference Guide VenturCom, Inc. Five Cambridge Center Cambridge, MA 02142 Tel: 617-661-1230 Fax: 617-577-1607 info@vci.com http://www.vci.com RTX Reference No part of this document may be reproduced

More information

PusleIR Multitouch Screen Software SDK Specification. Revision 4.0

PusleIR Multitouch Screen Software SDK Specification. Revision 4.0 PusleIR Multitouch Screen Software SDK Specification Revision 4.0 Table of Contents 1. Overview... 3 1.1. Diagram... 3 1.1. PulseIR API Hierarchy... 3 1.2. DLL File... 4 2. Data Structure... 5 2.1 Point

More information

The Disk Detective: A Tool Set for Windows SAS Administrators

The Disk Detective: A Tool Set for Windows SAS Administrators Paper PA10 The Disk Detective: A Tool Set for Windows SAS Administrators Darryl Putnam, Bank of America, Charlotte, NC ABSTRACT Ever needed to know detailed information about a file on your disk subsystem,

More information

CS 499 Lab 3: Disassembly of slammer.bin I. PURPOSE

CS 499 Lab 3: Disassembly of slammer.bin I. PURPOSE CS 499 Lab 3: Disassembly of slammer.bin I. PURPOSE The purpose of this exercise is to learn Intel assembly language by disassembling a small piece of code and extensively commenting the resulting instructions.

More information

CS 453/552: Operating Systems Midterm Examination

CS 453/552: Operating Systems Midterm Examination CS 453/552: Operating Systems Midterm Examination Time: 110 minutes Name : Total Points: 150 This exam has 9 questions, for a total of 165 points. Graduate students need to answer all questions. There

More information

Concurrency (II) --- Synchronization

Concurrency (II) --- Synchronization 1 Concurrency (II) --- Synchronization 2 Road Map For This Lecture Synchronization in Windows & Linux High-IRQL Synchronization (spin locks) Low-IRQL Synchronization (dispatcher objects) Windows APIs for

More information

PyWin32ctypes Documentation

PyWin32ctypes Documentation PyWin32ctypes Documentation Release 0.1.3.dev1 David Cournapeau, Ioannis Tziakos Sep 01, 2017 Contents 1 Usage 3 2 Development setup 5 3 Reference 7 3.1 PyWin32 Compatibility Layer......................................

More information

Windows Printer Driver User Guide for NCR Retail Printers. B Issue G

Windows Printer Driver User Guide for NCR Retail Printers. B Issue G Windows Printer Driver User Guide for NCR Retail Printers B005-0000-1609 Issue G The product described in this book is a licensed product of NCR Corporation. NCR is a registered trademark of NCR Corporation.

More information

Data-Sharing API Driver. User Manual

Data-Sharing API Driver. User Manual Data-Sharing API Driver User Manual Preface Thank you for purchasing Pro-face s Pro-Designer software. The Data-Sharing API Driver has been developed to make it easier to use the Data-Sharing API the program

More information

Pegasus Development Kit Programmer's Reference. Version Pegasus Development Kit is out of a support.

Pegasus Development Kit Programmer's Reference. Version Pegasus Development Kit is out of a support. Programmer's Reference Version.1.00 Pegasus Development Kit is out of a support. (C) 2007 Thomson.All rights reserved. Grass Valley is a trademark of Thomson. Table Of Contents TABLE OF CONTENTS...2 PRELIMINARIES...3

More information

Winmate Software Document. Project Name: WDC User Manual. Revision: 1.2 August 16, 2012

Winmate Software Document. Project Name: WDC User Manual. Revision: 1.2 August 16, 2012 Software Document Project Name: WDC User Manual Revision: 1.2 August 16, 2012 Contents 1. Description... 3 1.1 Introduction... 3 1.2 Application requisites... 3 2. WDC application Introduce... 4 2.1 Open

More information

Foreword 0. 3 How to... Distribute It. 1 Serial... Communication. EscapeCommFunc... Function. GetXferStatus... Function. GetInputDataCount...

Foreword 0. 3 How to... Distribute It. 1 Serial... Communication. EscapeCommFunc... Function. GetXferStatus... Function. GetInputDataCount... Contents 1 Table of Contents Foreword 0 Part I About MegaPipe Win32 DLL 3 1 Introduction... 3 2 How to... Use It 3 Trial Version... 3 Full Version... 3 3 How to... Distribute It 4 Part II Reference Guide

More information

Table Of Contents. Rev. 1.0 Page 2

Table Of Contents. Rev. 1.0 Page 2 Table Of Contents Copyrights And Warranties... 1 Scope... 1 Table Of Contents... 2 1 System Requirements... 3 2 Extent of Supply... 3 3 Driver Installation... 3 4 Driver Deinstallation... 4 5 Customizing

More information

Call DLL from Limnor Applications

Call DLL from Limnor Applications Call DLL from Limnor Applications There is a lot of computer software in the format of dynamic link libraries (DLL). DLLCaller performer allows your applications to call DLL functions directly. Here we

More information

Illustrate the construction and usefulness of compound synchronization

Illustrate the construction and usefulness of compound synchronization Andrew Tucker and Johnson M. Hart Batons: A Sequential Synchronization Object Multithreaded programming and thread synchronization are fundamental techniques in modern program design, and Windows, Unix,

More information

Creating a DirectX Project

Creating a DirectX Project Creating a DirectX Project A DirectPLay Chat Program Setting up your Compiler for DirectX Install DirectX SDK Make sure your compiler has path to directx8/include Directx8/lib Directx8/samples/multimedia/common/src

More information

CSCE 463/612: Networks and Distributed Processing Homework 1 Part 3 (50 pts) Due date: 2/12/19

CSCE 463/612: Networks and Distributed Processing Homework 1 Part 3 (50 pts) Due date: 2/12/19 CSCE 463/612: Networks and Distributed Processing Homework 1 Part 3 (50 pts) Due date: 2/12/19 1. Problem Description We are finally ready to multi-thread this program and achieve significantly faster

More information

Human Interface Devices: Host Application

Human Interface Devices: Host Application Human Interface Devices: Host Application 13 Human Interface Devices: Host Application Chapter 10 showed how to obtain a handle to communicate with a device. This chapter shows how Visual Basic.NET and

More information

Mixed-Language Debugging of projects containing C and COBOL

Mixed-Language Debugging of projects containing C and COBOL Mixed-Language Debugging of projects containing C and COBOL Net Express and other Micro Focus software development tools offer a wide range of possibilities to construct COBOL projects. Of course, programs

More information

Chapter 4: Threads. Operating System Concepts with Java 8 th Edition

Chapter 4: Threads. Operating System Concepts with Java 8 th Edition Chapter 4: Threads 14.1 Silberschatz, Galvin and Gagne 2009 Chapter 4: Threads Overview Multithreading Models Thread Libraries Threading Issues Operating System Examples 14.2 Silberschatz, Galvin and Gagne

More information

GO-GLOBAL. Client Process Manager API. Version 4.8.2

GO-GLOBAL. Client Process Manager API. Version 4.8.2 GO-GLOBAL Client Process Manager API Version 4.8.2 COPYRIGHT AND TRADEMARK NOTICE Copyright 1997-2015 GraphOn Corporation. All Rights Reserved. This document, as well as the software described in it, is

More information

Operating Systems 2010/2011

Operating Systems 2010/2011 Operating Systems 2010/2011 Signals Johan Lukkien 1 Signals A signal is a software generated event notification of state change encapsulation of physical event usually: sent from a process to a process

More information

Application Note: AN00152 xscope - Bi-Directional Endpoint

Application Note: AN00152 xscope - Bi-Directional Endpoint Application Note: AN00152 xscope - Bi-Directional Endpoint This application note shows how to create a simple example which uses the XMOS xscope application trace system to provide bi-directional communication

More information

CSCE Introduction to Computer Systems Spring 2019

CSCE Introduction to Computer Systems Spring 2019 CSCE 313-200 Introduction to Computer Systems Spring 2019 Synchronization V Dmitri Loguinov Texas A&M University March 5, 2019 1 Updates Memory heaps Normal new/delete ops go to the process heap Internal

More information

ACR122L NFC Reader with LCD

ACR122L NFC Reader with LCD ACR122L NFC Reader with LCD Application Programming Interface Subject to change without prior notice Table of Contents 1.0. Introduction... 4 2.0.... 5 2.1. Overview... 5 2.2. Reader... 5 2.2.1. Define

More information

Windows Kernel Exploitation Tutorial Part 4: Pool Feng-Shui > Pool Overflow

Windows Kernel Exploitation Tutorial Part 4: Pool Feng-Shui > Pool Overflow Menu Windows Kernel Exploitation Tutorial Part : Pool Feng-Shui > Pool Overflow November 8, 07 rootkit Overview We discussed about Write-What-Where vulnerability in the previous part. This part will deal

More information

CS 220: Introduction to Parallel Computing. Arrays. Lecture 4

CS 220: Introduction to Parallel Computing. Arrays. Lecture 4 CS 220: Introduction to Parallel Computing Arrays Lecture 4 Note: Windows I updated the VM image on the website It now includes: Sublime text Gitkraken (a nice git GUI) And the git command line tools 1/30/18

More information

Les API WIN32. Auteur : J. ALVAREZ Catégorie : Cours Département : IRIST. Sujet : Langage ( V 2 ) Les API WIN32. Refs : CLngAPIWIN32

Les API WIN32. Auteur : J. ALVAREZ Catégorie : Cours Département : IRIST. Sujet : Langage ( V 2 ) Les API WIN32. Refs : CLngAPIWIN32 Auteur : J. ALVAREZ Catégorie : Cours Département : IRIST Sujet : Langage ( V 2 ) Refs : CLngAPIWIN32 SOMMAIRE 1 PROCESSES AND THREADS... 3 1.1 ABOUT PROCESSES AND THREADS... 3 1.2 MULTITASKING...3 1.3

More information

Rocket UniVerse. GCI Guide. Version November 2013 UNV-112-GCI-1

Rocket UniVerse. GCI Guide. Version November 2013 UNV-112-GCI-1 Rocket UniVerse GCI Guide Version 11.2 November 2013 UNV-112-GCI-1 Notices Edition Publication date: November 2013 Book number: UNV-112-GCI-1 Product version: Rocket UniVerse V11.2 2 Copyright Rocket Software,

More information

Calling stdcall and cdecl functions from DLLs and function pointers. (draft)

Calling stdcall and cdecl functions from DLLs and function pointers. (draft) Calling stdcall and cdecl functions from DLLs and function pointers. (draft) ot4xb.dll provide support for calling function pointers, usually obtained from a DLl exported function, but also from a COM

More information

int fnvgetconfig(handle h, UINT32 id, const void *cfg, size_t sz);... 4

int fnvgetconfig(handle h, UINT32 id, const void *cfg, size_t sz);... 4 RP-VL-UTIL-V1 Developer s Guide [ Contents ] 1. Introduction... 1 2. Building Environment... 1 3. Operating Environment... 1 4. Function Explanation... 2 4.1. Common API for Transmitting and Receiving...

More information

Advantech Windows CE.net Application Hand on Lab

Advantech Windows CE.net Application Hand on Lab Advantech Windows CE.net Application Hand on Lab Lab : Serial Port Communication Objectives After completing this lab, you will be able to: Create an application to open, initialize the serial port, and

More information

Exception Namespaces C Interoperability Templates. More C++ David Chisnall. March 17, 2011

Exception Namespaces C Interoperability Templates. More C++ David Chisnall. March 17, 2011 More C++ David Chisnall March 17, 2011 Exceptions A more fashionable goto Provides a second way of sending an error condition up the stack until it can be handled Lets intervening stack frames ignore errors

More information

GUI and API Application Note

GUI and API Application Note Page1 pocketbert Company GUI and API Application Note Status: Preliminary, version 0.6 Contents 1. Instructions for installing and running the pocketbert GUI application.... 2 2. How to manually install

More information

ACR122L Serial NFC Reader with LCD

ACR122L Serial NFC Reader with LCD ACR122L Serial NFC Reader with LCD Application Programming Interface V1.03 Subject to change without prior notice Table of Contents 1.0. Introduction... 3 2.0. Features... 4 3.0. Application Programming

More information

Multithreading Multi-Threaded Programming. Prof. Lin Weiguo Copyleft 2009~2017, School of Computing, CUC

Multithreading Multi-Threaded Programming. Prof. Lin Weiguo Copyleft 2009~2017, School of Computing, CUC Multithreading Multi-Threaded Programming Prof. Lin Weiguo Copyleft 2009~2017, School of Computing, CUC Oct. 2017 Note You should not assume that an example in this presentation is complete. Items may

More information

Generic Programming in C

Generic Programming in C Generic Programming in C Void * This is where the real fun starts There is too much coding everywhere else! 1 Using void * and function pointers to write generic code Using libraries to reuse code without

More information

Module 3: Kernel Features

Module 3: Kernel Features Module 3: Kernel Features Contents Overview 1 Definition of Real Time 2 Windows CE Kernel Features 4 Handling Processes, Threads, and Fibers 6 Protecting Applications 17 Synchronization Objects 23 Memory

More information

#include <stdio.h> int main() { char s[] = Hsjodi, *p; for (p = s + 5; p >= s; p--) --*p; puts(s); return 0;

#include <stdio.h> int main() { char s[] = Hsjodi, *p; for (p = s + 5; p >= s; p--) --*p; puts(s); return 0; 1. Short answer questions: (a) Compare the typical contents of a module s header file to the contents of a module s implementation file. Which of these files defines the interface between a module and

More information

You are probably tired of listening to design issues and general game programming

You are probably tired of listening to design issues and general game programming CH03_p.041-090.qxd 6/1/04 2:39 PM Page 41 chapter 3 Engineering the Engine What you get if you don t get what you want is experience. Desire Nick You are probably tired of listening to design issues and

More information

2 Compiling a C program

2 Compiling a C program 2 Compiling a C program This chapter describes how to compile C programs using gcc. Programs can be compiled from a single source file or from multiple source files, and may use system libraries and header

More information

USB Dynamic Industrial Interface V A Universal Application Programming Interface To Data Acquisition Products Users Manual

USB Dynamic Industrial Interface V A Universal Application Programming Interface To Data Acquisition Products Users Manual USB Dynamic Industrial Interface V 2.0.1.1 A Universal Application Programming Interface To Data Acquisition Products Users Manual Design & Implementation by Decision Computer International Company No

More information

BioTac C Library Manual for Cheetah

BioTac C Library Manual for Cheetah BioTac C Library Manual for Cheetah Version 1.1.0 Chia- Hsien (Gary) Lin Tomonori Yamamoto Jeremy Fishel April 5, 2012 Released 1 Table of Contents 1 Introduction... 3 2 General Data Types... 3 3 Functions...

More information

Lab 2: ADT Design & Implementation

Lab 2: ADT Design & Implementation Lab 2: ADT Design & Implementation By Dr. Yingwu Zhu, Seattle University 1. Goals In this lab, you are required to use a dynamic array to design and implement an ADT SortedList that maintains a sorted

More information

CS342 - Spring 2019 Project #3 Synchronization and Deadlocks

CS342 - Spring 2019 Project #3 Synchronization and Deadlocks CS342 - Spring 2019 Project #3 Synchronization and Deadlocks Assigned: April 2, 2019. Due date: April 21, 2019, 23:55. Objectives Practice multi-threaded programming. Practice synchronization: mutex and

More information

C Tutorial: Part 1. Dr. Charalampos C. Tsimenidis. Newcastle University School of Electrical and Electronic Engineering.

C Tutorial: Part 1. Dr. Charalampos C. Tsimenidis. Newcastle University School of Electrical and Electronic Engineering. C Tutorial: Part 1 Dr. Charalampos C. Tsimenidis Newcastle University School of Electrical and Electronic Engineering September 2013 Why C? Small (32 keywords) Stable Existing code base Fast Low-level

More information

Multithreading Applications in Win32 (Chapter 6. Overlapped I/O or Juggling Behind Your Back)

Multithreading Applications in Win32 (Chapter 6. Overlapped I/O or Juggling Behind Your Back) Copyright, 2005 Multimedia Lab., Multithreading Applications in Win32 (Chapter 6. Overlapped I/O or Juggling Behind Your Back) SeongJongChoi chois@uos.ac.kr Multimedia Lab. Dept. of Electrical and Computer

More information

Opening Microsoft Visual Studio. On Microsoft Windows Vista and XP to open the visual studio do the following:

Opening Microsoft Visual Studio. On Microsoft Windows Vista and XP to open the visual studio do the following: If you are a beginner on Microsoft Visual Studio 2008 then you will at first find that this powerful program is not that easy to use for a beginner this is the aim of this tutorial. I hope that it helps

More information

Virtual Sniffing. Live Import. Reference & User Guide

Virtual Sniffing. Live Import. Reference & User Guide Virtual Sniffing Live Import Reference & User Guide Revision Date: 12/16/2016 Copyright 2017 Teledyne LeCroy, Inc. i Live Import Reference & UserGuide Contents Chapter 1 Introduction to Live Import 1 1.1

More information

Application Note: AN00151 xscope - Custom Host Endpoint

Application Note: AN00151 xscope - Custom Host Endpoint Application Note: AN00151 xscope - Custom Host Endpoint This application note shows how to create a simple example which uses the XMOS xscope application trace system to provide instrumentation logging

More information

Multithreading Applications in Win32

Multithreading Applications in Win32 Copyright, 2005 Multimedia Lab., Multithreading Applications in Win32 (Chapter 6. Overlapped I/O or Juggling Behind Your Back) Seong Jong Choi chois@uos.ac.kr Multimedia Lab. Dept. of Electrical and Computer

More information

Installation & Reference Guide

Installation & Reference Guide Installation & Reference Guide DOC. REV. 7/31/2015 VersaAPI VersaLogic Application Programming Interface WWW.VERSALOGIC.COM 12100 SW Tualatin Road Tualatin, OR 97062-7341 (503) 747-2261 Fax (971) 224-4708

More information

Functions (API) Setup Functions

Functions (API) Setup Functions Functions (API) Some of the functions in the WiringPi library are designed to mimic those in the Arduino Wiring system. There are relatively easy to use and should present no problems for anyone used to

More information

Pymem Documentation. Release 1.0. Fabien Reboia

Pymem Documentation. Release 1.0. Fabien Reboia Pymem Documentation Release 1.0 Fabien Reboia Aug 04, 2017 Contents 1 User s Guide 3 1.1 Foreword................................................. 3 1.2 Installation................................................

More information

For 100% Result Oriented IGNOU Coaching and Project Training Call CPD: ,

For 100% Result Oriented IGNOU Coaching and Project Training Call CPD: , Question 2: (15 Marks) The Sleeping-Barber Problem: A barbershop consists of a waiting room with n chairs, and the barber room containing the barber chair. If there are no customers to be served, the barber

More information

Cuckoo Monitor Documentation

Cuckoo Monitor Documentation Cuckoo Monitor Documentation Release 1.3 Jurriaan Bremer Oct 03, 2017 Contents 1 Requirements 3 2 Required packages 5 3 Compilation 7 4 Components 9 4.1 C Framework...............................................

More information

Realtime Linux (RTAI) Multi-Tasking

Realtime Linux (RTAI) Multi-Tasking Realtime Linux (RTAI) Multi-Tasking Introduction Modern real-time systems are based on the complementary concepts of multitasking and intertask communications. A multitasking environment allows real-time

More information

ECE 103 In-Class Exercise L1 Guide

ECE 103 In-Class Exercise L1 Guide ECE 10 In-Class Exercise L1 Guide Hardware and software needed to complete this lab exercise LabJack U, USB cable, and screwdriver (Qty 1) Red LED (Light Emitting Diode) Short lead is cathode (negative)

More information

IBM. Software Development Kit for Multicore Acceleration, Version 3.0. SPU Timer Library Programmer s Guide and API Reference

IBM. Software Development Kit for Multicore Acceleration, Version 3.0. SPU Timer Library Programmer s Guide and API Reference IBM Software Development Kit for Multicore Acceleration, Version 3.0 SPU Timer Library Programmer s Guide and API Reference Note: Before using this information and the product it supports, read the information

More information

Systems Programming/ C and UNIX

Systems Programming/ C and UNIX Systems Programming/ C and UNIX Alice E. Fischer Lecture 5 Makefiles October 2, 2017 Alice E. Fischer Lecture 5 Makefiles Lecture 5 Makefiles... 1/14 October 2, 2017 1 / 14 Outline 1 Modules and Makefiles

More information

CAAM 420 Daily Note. Scriber: Qijia Jiang. Date: Oct.16. Project 3 Due Wed 23.Oct. Two parts: debug code and library exercise.

CAAM 420 Daily Note. Scriber: Qijia Jiang. Date: Oct.16. Project 3 Due Wed 23.Oct. Two parts: debug code and library exercise. CAAM 420 Daily Note Scriber: Qijia Jiang Date: Oct.16 1 Announcement Project 3 Due Wed 23.Oct. Two parts: debug code and library exercise. 2 Make Convention Make syntax for library directories and library

More information

An overview of how to write your function and fill out the FUNCTIONINFO structure. Allocating and freeing memory.

An overview of how to write your function and fill out the FUNCTIONINFO structure. Allocating and freeing memory. Creating a User DLL Extend Mathcad Professional's power by writing your own customized functions. Your functions will have the same advanced features as Mathcad built-in functions, such as customized error

More information

Performance Analysis using Intel VTune Amplifier XE

Performance Analysis using Intel VTune Amplifier XE Performance Analysis using Intel VTune Amplifier XE Performance methodology profiling and tuning The Goal: minimize the time it takes your program / module / function to execute Identify Hotspots and focus

More information

Enhanced Coating DLL. API Specification. Lambda Research Corporation

Enhanced Coating DLL. API Specification. Lambda Research Corporation Enhanced Coating DLL API Specification Lambda Research Corporation (last updated May 23, 2017) 1 Introduction This API specification identifies all function calls and parameters passed between the main

More information

Developer Documentation

Developer Documentation Developer Documentation Development of Scanner Applications for ACD Windows CE Second Edition Devices Version: 3.0 Copyright ACD Gruppe This document may not be duplicated or made accessible to third parties

More information

User Guide for Sign Language Video Chat for Deaf People. User Guide. For End Users ( or Deaf people) For Developers ( or Programmers) FAQs

User Guide for Sign Language Video Chat for Deaf People. User Guide. For End Users ( or Deaf people) For Developers ( or Programmers) FAQs User Guide For End Users (or Deaf people) For Developers ( or Programmers) FAQs For End Users ( or Deaf people) 1. Introduction This application allows two or more Deaf people to communicate with each

More information

What is a Process. Processes. Programs and Processes. System Classification 3/5/2013. Process: An execution stream and its associated state

What is a Process. Processes. Programs and Processes. System Classification 3/5/2013. Process: An execution stream and its associated state What is a Process Process: An execution stream and its associated state Processes Execution Stream Set of instructions Thread of control Process State Hardware state Privilege level, segments, page tables

More information

DPF-0401 Windows driver software for USB expansion I/O products

DPF-0401 Windows driver software for USB expansion I/O products Interface USB Driver (I/O-CD) DPF-0401 Windows driver software for USB expansion I/O products Help for Windows www.interface.co.jp Contents Chapter 1 Introduction...3 1.1 Overview... 3 1.2 Corresponding

More information

PRINCIPLES OF OPERATING SYSTEMS

PRINCIPLES OF OPERATING SYSTEMS PRINCIPLES OF OPERATING SYSTEMS Tutorial-1&2: C Review CPSC 457, Spring 2015 May 20-21, 2015 Department of Computer Science, University of Calgary Connecting to your VM Open a terminal (in your linux machine)

More information

Ethernet Industrial I/O Modules API and Programming Guide Model 24xx Family Rev.A August 2010

Ethernet Industrial I/O Modules API and Programming Guide Model 24xx Family Rev.A August 2010 Ethernet Industrial I/O Modules API and Programming Guide Model 24xx Family Rev.A August 2010 Designed and manufactured in the U.S.A. SENSORAY p. 503.684.8005 email: info@sensoray.com www.sensoray.com

More information

ADS Windows CE Digital I/O Driver

ADS Windows CE Digital I/O Driver ADS Windows CE Digital I/O Driver Specification Version 1.2 ADS Document 110025-10056 ADS document # 110025-10056 Page 1 Introduction The purpose of the Digital I/O (DIO) driver is to encapsulate all available

More information

Progression version Crystal Report Functionality Changes

Progression version Crystal Report Functionality Changes Progression version 7.8.100 Crystal Report Functionality Changes Despite the continued efforts of Exact to ensure that the information in this document is as complete and up-to-date as possible, Exact

More information

Ellisys USB Analysis SDK

Ellisys USB Analysis SDK Ellisys USB Analysis SDK Getting Started Guide Version 3.1.0 24 April 2008 Ellisys SA ch. du Grand-Puits 38 CH-1217 Meyrin Geneva Switzerland www.ellisys.com support@ellisys.com Chapter 1: Overview...3

More information

Visual C++ Tutorial. For Introduction to Programming with C++ By Y. Daniel Liang

Visual C++ Tutorial. For Introduction to Programming with C++ By Y. Daniel Liang 1 Introduction Visual C++ Tutorial For Introduction to Programming with C++ By Y. Daniel Liang Visual C++ is a component of Microsoft Visual Studio 2012 for developing C++ programs. A free version named

More information

Altia API Reference Manual

Altia API Reference Manual Altia API Reference Manual August 1999 Altia, Inc. 1992-1999 5030 Corporate Plaza Drive #200 Colorado Springs, CO 80919 This document contains information which is protected by copyright. All rights are

More information

Link native libraries from a.net application

Link native libraries from a.net application Link native libraries from a.net application Walter Hoolwerf (Radboud University, The Netherlands walto@vaag.cx) Mark Jans (Radboud University, The Netherlands mjans@home.nl) Abstract: To be written. Key

More information

CSCE Introduction to Computer Systems Spring 2019

CSCE Introduction to Computer Systems Spring 2019 CSCE 313-200 Introduction to Computer Systems Spring 2019 File System IV Dmitri Loguinov Texas A&M University April 9, 2019 1 Chapter 12: Roadmap 12.1 Overview 12.2 File organization 12.3 Directories 12.4

More information

Key Switch Control Software Windows driver software for Touch Panel Classembly Devices

Key Switch Control Software Windows driver software for Touch Panel Classembly Devices IFKSMGR.WIN Key Switch Control Software Windows driver software for Touch Panel Classembly Devices Help for Windows www.interface.co.jp Contents Chapter 1 Introduction 3 1.1 Overview... 3 1.2 Features...

More information

Targeting the NetWare Operating System PDK 5.0

Targeting the NetWare Operating System PDK 5.0 Targeting the NetWare Operating System PDK 5.0 Revised: 12/13/02 Metrowerks, the Metrowerks logo, and CodeWarrior are registered trademarks of Metrowerks Corp. in the US and/or other countries. All other

More information

NFC Framework and NT3H1201 Device Driver v1.1

NFC Framework and NT3H1201 Device Driver v1.1 NFC Framework and NT3H1201 Device Driver v1.1 Quickstart Guide for ARIS board All information contained in these materials, including products and product specifications, represents information on the

More information

Re-entrant code and Libraries

Re-entrant code and Libraries Re-entrant code and Libraries A library is a collection of code that implements commonly used methods or patterns with a public API. Libraries facilitate code reuse. Libraries can be shared (also known

More information

Intermediate Programming, Spring 2017*

Intermediate Programming, Spring 2017* 600.120 Intermediate Programming, Spring 2017* Misha Kazhdan *Much of the code in these examples is not commented because it would otherwise not fit on the slides. This is bad coding practice in general

More information

User s Guide OME-PCI Shop online at PCI Data Acquisition Board Windows Software Manual

User s Guide OME-PCI Shop online at    PCI Data Acquisition Board Windows Software Manual User s Guide Shop online at www.omega.com e-mail: info@omega.com OME-PCI-1002 PCI Data Acquisition Board Windows Software Manual OMEGAnet Online Service www.omega.com Internet e-mail info@omega.com Servicing

More information

CSCE Introduction to Computer Systems Spring 2019

CSCE Introduction to Computer Systems Spring 2019 CSCE 313-200 Introduction to Computer Systems Spring 2019 Threads Dmitri Loguinov Texas A&M University January 29, 2019 1 Updates Quiz on Thursday System Programming Tutorial (pay attention to exercises)

More information