C++ Builder 怎么调用 inpout32.dll? 我用implib 生成了对应的lib文件,也用add proj 把lib文件导入工程中,其中的头文件inpout32.h是下载inpout32包里带有的,也#include 了,但是运行时却出现 [Linker Error] Unresolved external '__stdcall IsXP64Bit()' referenced from D:\BCBPROJ\DLLTEST\UNIT1.OBJ
这样的错误,哪位能指点一二,谢谢
程序主体C++ Builder 6
```c++
#include <vcl.h>
#pragma hdrstop
#include "Unit1.h"
#include "inpout32.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
IsXP64Bit();
}
//
```c++
头文件C++ Builder 6
//---------------------------------------------------------------------------
#ifndef Unit1H
#define Unit1H
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
//---------------------------------------------------------------------------
class TForm1 : public TForm
{
__published: // IDE-managed Components
TButton *Button1;
void __fastcall Button1Click(TObject *Sender);
private: // User declarations
public: // User declarations
__fastcall TForm1(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TForm1 *Form1;
//---------------------------------------------------------------------------
#endif
软件自带的头文件inpout32.h,应该是vc++的
```c++
#pragma once
//Functions exported from DLL.
//For easy inclusion is user projects.
//Original InpOut32 function support
void _stdcall Out32(short PortAddress, short data);
short _stdcall Inp32(short PortAddress);
//My extra functions for making life easy
BOOL _stdcall IsInpOutDriverOpen(); //Returns TRUE if the InpOut driver was opened successfully
BOOL _stdcall IsXP64Bit(); //Returns TRUE if the OS is 64bit (x64) Windows.
//DLLPortIO function support
UCHAR _stdcall DlPortReadPortUchar (USHORT port);
void _stdcall DlPortWritePortUchar(USHORT port, UCHAR Value);
USHORT _stdcall DlPortReadPortUshort (USHORT port);
void _stdcall DlPortWritePortUshort(USHORT port, USHORT Value);
ULONG _stdcall DlPortReadPortUlong(ULONG port);
void _stdcall DlPortWritePortUlong(ULONG port, ULONG Value);
//WinIO function support (Untested and probably does NOT work - esp. on x64!)
PBYTE _stdcall MapPhysToLin(PBYTE pbPhysAddr, DWORD dwPhysSize, HANDLE *pPhysicalMemoryHandle);
BOOL _stdcall UnmapPhysicalMemory(HANDLE PhysicalMemoryHandle, PBYTE pbLinAddr);
BOOL _stdcall GetPhysLong(PBYTE pbPhysAddr, PDWORD pdwPhysVal);
BOOL _stdcall SetPhysLong(PBYTE pbPhysAddr, DWORD dwPhysVal);