Tous nos rayons

Déjà client ? Identifiez-vous

Mot de passe oublié ?

Nouveau client ?

CRÉER VOTRE COMPTE
Win32 API Programming with Visual Basic
Ajouter à une liste

Librairie Eyrolles - Paris 5e
Indisponible

Win32 API Programming with Visual Basic

Win32 API Programming with Visual Basic

Steven Roman

536 pages, parution le 15/11/1999

Résumé

The Win32 API, or Application Programming Interface, is of immense use in extending the power of Visual Basic. The Win32 API is the collection of functions and subroutines that provides programmatic access to the features of the operating system. It allows Visual Basic programmers far greater access to the inner workings of the Windows operating system without having to suffer through the steep learning curve associated with Visual C++ style Windows programming.

The book is designed for users with an intermediate-level (or higher) knowledge of Visual Basic version 4 or later and a desire to stretch VB into the realm of Windows system programming. Users do not need any background in Visual C++, nor do they need any previous experience programming the Win32 API.

This book teaches users how to do relatively simple tasks, such as adding tab stops to a list box and gathering system information (i.e., which version of Windows is running on a system and the number of buttons on the user's mouse). It also teaches users about several advanced programming techniques such as synchronizing two VB applications so they can work in cooperation with each other and how to extract data from controls that belong to another application.

Win32 API Programming with Visual Basic also spends a good deal of time describing the basic operations of the Windows NT and Windows 95/98 operating systems. Microsoft's documentation seldom takes into account what the reader knows or does not know. Hence, a solid grounding in the basics of the Windows operating systems will help VB programmers to better understand Microsoft's documentation.

This book helps VB programmers eliminate the trial and error process that is usually associated with calling the Win32 API from Visual Basic and does so in a practical, straightforward fashion that is the hallmark of author Steve Roman's style.

Table of contents

Preface

I. Declaring API Functions in Visual Basic 1

1. Introduction
     What Is the Win32 API?
     The Obstacles to Win32 API Programming Under Visual Basic
     Proceed with Circumspection
     Cautions

2. Preliminaries
     Character Codes
     Parameters and Arguments
     Dynamic Link Libraries
     Some C++ Syntax
     Pointers

3. API Declarations
     The VB Declare Statement
     The VC-to-VB Translation Game Plan
     Passing Parameters to an External Function
     CopyMemory-A VB Hacker's Dream
     Dealing with API Errors

4. Data Types
     What Is a Data Type?
     Fundamental and Derived Data Types
     Visual Basic Data Types
     Basic VC++ Data Types
     Translating Derived Data Types
     Win32 Typedefs
     An Example
     Structures and User-Defined Types
     Flags
     Symbolic Constants

5. Signed and Unsigned Data Types
     Signed and Unsigned Representations
     Why Two Different Representations?
     Unsigned Representation
     Signed Representation
     Translating Between Signed and Unsigned Representations
     Converting Between Word Lengths

6. Strings
     The BSTR
     C-Style LPSTR and LPWSTR Strings
     String Terminology
     Tools for Exploring Strings
     String Conversion by VB
     Passing Strings to the Win32 API
     Strings and Byte Arrays
     Getting the Address of a Variable of User -Defined Type

7. System Information Functions
     The Computer's Name
     Special Windows Paths
     The Operating System Version
     System Metrics
     System Parameters
     System Colors

8. Exception Handling
     Thwarting the General Protection Fault
     Replacing the Default Exception Handler
     The Replacement Exception Handler
     A Complete Example

II. The Windows Operating System 139

9. Windows Architecture
     Processes and Threads
     Windows Architecture
     Differences Between Windows 9x and Windows NT

10. Objects and Their Handles
     Handles
     Example: File Mapping

11. Processes
     Process Handles and IDs
     Module Handles
     Identifying a Process
     Process Pseudohandles
     Enumerating Processes
     Is This Application Already Running?

12. Threads
     Thread Handles and Thread IDs
     Thread Priority
     Thread Synchronization
     Waiting Can Be Tricky

13. Windows Memory Architecture
     Types of Memory
     The Address Space of a Process
     Example: Using GetSystemInfo
     Allocating Virtual Memory
     Example: Using GlobalMemoryStatus
     Virtual Memory Management
     Heaps of Memory
     Example: Mapping Virtual Memory

14. Portable Executable Files
     Module Relocation
     The PE File Format
     Example: Getting PE File Information

III. Windows (USER32.DLL Programming ) 261

15. Windows: The Basics
     Terminology
     Window Styles
     Owned Windows
     Z Order
     Enumerating Windows
     Size and Position Functions

16. Windows Messages
     The Message Queues of a Thread
     The Windows Messaging System
     Posting and Sending Messages
     Example: Sending Messages to a Listbox
     Interprocess Marshalling
     Copying Data Between Processes
     The Local Input State

17. Window Classes and the Window Creation Process
     Window Classes
     Predefined Window Classes
     The Window Procedure of a Window Class
     Creating a Window
     Window Styles
     Windows and VB Controls
     Example: Spying on Windows

18. Windows Subclassing
     Subclassing a Window or Window Class
     Example: Subclassing the VB Checkbox Class

19. Windows Hooks
     Global and Thread-Specific Hooks
     Setting the Hook
     Hook Procedures
     Hook Types
     Hook Chains
     Example: A Local Hook
     Example: A Global Hook

20. DLL Injection and Foreign Process Access
     Accessing a Foreign Process: The Hooked Thread Graph
     Allocating Foreign Memory
     Example: Foreign Control Extraction
     Example: Fixing the VB6 Help System

IV. The Windows GDI (GDI32.DLL Programming ) 353

21. Bitmaps
     Rectangles
     Bitmaps
     Bitmap Functions
     Using Bitmaps in Menus

22. Device Contexts I: Overview
     How Windows Handles Window Painting
     Device Contexts

23. Device Contexts II: Types of Device Contexts
     Information Device Contexts
     Memory Device Contexts
     Printer Device Contexts
     Display Device Contexts
     Coordinate Systems

24. Device Contexts III: Coordinate Systems
     GDI Coordinate Systems
     Virtual Space
     Device Space
     Page Space
     Virtual Space to Physical Space
     Setting Up Logical Coordinates in Physical Space
     Mapping Modes
     World Space

25. Fonts
     Font Families
     Font Technologies
     Character Sets
     Logical and Physical Fonts
     Enumerating Fonts

V. Appendixes 435

A. The Clipboard

B. The Windows Shell

C. The Registry and Private Profiles

L'auteur - Steven Roman

Steven Roman is Professor Emeritus of mathematics at the California State University, Fullerton. Dr. Roman has authored 32 books, including a number of books on mathematics, such as Coding and Information Theory, Advanced Linear Algebra, and Field Theory, published by Springer-Verlag. He has also written a series of 15 small books entitled Modules in Mathematics, designed for thegeneral college-level liberal arts student.

Caractéristiques techniques

  PAPIER
Éditeur(s) O'Reilly
Auteur(s) Steven Roman
Parution 15/11/1999
Nb. de pages 536
EAN13 9781565926318
ISBN13 978-1-56592-631-8

Avantages Eyrolles.com

Livraison à partir de 0,01 en France métropolitaine
Paiement en ligne SÉCURISÉ
Livraison dans le monde
Retour sous 15 jours
+ d'un million et demi de livres disponibles
satisfait ou remboursé
Satisfait ou remboursé
Paiement sécurisé
modes de paiement
Paiement à l'expédition
partout dans le monde
Livraison partout dans le monde
Service clients sav@commande.eyrolles.com
librairie française
Librairie française depuis 1925
Recevez nos newsletters
Vous serez régulièrement informé(e) de toutes nos actualités.
Inscription