C++Builder Programming Forum
C++Builder  |  Delphi  |  FireMonkey  |  C/C++  |  Free Pascal  |  Firebird
볼랜드포럼 BorlandForum
 경고! 게시물 작성자의 사전 허락없는 메일주소 추출행위 절대 금지
C++빌더 포럼
Q & A
FAQ
팁&트릭
강좌/문서
자료실
컴포넌트/라이브러리
메신저 프로젝트
볼랜드포럼 홈
헤드라인 뉴스
IT 뉴스
공지사항
자유게시판
해피 브레이크
공동 프로젝트
구인/구직
회원 장터
건의사항
운영진 게시판
회원 메뉴
북마크
볼랜드포럼 광고 모집

C++빌더 Q&A
C++Builder Programming Q&A
[41605] Re:Re:GetProceAddress()이함수를 써기 위한 헤드 파일이 따로 있나요
나그네 [lee180] 935 읽음    2005-08-23 13:43
감사합니다.그런디 되지 않네요
수고하이소

박지훈.임프 님이 쓰신 글 :
: 오타가 문제의 원인인 듯...
: GetProceAddress가 아니라,
: GetProcAddress 입니다. (금방 알아보시도록 일부러 아래위로 줄을 맞췄습니다)
:
: 그럼...
:
:
: 나그네 님이 쓰신 글 :
: : 잘 못된거 있음 좀 고쳐 주세요
: : 그리고 에러가  나요
: : 특히 GetProceAddress이것과  inp32 = (inpfuncPtr) GetProceAddress(hLib,"inp32");가 나네요
: : 제가 하고자 하는것은 isa 슬롯에 io카드를 꽂아서 읽거나 혹은 쓰기를 하고자 합니다.
: :
: : #include <vcl.h>
: : #pragma hdrstop
: :
: : #include "Unit1.h"
: : #include "conio.h"
: : #include "windows.h"
: : //---------------------------------------------------------------------------
: : #pragma package(smart_init)
: : #pragma resource "*.dfm"
: : TForm1 *Form1;
: :
: : typedef short __stdcall (*inpfuncPtr)(short portaddr);
: : typedef void __stdcall(*oupfuncPtr)(short portaddr,short datum);
: :
: :
: : //---------------------------------------------------------------------------
: : __fastcall TForm1::TForm1(TComponent* Owner)
: :     : TForm(Owner)
: : {
: :     HINSTANCE hLib;
: :     inpfuncPtr inp32;
: :     oupfuncPtr oup32;
: :
: :
: :     short x;
: :     int i;
: :
: :     hLib = LoadLibrary("inpout32.dll");
: :
: :     if(hLib == NULL)
: :     {
: :         ShowMessage("LoadLibrary Failed.");
: :        // return -1;
: :     }
: :
: :     inp32 = (inpfuncPtr) GetProceAddress(hLib,"inp32");
: :
: :     if(inp32 == NULL)
: :     {
: :         ShowMessage("GetProcAddress for Oup32 Failed.");
: :         //return -1;
: :     }
: :    
: : }
: : //---------------------------------------------------------------------------
: : void __fastcall TForm1::Button1Click(TObject *Sender)
: : {
: :     short x;
: :     for(int i = 0x300; i < 0x304 ; i++)
: :     {
: :         x = inp32(i);
: :         ShowMessage(AnsiString("Inp ") + i + x);
: :     }
: : }
: : //---------------------------------------------------------------------------

+ -

관련 글 리스트
41542 GetProceAddress()이함수를 써기 위한 헤드 파일이 따로 있나요 나그네 957 2005/08/19
41551     Re:GetProceAddress()이함수를 써기 위한 헤드 파일이 따로 있나요 박지훈.임프 947 2005/08/19
41605         Re:Re:GetProceAddress()이함수를 써기 위한 헤드 파일이 따로 있나요 나그네 935 2005/08/23
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.