全國最多中醫師線上諮詢網站-台灣中醫網
發文 回覆 瀏覽次數:578
推到 Plurk!
推到 Facebook!

程式宣告問題

尚未結案
leonard
一般會員


發表:42
回覆:42
積分:21
註冊:2003-10-18

發送簡訊給我
#1 引用回覆 回覆 發表時間:2003-12-03 23:08:37 IP:211.76.xxx.xxx 未訂閱
#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位址讀寫錯誤 不知道該這個函式如何寫
taishyang
站務副站長


發表:377
回覆:5490
積分:4563
註冊:2002-10-08

發送簡訊給我
#2 引用回覆 回覆 發表時間:2003-12-03 23:16:32 IP:140.135.xxx.xxx 未訂閱
leonard您好: 請參考下面聯結讓您的程式碼更方便閱讀 http://delphi.ktop.com.tw/topic.php?TOPIC_ID=41390 謝謝您的配合 順心
系統時間:2024-05-18 13:08:04
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!