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

引用dll的錯誤??

缺席
mine
中階會員


發表:28
回覆:129
積分:56
註冊:2004-03-31

發送簡訊給我
#1 引用回覆 回覆 發表時間:2004-05-14 10:28:46 IP:61.221.xxx.xxx 未訂閱
請問有人能用D7 or D5 載入這隻dll檔嗎ftp://211.21.197.2/switchnt.dll 我在定義後編譯時出現了初始值失敗0Xc000008 這訊息 function TS_CloseConference( ConferenceID:Integer):Integer;stdcall;external 'switchnt.dll'; function TS_ConnectStatus( PortNumber:Integer;var PortString:Integer;Direction:Integer):Integer;stdcall;external 'switchnt.dll'; function TS_CreateConference(Mode,PortCount:Integer;var PortString,ConferenceID:Integer):Integer;stdcall;external 'switchnt.dll'; function TS_DisconnectAll():Integer;stdcall;external 'switchnt.dll'; function TS_GetDevicePortNo( DeviceType, DeviceLineNo:Integer;var PortNo:Integer):Integer;stdcall;external 'switchnt.dll'; function TS_GetTonePortNo( ToneType, ToneSetNo:Integer;var PortNo:Integer):Integer;stdcall;external 'switchnt.dll'; function TS_JoinConference( ConferenceID,PortNumber:Integer):Integer;stdcall;external 'switchnt.dll'; function TS_OnePortDisconnectAll( PortNumber, Direction:Integer):Integer;stdcall;external 'switchnt.dll'; function TS_SetBusyTone(var Cadence :Integer):Integer;stdcall;external 'switchnt.dll'; function TS_SetRingbackTone(var Cadence :Integer; SetNo:Integer):Integer;stdcall;external 'switchnt.dll'; function TS_StartSwitch(var TotalPort:LongInt; SwitchApid:Integer):Integer;stdcall;external 'switchnt.dll'; function TS_StopSwitch( SwitchApid:Integer):Integer;stdcall;external 'switchnt.dll'; function TS_Switch( Action:Integer; PortA:Integer; PortB:Integer; Direction:Integer):Integer;stdcall;external 'switchnt.dll'; function TS_SwitchToAudioIn( Action, PortNo, SetNo:Integer):Integer;stdcall;external 'switchnt.dll'; function TS_SwitchSCSA( Action, PortA, SCSABus, SCSASlot, Direction:Integer):Integer;stdcall;external 'switchnt.dll'; function TS_SwitchToSpeaker( Action, PortNo, SetNo, Mode:Integer):Integer;stdcall;external 'switchnt.dll'; function TS_UnjoinConference( ConferenceID, PortNumber:Integer):Integer;stdcall;external 'switchnt.dll'; function TS_SetConferenceRoomSize( RoomSize:Integer;var MaxRoomNo:Integer):Integer;stdcall;external 'switchnt.dll'; function TS_GetPortTimeSlot( PortNo:Integer;var OutSCSAbus, OutSCSAslot, InSCSAbus, InSCSAslot:Integer):Integer;stdcall;external 'switchnt.dll'; function TS_OpenConferenceRoomNumber( RoomNo:Integer):Integer;stdcall;external 'switchnt.dll'; function TS_OnlineChangeClockSource(BoardNo, ClockSource:Integer):Integer;stdcall;external 'switchnt.dll'; 這時內部的函式宣告 相同的驅動有能人能載入這dll嗎?或是不吝指教 讓我知道一下我那裡用錯了 感謝
mine
中階會員


發表:28
回覆:129
積分:56
註冊:2004-03-31

