#include
#pragma hdrstop
#include "dsk6x11hpi.h"
#include "TTi.h"
//#define little_endian true;
//#define HPI_boot false;
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//--------------------------------------------------------------------------- void __fastcall TForm1::Button1Click(TObject *Sender)
{
HINSTANCE dsk6711=LoadLibrary("dsk6x11hpi.dll");
BOOL(__stdcall *dsk6x_reset_dsp)(dskHANDLE,unsigned char,unsigned char);
if(dsk6711)
{
dsk6x_reset_dsp=(BOOL(__stdcall*)(dskHANDLE,unsigned char,unsigned char))GetProcAddress(dsk6711,"dsk6x_reset_dsp");
}
//主程式
dskHANDLE handle;
if(!dsk6x_reset_dsp(handle,false,true))//程式宣告這樣寫可以嗎//
ShowMessage("error5");
FreeLibrary(dsk6711);
}
這是這個函式定義
BOOL dsk6x_reset_dsp(dskHANDLE dskHndl, unsigned char Endian, unsigned char BOOT)
Description The dsk6x_reset_dsp function places the DSP in reset mode and selects modes of operation for the DSP. The return value indicates the success of the function call.?The dskHndl parameter is a handle to the board.?The Endian parameter indicates desired endian mode of operation: 1 denotes Big Endian, 0 denotes Little Endian?The Boot parameter indicates desired boot mode of operation: 1 denotes HPI Boot, 0 denotes ROM Boot
可是當我執行時---會出現dsk6x11hpi.dll位址讀寫錯誤
不知道該這個函式如何寫