Click here to Skip to main content
15,885,990 members
Articles / Programming Languages / C++

Kport Direct Access I/O Ports Under Win NT/2000/XP

Rate me:
Please Sign up or sign in to vote.
3.47/5 (9 votes)
6 Apr 2005CPOL 62.5K   2.8K   29  
Two simple functions for accessing I/O ports, skiping H.A.L.
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"

#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"

/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS

/////////////////////////////////////////////////////////////////////////////
// Espa�ol resources

#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ESN)
#ifdef _WIN32
LANGUAGE LANG_SPANISH, SUBLANG_SPANISH_MODERN
#pragma code_page(1252)
#endif //_WIN32

#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//

1 TEXTINCLUDE 
BEGIN
    "resource.h\0"
END

2 TEXTINCLUDE 
BEGIN
    "#include ""afxres.h""\r\n"
    "\0"
END

3 TEXTINCLUDE 
BEGIN
    "#define _AFX_NO_SPLITTER_RESOURCES\r\n"
    "#define _AFX_NO_OLE_RESOURCES\r\n"
    "#define _AFX_NO_TRACKER_RESOURCES\r\n"
    "#define _AFX_NO_PROPERTY_RESOURCES\r\n"
    "\r\n"
    "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ESN)\r\n"
    "LANGUAGE 10, 3\r\n"
    "#pragma code_page(1252)\r\n"
    "#include ""res\\Kports-SampleDlg.rc2""  // Recursos editados que no son de Microsoft Visual C++\r\n"
    "#include ""afxres.rc""         // Componentes est�ndar\r\n"
    "#endif\r\n"
    "\0"
END

#endif    // APSTUDIO_INVOKED


/////////////////////////////////////////////////////////////////////////////
//
// Icon
//

// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDR_MAINFRAME           ICON                    "res\\Kports-SampleDlg.ico"

/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//

IDD_KPORTSSAMPLEDLG_DIALOG DIALOGEX 0, 0, 205, 102
STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION | 
    WS_SYSMENU | WS_THICKFRAME
EXSTYLE WS_EX_APPWINDOW
CAPTION "Kports-SampleDlg"
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
    DEFPUSHBUTTON   "Exit",IDOK,139,81,59,14
    PUSHBUTTON      "Read",IDC_READ,7,81,59,14
    PUSHBUTTON      "Write",IDC_WRITE,69,81,59,14
    EDITTEXT        IDC_EDIT_READ,7,22,191,14,ES_AUTOHSCROLL
    EDITTEXT        IDC_EDIT_WRITE,7,59,191,14,ES_AUTOHSCROLL
    LTEXT           "Read Value  (Port 0x378):",IDC_STATIC,7,7,191,14
    LTEXT           "Write Value  (Port 0x378):",IDC_STATIC,7,45,191,14
END


/////////////////////////////////////////////////////////////////////////////
//
// Version
//

VS_VERSION_INFO VERSIONINFO
 FILEVERSION 1,0,0,82
 PRODUCTVERSION 1,0,0,82
 FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
 FILEFLAGS 0x1L
#else
 FILEFLAGS 0x0L
#endif
 FILEOS 0x4L
 FILETYPE 0x1L
 FILESUBTYPE 0x0L
BEGIN
    BLOCK "StringFileInfo"
    BEGIN
        BLOCK "0c0a04e4"
        BEGIN
            VALUE "FileDescription", "samplito"
            VALUE "FileVersion", "1.0.0.72"
            VALUE "InternalName", "Kports-SampleDlg.exe"
            VALUE "LegalCopyright", "2005"
            VALUE "OriginalFilename", "Kports-SampleDlg.exe"
            VALUE "ProductName", "sample"
            VALUE "ProductVersion", "1.0.0.72"
        END
    END
    BLOCK "VarFileInfo"
    BEGIN
        VALUE "Translation", 0xc0a, 1252
    END
END


/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//

#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO 
BEGIN
    IDD_KPORTSSAMPLEDLG_DIALOG, DIALOG
    BEGIN
        LEFTMARGIN, 7
        RIGHTMARGIN, 198
        TOPMARGIN, 7
        BOTTOMMARGIN, 95
    END
END
#endif    // APSTUDIO_INVOKED

#endif    // Espa�ol resources
/////////////////////////////////////////////////////////////////////////////



#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
#define _AFX_NO_SPLITTER_RESOURCES
#define _AFX_NO_OLE_RESOURCES
#define _AFX_NO_TRACKER_RESOURCES
#define _AFX_NO_PROPERTY_RESOURCES

#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ESN)
LANGUAGE 10, 3
#pragma code_page(1252)
#include "res\Kports-SampleDlg.rc2"  // Recursos editados que no son de Microsoft Visual C++
#include "afxres.rc"         // Componentes est�ndar
#endif

/////////////////////////////////////////////////////////////////////////////
#endif    // not APSTUDIO_INVOKED

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Web Developer
Argentina Argentina
I'm Javier Güerino Palacios.
I know MFC, PHP, C, C++, C#, Java, ASM-8086.
I study Ing. Electronics and Ing. Information systems.

Comments and Discussions