發送簡訊給我
#2 引用回覆 回覆 發表時間:2004-05-21 09:13:30 IP:61.221.xxx.xxx 未訂閱
幾經測試還是無法找到解答這是新改寫的switchnt.pas 雖然可以用但是編譯初期仍會出現0xc00008的錯誤訊息 有人可以幫我解釋一下錯誤在那嗎? Unit Switchnt; //  PURPOSE: //    Contains declarations for use by applications and other DLLs that //    link to this DLL.  It is not used to build the DLL itself. // {$WEAKPACKAGEUNIT}    interface    (*$HPPEMIT '' *) (*$HPPEMIT '#include ' *) (*$HPPEMIT '' *) (*$HPPEMIT '#ifndef INC_DLLSKEL_H' *) (*$HPPEMIT '#define INC_DLLSKEL_H' *) (*$HPPEMIT '#endif' *) uses windows; //#include // DLLIMPORT __declspec(dllimport) {*************************************** * AI Return Error Codes * ***************************************} Const mmsyst = 'switchnt.dll'; TR_SUCCESS= $00; //API no error TR_INVFUNC= $06; //Invalid Function TR_INVPARM= $07; //Invalid Input Parameter TR_INVPORT= $08; //Invalid Port Number TR_NOCONN = $0B ; //disconnect no connected lines TR_DIRECTERR= $0C; //disconnect direction error TR_DUPCONN = $0D ; //connect to already connect line TR_INVAPID = $14 ; //AP input ID not equal lock ID TR_NOFREEID= $15 ; //no free ID TR_APIMISS = $80 ; //TSR not installed TR_INITCARDERR= $81; //initial card failed TR_MAPBUFFERR= $82 ; //Map audio buffer failed TR_READREGERR= $83 ; //Read registry error TR_MAPSRAMERR= $84 ; //Map SRAM address error (NT only) TR_MUTEXERR = $85 ; //Create Mutex error {/* connect/disconnect action parameter */} CONNECTIT= $1 ; DISCONNECTIT= $0 ; {/* connect/disconnect direction parameter */} DIRECTION_ATOB= $0; DIRECTION_BTOA= $1; DIRECTION_BOTH= $2; {/* connect/disconnect Speaker Mode parameter */} PORTOUTPUTTOSPEAKER= 0; //connect/disc. port output to speaker PORTINPUTTOSPEAKER= 1; //connect/disc. port input to speaker PORTBOTHTOSPEAKER= 2 ;//connect/disc. port both to speaker {/* Create Conference Mode parameter */} CROSSCONFERENCE= 0 ; STARCONFERENCE= 1 ; //Device Type DT_DAA= 1 ; DT_SLIC= 2 ; DT_VOICECONNECT= 3 ; DT_VOICE= 4 ; DT_RECEIVER= 5 ; DT_DIALER= 6 ; DT_FAX =7 ; DT_SPEAKER= 8 ; DT_AUDIOIN= 9 ; DT_T1E1 =10 ; DT_E1CONTROL= 12 ; DT_DID = 13 ; DT_ISDN = 14 ; DT_G729A= 15 ; DT_BRI = 16 ; DT_FULLDUPLEX = 17 ; DT_PRIMONITOR = 18 ; DT_PRISLIC =19 ; DT_PRIVOIP= 20 ;//12-20-2002 //Tone Type TT_RINGBACK = 1 ; TT_BUSY = 2 ; TT_DIAL = 3 ; TT_MUSIC= 4 ; TT_WARNING= 5 ; TT_CALLWAIT= 6 ; //Special Port (Virtual) // SPEAKERPORT1 383 // AUDIOINPORT1 384 RINGBTONEPORT1= 385; RINGBTONEPORT2= 386; BUSYTONEPORT= 387 ; WARNTONEPORT= 388 ; DIALTONEPORT= 389 ; MUSICPORT = 390 ; DIALTONEPORT2= 391 ; DIALTONEPORT3= 392 ; BUSYTONEPORT2= 393 ; CALLWAITTONEPORT= 394; //Clock Source CLOCK_INTERNAL= 0 ; CLOCK_PORT1= 1 ; CLOCK_PORT2= 2 ; CLOCK_PORT3= 3 ; CLOCK_PORT4= 4 ; //------------------------------------------------------------------------- // imported function declarations function TS_StartSwitch(TotalPort:PINT;SwitchAPID:PINT):Integer;stdcall; function TS_StopSwitch(SwitchAPID:INTEGER):Integer;stdcall; function TS_Switch(Action:INTEGER;PortA:INTEGER;PortB:INTEGER;Direction:INTEGER):Integer;stdcall; function TS_ConnectStatus(PortNo:INTEGER;PortString:PINT;Direction:INTEGER):Integer;stdcall; function TS_DisconnectAll():Integer;stdcall; function TS_OnePortDisconnectAll(PortNo:INTEGER;Direction:INTEGER):Integer;stdcall; function TS_SetBusyTone(Cadence:PINT):Integer;stdcall; function TS_SetRingbackTone(Cadence:PINT;SetNo:INTEGER):Integer;stdcall; function TS_GetDevicePortNo(DeviceType:INTEGER;DeviceLineNo:INTEGER;PortNo:PINT):Integer;stdcall; function TS_GetTonePortNo(ToneType:INTEGER;ToneSetNo:INTEGER;PortNo:PINT):Integer;stdcall; function TS_SwitchToSpeaker(Action:INTEGER;PortNo:INTEGER;SetNo:INTEGER;Mode:INTEGER):Integer;stdcall; function TS_SwitchToAudioIn(Action:INTEGER;PortNo:INTEGER;SetNo:INTEGER):Integer;stdcall; function TS_CreateConference(Mode:INTEGER;PortCount:INTEGER;PortString:PINT;pConferenceID:PINT):Integer;stdcall; function TS_CloseConference(ConferenceID:INTEGER):Integer;stdcall; function TS_JoinConference(ConferenceID:INTEGER;PortNo:INTEGER):Integer;stdcall; function TS_UnjoinConference(ConferenceID:INTEGER;PortNo:INTEGER):Integer;stdcall; function TS_SwitchSCSA(Action:INTEGER;PortA:INTEGER;SCSAbus:INTEGER;SCSAslot:INTEGER;Direction:INTEGER):Integer;stdcall; function TS_GetPortTimeSlot(PortNo:INTEGER;OutSCSAbus:PINT;OutSCSAslot:PINT;InSCSAbus:PINT;InSCSAslot:PINT):Integer;stdcall; function TS_SetConferenceRoomSize(RoomSize:INTEGER;MaxRoomNo:PINT):Integer;stdcall; function TS_OpenConferenceRoomNumber(RoomNo:INTEGER):Integer;stdcall; function TS_OnlineChangeClockSource(BoardNo:INTEGER;ClockSource:INTEGER):Integer;stdcall; (*$HPPEMIT '#if ifdef __cplusplus'*) (*$HPPEMIT 'extern "C" {'*) (*$HPPEMIT '#endif' *) implementation function TS_StartSwitch; external mmsyst name 'TS_StartSwitch'; function TS_StopSwitch;external mmsyst name 'TS_StopSwitch'; function TS_Switch;external mmsyst name 'TS_Switch'; function TS_ConnectStatus;external mmsyst name 'TS_ConnectStatus'; function TS_DisconnectAll;external mmsyst name 'TS_DisconnectAll'; function TS_OnePortDisconnectAll;external mmsyst name 'TS_OnePortDisconnectAll'; function TS_SetBusyTone;external mmsyst name 'TS_SetBusyTone'; function TS_SetRingbackTone;external mmsyst name 'TS_SetRingbackTone'; function TS_GetDevicePortNo;external mmsyst name 'TS_GetDevicePortNo'; function TS_GetTonePortNo;external mmsyst name 'TS_GetTonePortNo'; function TS_SwitchToSpeaker;external mmsyst name 'TS_SwitchToSpeaker'; function TS_SwitchToAudioIn;external mmsyst name 'TS_SwitchToAudioIn'; function TS_CreateConference;external mmsyst name 'TS_CreateConference'; function TS_CloseConference;external mmsyst name 'TS_CloseConference'; function TS_JoinConference;external mmsyst name 'TS_JoinConference'; function TS_UnjoinConference;external mmsyst name 'TS_UnjoinConference'; function TS_SwitchSCSA;external mmsyst name 'TS_SwitchSCSA'; function TS_GetPortTimeSlot;external mmsyst name 'TS_GetPortTimeSlot'; function TS_SetConferenceRoomSize;external mmsyst name 'TS_SetConferenceRoomSize'; function TS_OpenConferenceRoomNumber;external mmsyst name 'TS_OpenConferenceRoomNumber'; function TS_OnlineChangeClockSource;external mmsyst name 'TS_OnlineChangeClockSource'; (*$HPPEMIT '#ifdef __cplusplus *) (*$HPPEMIT '}'*) (*$HPPEMIT '#endif' *) end.
mine
中階會員


