|
오타가 문제의 원인인 듯...
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);
: }
: }
: //---------------------------------------------------------------------------
|