我的实践经验:
Delphi
type
TNMServiceStartProc = function( hInst: LongWord; h: HWND; u: UINT ): integer; stdcall;
TNMServiceStopProc = function: integer; stdcall;
TNMRegisterDealerProc = function( dealer: FPP ): integer; stdcall;
TNMCallProc = function( lpAddres: LPTSTR; nmAddType: DWORD ): integer; stdcall;
TNMHangUpProc = function: integer; stdcall;
TNMCancelProc = function: integer; stdcall;Vc:
<Nmapi.h>
int WINAPI NMServiceStart( HINSTANCE hInstance, HWND hwnd, UINT uint );
int WINAPI NMServiceStop();
int WINAPI NMRegisterDealer( _ACCEPTCALL fpDealer );
int WINAPI NMCall( LPSTR lpAddress, tagNmAddrType nmAddType);
int WINAPI NMHangUp();
int WINAPI NMCancel(); <Nmapi.def>
LIBRARY Nmapi
EXPORTS
NMServiceStart @1
NMServiceStop @2
NMRegisterDealer @3
NMCall @4
NMHangUp @5
NMCancel @6Note: 关键是应该有一个def文件,否则你用dll出口会有问题。
提醒:当你的dll创建好后,用dumpbin /exports 看看是否正确输出了
Delphi
type
TNMServiceStartProc = function( hInst: LongWord; h: HWND; u: UINT ): integer; stdcall;
TNMServiceStopProc = function: integer; stdcall;
TNMRegisterDealerProc = function( dealer: FPP ): integer; stdcall;
TNMCallProc = function( lpAddres: LPTSTR; nmAddType: DWORD ): integer; stdcall;
TNMHangUpProc = function: integer; stdcall;
TNMCancelProc = function: integer; stdcall;Vc:
<Nmapi.h>
int WINAPI NMServiceStart( HINSTANCE hInstance, HWND hwnd, UINT uint );
int WINAPI NMServiceStop();
int WINAPI NMRegisterDealer( _ACCEPTCALL fpDealer );
int WINAPI NMCall( LPSTR lpAddress, tagNmAddrType nmAddType);
int WINAPI NMHangUp();
int WINAPI NMCancel(); <Nmapi.def>
LIBRARY Nmapi
EXPORTS
NMServiceStart @1
NMServiceStop @2
NMRegisterDealer @3
NMCall @4
NMHangUp @5
NMCancel @6Note: 关键是应该有一个def文件,否则你用dll出口会有问题。
提醒:当你的dll创建好后,用dumpbin /exports 看看是否正确输出了
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货