發表:28
回覆:129
積分:56
註冊:2004-03-31

發送簡訊給我
#3 引用回覆 回覆 發表時間:2004-05-28 14:41:04 IP:61.221.xxx.xxx 未訂閱
// //  MODULE:   switchnt.h // //  PURPOSE: //    Contains declarations for use by applications and other DLLs that //    link to this DLL.  It is not used to build the DLL itself. //    #ifndef INC_DLLSKEL_H #define INC_DLLSKEL_H #endif        // INC_DLLSKEL_H    #include  #define DLLIMPORT __declspec(dllimport) /*************************************** * AI Return Error Codes * ***************************************/ #define TR_SUCCESS 0x00 //API no error #define TR_INVFUNC 0x06 //Invalid Function #define TR_INVPARM 0x07 //Invalid Input Parameter #define TR_INVPORT 0x08 //Invalid Port Number #define TR_NOCONN 0x0B //disconnect no connected lines #define TR_DIRECTERR 0x0C //disconnect direction error #define TR_DUPCONN 0x0D //connect to already connect line #define TR_INVAPID 0x14 //AP input ID not equal lock ID #define TR_NOFREEID 0x15 //no free ID #define TR_APIMISS 0x80 //TSR not installed #define TR_INITCARDERR 0x81 //initial card failed #define TR_MAPBUFFERR 0x82 //Map audio buffer failed #define TR_READREGERR 0x83 //Read registry error #define TR_MAPSRAMERR 0x84 //Map SRAM address error (NT only) #define TR_MUTEXERR 0x85 //Create Mutex error /* connect/disconnect action parameter */ #define CONNECTIT 0x1 #define DISCONNECTIT 0x0 /* connect/disconnect direction parameter */ #define DIRECTION_ATOB 0x0 #define DIRECTION_BTOA 0x1 #define DIRECTION_BOTH 0x2 /* connect/disconnect Speaker Mode parameter */ #define PORTOUTPUTTOSPEAKER 0 //connect/disc. port output to speaker #define PORTINPUTTOSPEAKER 1 //connect/disc. port input to speaker #define PORTBOTHTOSPEAKER 2 //connect/disc. port both to speaker /* Create Conference Mode parameter */ #define CROSSCONFERENCE 0 #define STARCONFERENCE 1 //Device Type #define DT_DAA 1 #define DT_SLIC 2 #define DT_VOICECONNECT 3 #define DT_VOICE 4 #define DT_RECEIVER 5 #define DT_DIALER 6 #define DT_FAX 7 #define DT_SPEAKER 8 #define DT_AUDIOIN 9 #define DT_T1E1 10 #define DT_E1CONTROL 12 #define DT_DID 13 #define DT_ISDN 14 #define DT_G729A 15 #define DT_BRI 16 #define DT_FULLDUPLEX 17 #define DT_PRIMONITOR 18 #define DT_PRISLIC 19 #define DT_PRIVOIP 20 //12-20-2002 //Tone Type #define TT_RINGBACK 1 #define TT_BUSY 2 #define TT_DIAL 3 #define TT_MUSIC 4 #define TT_WARNING 5 #define TT_CALLWAIT 6 //Special Port (Virtual) //#define SPEAKERPORT1 383 //#define AUDIOINPORT1 384 #define RINGBTONEPORT1 385 #define RINGBTONEPORT2 386 #define BUSYTONEPORT 387 #define WARNTONEPORT 388 #define DIALTONEPORT 389 #define MUSICPORT 390 #define DIALTONEPORT2 391 #define DIALTONEPORT3 392 #define BUSYTONEPORT2 393 #define CALLWAITTONEPORT 394 //Clock Source #define CLOCK_INTERNAL 0 #define CLOCK_PORT1 1 #define CLOCK_PORT2 2 #define CLOCK_PORT3 3 #define CLOCK_PORT4 4 //------------------------------------------------------------------------- // imported function declarations #ifdef __cplusplus extern "C" { #endif DLLIMPORT int WINAPI TS_StartSwitch(int *TotalPort,int *SwitchAPID); DLLIMPORT int WINAPI TS_StopSwitch(int SwitchAPID); DLLIMPORT int WINAPI TS_Switch(int Action,int PortA,int PortB,int Direction); DLLIMPORT int WINAPI TS_ConnectStatus(int PortNo,int *PortString,int Direction); DLLIMPORT int WINAPI TS_DisconnectAll(); DLLIMPORT int WINAPI TS_OnePortDisconnectAll(int PortNo,int Direction); DLLIMPORT int WINAPI TS_SetBusyTone(short int *Cadence); DLLIMPORT int WINAPI TS_SetRingbackTone(short int *Cadence,int SetNo); DLLIMPORT int WINAPI TS_GetDevicePortNo(int DeviceType,int DeviceLineNo,int *PortNo); DLLIMPORT int WINAPI TS_GetTonePortNo(int ToneType,int ToneSetNo,int *PortNo); DLLIMPORT int WINAPI TS_SwitchToSpeaker(int Action,int PortNo,int SetNo, int Mode); DLLIMPORT int WINAPI TS_SwitchToAudioIn(int Action,int PortNo,int SetNo); DLLIMPORT int WINAPI TS_CreateConference(int Mode,int PortCount,int *PortString,int *pConferenceID); DLLIMPORT int WINAPI TS_CloseConference(int ConferenceID); DLLIMPORT int WINAPI TS_JoinConference(int ConferenceID, int PortNo); DLLIMPORT int WINAPI TS_UnjoinConference(int ConferenceID, int PortNo); DLLIMPORT int WINAPI TS_SwitchSCSA(int Action,int PortA,int SCSAbus,int SCSAslot,int Direction); DLLIMPORT int WINAPI TS_GetPortTimeSlot(int PortNo,int *OutSCSAbus,int *OutSCSAslot,int *InSCSAbus,int *InSCSAslot); DLLIMPORT int WINAPI TS_SetConferenceRoomSize(int RoomSize,int *MaxRoomNo); DLLIMPORT int WINAPI TS_OpenConferenceRoomNumber(int RoomNo); DLLIMPORT int WINAPI TS_OnlineChangeClockSource(int BoardNo, int ClockSource); #ifdef __cplusplus } #endif 這是c的原型 小弟真的解不出來了~ 請高手幫幫忙 ------------------------------------------------ 搞不懂!搞不懂!永遠都搞不懂!
系統時間:2024-05-19 11:09:47
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!