Reply To: Build Delphi examples

Home Forums Discussions Support Portal Build Delphi examples Reply To: Build Delphi examples

#5943

Kon
Participant

А ты случаем не пробовал использовать эти фунции, называя их так как они экспортируются.

Смотри в winpk.pas как они объявленв для исполльзовани в Delphi

function OpenFilterDriver(pszFileName : Pchar): THANDLE; stdcall; external ‘ndisapi.dll’;
procedure CloseFilterDriver(hOpen: THANDLE); stdcall; external ‘ndisapi.dll’;
function GetDriverVersion(hOpen: THANDLE): DWORD; stdcall; external ‘ndisapi.dll’;
function GetTcpipBoundAdaptersInfo(hOpen: THANDLE; pAdapters: PTCP_AdapterList): DWORD; stdcall; external ‘ndisapi.dll’;
function SendPacketToMstcp(hOpen: THANDLE; pPacket: PETH_REQUEST): DWORD; stdcall; external ‘ndisapi.dll’;
function SendPacketToAdapter(hOpen: THANDLE; pPacket: PETH_REQUEST): DWORD; stdcall; external ‘ndisapi.dll’;
function ReadPacket(hOpen: THANDLE; pPacket: PETH_REQUEST): DWORD; stdcall; external ‘ndisapi.dll’;
function SetAdapterMode(hOpen: THANDLE; pMode: PADAPTER_MODE): DWORD; stdcall; external ‘ndisapi.dll’;
function FlushAdapterPacketQueue(hOpen: THANDLE; hAdapter: THANDLE): DWORD; stdcall; external ‘ndisapi.dll’;
function SetPacketEvent(hOpen: THANDLE; hAdapter: THANDLE; hWin32Event: THANDLE): DWORD; stdcall; external ‘ndisapi.dll’;
function SetWANEvent(hOpen: THANDLE; hWin32Event: THANDLE): DWORD; stdcall; external ‘ndisapi.dll’;
function SetAdapterListChangeEvent(hOpen: THANDLE; hWin32Event: THANDLE): DWORD; stdcall; external ‘ndisapi.dll’;
function NdisrdRequest(hOpen: THANDLE; OidData: PPACKET_OID_DATA; dwSet: DWORD): DWORD; stdcall; external ‘ndisapi.dll’;
function SetHwPacketFilter(hOpen: THANDLE; hAdapter: THANDLE; dwFilter: DWORD):DWORD; stdcall; external ‘ndisapi.dll’;
function GetHwPacketFilter(hOpen: THANDLE; hAdapter: THANDLE; var dwFilter: DWORD):DWORD; stdcall; external ‘ndisapi.dll’;
function SetMTUDecrement(dwMTUDecrement: DWORD): DWORD; stdcall; external ‘ndisapi.dll’;
function GetMTUDecrement(): DWORD; stdcall; external ‘ndisapi.dll’;
function IsDriverLoaded(hOpen: THANDLE): Boolean; stdcall; external ‘ndisapi.dll’;
function GetBytesReturned(hOpen: THANDLE): DWORD; stdcall; external ‘ndisapi.dll’;
function ConvertWindowsNTAdapterName(szAdapterName: Pchar; szUserFriendlyName: Pchar; dwUserFriendlyNameLength: DWORD): DWORD; stdcall; external ‘ndisapi.dll’;
function ConvertWindows2000AdapterName(szAdapterName: Pchar; szUserFriendlyName: Pchar; dwUserFriendlyNameLength: DWORD): DWORD; stdcall; external ‘ndisapi.dll’;
function ConvertWindows9xAdapterName(szAdapterName: Pchar; szUserFriendlyName: Pchar; dwUserFriendlyNameLength: DWORD): DWORD; stdcall; external ‘ndisapi.dll’;
……………………………

Все сэмплы прекрасно компилятся.