请问高手,我用软件转换的dll文件头文件,错在哪里? ( 积分: 200 )

R

rzqcjwrz

Unregistered / Unconfirmed
GUEST, unregistred user!
请问高手,我用软件转换的dll文件头文件,错在哪里?
unit HIKPLAYMPEG4;
{**************************************************************************}
{ }
{ This C DLL header file first (automatic) conversion generated by: }
{ HeadConv 4.0 (c) 2000 by Bob Swart (aka Dr.Bob - www.drbob42.com) }
{ Final Delphi-Jedi (Darth) command-line units edition }
{ }
{ Generated Date: 2005-5-1 }
{ Generated Time: 11:48:19 }
{ }
{**************************************************************************}

interface
uses
{$IFDEF WIN32}
Windows;
{$ELSE}
Wintypes, WinProcs;
{$ENDIF}


{=> d:/杭州海康威视数字技术有限公司/sdk/player sdk/HIKPLAYMPEG4.H <=}

{//////////////////////////////////////////////////////////////////// }
{///File: HikPlayMpeg4.h }
{///Date: 2003-12-06 }
{///Description: Interface for HikPlayM4.dll }
{///Copyright: Copyright(C)HangZhou Hikvision Digital Technology Co,.Ltd 2002-2008. All rights reserved. }
{//////////////////////////////////////////////////////////////////// }
{$IFNDEF _HIK_PLAY_M4}
{$DEFINE _HIK_PLAY_M4}

{$IFDEF _WINDLL}
const
HIK_PLAYM4_API = extern 'C'__declspec(dllexport);
{$ELSE}
const
HIK_PLAYM4_API = extern 'C'; {//__declspec(dllimport)}
{$ENDIF}

{///Max channel numbers }
const
HIK_PLAYM4_MAX_SUPPORTS = 100;
{///Wave coef range; }
const
MIN_WAVE_COEF = -100;
const
MAX_WAVE_COEF = 100;
{///Timer type }
const
TIMER_1 = 1; {//Only 16 timers for every process.Default TIMER;}
const
TIMER_2 = 2; {//Not limit;But the precision less than TIMER_1;}
{///BUFFER TYPE }
const
BUF_VIDEO_SRC = 1;
const
BUF_AUDIO_SRC = 2;
const
BUF_VIDEO_RENDER = 3;
const
BUF_AUDIO_RENDER = 4;
{///Error code }
const
HIK_PLAYM4_NOERROR = 0; {//no error}
const
HIK_PLAYM4_PARA_OVER = 1; {//input parameter is invalid;}
const
HIK_PLAYM4_ORDER_ERROR = 2; {//The order of the function to be called is error.}
const
HIK_PLAYM4_TIMER_ERROR = 3; {//Create multimedia clock failed;}
const
HIK_PLAYM4_DEC_VIDEO_ERROR = 4; {//Decode video data failed.}
const
HIK_PLAYM4_DEC_AUDIO_ERROR = 5; {//Decode audio data failed.}
const
HIK_PLAYM4_ALLOC_MEMORY_ERROR = 6; {//Allocate memory failed.}
const
HIK_PLAYM4_OPEN_FILE_ERROR = 7; {//Open the file failed.}
const
HIK_PLAYM4_CREATE_OBJ_ERROR = 8; {//Create thread or event failed}
const
HIK_PLAYM4_CREATE_DDRAW_ERROR = 9; {//Create DirectDraw object failed.}
const
HIK_PLAYM4_CREATE_OFFSCREEN_ERROR = 10; {//failed when creating off-screen surface.}
const
HIK_PLAYM4_BUF_OVER = 11; {//buffer is overflow}
const
HIK_PLAYM4_CREATE_SOUND_ERROR = 12; {//failed when creating audio device.}
const
HIK_PLAYM4_SET_VOLUME_ERROR = 13; {//Set volume failed}
const
HIK_PLAYM4_SUPPORT_FILE_ONLY = 14; {//The function only support play file.}
const
HIK_PLAYM4_SUPPORT_STREAM_ONLY = 15; {//The function only support play stream.}
const
HIK_PLAYM4_SYS_NOT_SUPPORT = 16; {//System not support.}
const
HIK_PLAYM4_FILEHEADER_UNKNOWN = 17; {//No file header.}
const
HIK_PLAYM4_VERSION_INCORRECT = 18; {//The version of decoder and encoder is not adapted.}
const
HIK_PALYM4_INIT_DECODER_ERROR = 19; {//Initialize decoder failed.}
const
HIK_PLAYM4_CHECK_FILE_ERROR = 20; {//The file data is unknown.}
const
HIK_PLAYM4_INIT_TIMER_ERROR = 21; {//Initialize multimedia clock failed.}
const
HIK_PLAYM4_BLT_ERROR = 22; {//Blt failed.}
const
HIK_PLAYM4_UPDATE_ERROR = 23; {//Update failed.}

{///Max display regions. }
const
MAX_DISPLAY_WND = 4;

{///Display type }
const
DISPLAY_NORMAL = 1;
const
DISPLAY_QUARTER = 2;

{///Display buffers }
const
MAX_DIS_FRAMES = 50;
const
MIN_DIS_FRAMES = 6;

{///Locate by }
const
BY_FRAMENUM = 1;
const
BY_FRAMETIME = 2;

{///Source buffer }
const
SOURCE_BUF_MAX = 1024*100000;
const
SOURCE_BUF_MIN = 1024*50;

{///Stream type }
const
STREAME_REALTIME = 0;
const
STREAME_FILE = 1;

{///frame type }
const
T_AUDIO16 = 101;
const
T_AUDIO8 = 100;

const
T_UYVY = 1;
const
T_YV12 = 3;
const
T_RGB32 = 7;
{///capability }
const
SUPPORT_DDRAW = 1;
const
SUPPORT_BLT = 2;
const
SUPPORT_BLTFOURCC = 4;
const
SUPPORT_BLTSHRINKX = 8;
const
SUPPORT_BLTSHRINKY = 16;
const
SUPPORT_BLTSTRETCHX = 32;
const
SUPPORT_BLTSTRETCHY = 64;
const
SUPPORT_SSE = 128;
const
SUPPORT_MMX = 256;

{///Frame position }
{{{ typedef struct{ }

{///Frame Info }
{{{ typedef struct{ }

{///Frame }
{{{ typedef struct{ }
{/////////////////////////////////////////////////////////////////////////////// }
{///API }
{/////////////////////////////////////////////////////////////////////////////// }

{/////////////////ver 1.0/////////////////////////////////////// }
{///Initialize DirecDraw.Now invalid. }
var
Hik_PlayM4_InitDDraw: function(hWnd: HWND): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
{///Release directDraw; Now invalid. }
var
Hik_PlayM4_RealeseDDraw: function: HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};

var
Hik_PlayM4_OpenFile: function(nPort: LongInt;
sFileName: PChar): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_CloseFile: function(nPort: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_Play: function(nPort: LongInt;
hWnd: HWND): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_Stop: function(nPort: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_Pause: function(nPort: LongInt;
nPause: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_Fast: function(nPort: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_Slow: function(nPort: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_OneByOne: function(nPort: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_SetPlayPos: function(nPort: LongInt;
fRelativePos: Single): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_GetPlayPos: function(nPort: LongInt): HIK_PLAYM4_API FLOAT cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_SetFileEndMsg: function(nPort: LongInt;
hWnd: HWND;
nMsg: Word): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_SetVolume: function(nPort: LongInt;
nVolume: Word): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_StopSound: function: HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_PlaySound: function(nPort: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_OpenStream: function(nPort: LongInt;
var pFileHeadBuf: BYTE;
nSize: LongInt;
nBufPoolSize: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_InputData: function(nPort: LongInt;
var pBuf: BYTE;
nSize: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_CloseStream: function(nPort: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_GetCaps: function: HIK_PLAYM4_API INT cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_GetFileTime: function(nPort: LongInt): HIK_PLAYM4_API DWORD cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_GetPlayedTime: function(nPort: LongInt): HIK_PLAYM4_API DWORD cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_GetPlayedFrames: function(nPort: LongInt): HIK_PLAYM4_API DWORD cdecl {$IFDEF WIN32} stdcall {$ENDIF};

{/////////////////ver 2.0 added/////////////////////////////////////// }
var
Hik_PlayM4_SetDecCallBack: function(nPort: LongInt;
nPort: VOID (CALLBACK* DECCBFUN)(LONG;
pBuf: PChar;
nSize: LongInt;
var pFrameInfo: FRAME_INFO;
nReserved1: LongInt;
nReserved2): LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_SetDisplayCallBack: function(nPort: LongInt;
nPort: VOID (CALLBACK* DISPLAYCBFUN)(LONG;
pBuf: PChar;
nSize: LongInt;
nWidth: LongInt;
nHeight: LongInt;
nStamp: LongInt;
nType: LongInt;
nReserved): LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PLayM4_ConvertToBmpFile: function(pBuf: PChar;
nSize: LongInt;
nWidth: LongInt;
nHeight: LongInt;
nType: LongInt;
sFileName: PChar): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_GetFileTotalFrames: function(nPort: LongInt): HIK_PLAYM4_API DWORD cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_GetCurrentFrameRate: function(nPort: LongInt): HIK_PLAYM4_API DWORD cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_GetPlayedTimeEx: function(nPort: LongInt): HIK_PLAYM4_API DWORD cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_SetPlayedTimeEx: function(nPort: LongInt;
nTime: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_GetCurrentFrameNum: function(nPort: LongInt): HIK_PLAYM4_API DWORD cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_SetStreamOpenMode: function(nPort: LongInt;
nMode: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_GetFileHeadLength: function: HIK_PLAYM4_API DWORD cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_GetSdkVersion: function: HIK_PLAYM4_API DWORD cdecl {$IFDEF WIN32} stdcall {$ENDIF};

{/////////////////ver 2.2 added/////////////////////////////////////// }
var
Hik_PlayM4_GetLastError: function(nPort: LongInt): HIK_PLAYM4_API DWORD cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_RefreshPlay: function(nPort: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_SetOverlayMode: function(nPort: LongInt;
bOverlay: Bool;
colorKey: TColorRef): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_GetPictureSize: function(nPort: LongInt;
var pWidth: LongInt;
var pHeight: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_SetPicQuality: function(nPort: LongInt;
bHighQuality: Bool): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_PlaySoundShare: function(nPort: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_StopSoundShare: function(nPort: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};

{/////////////////ver 2.4 added/////////////////////////////////////// }
var
Hik_PlayM4_GetStreamOpenMode: function(nPort: LongInt): HIK_PLAYM4_API LONG cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_GetOverlayMode: function(nPort: LongInt): HIK_PLAYM4_API LONG cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_GetColorKey: function(nPort: LongInt): HIK_PLAYM4_API COLORREF cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_GetVolume: function(nPort: LongInt): HIK_PLAYM4_API WORD cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_GetPictureQuality: function(nPort: LongInt;
var bHighQuality: Bool): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_GetSourceBufferRemain: function(nPort: LongInt): HIK_PLAYM4_API DWORD cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_ResetSourceBuffer: function(nPort: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_SetSourceBufCallBack: function(nPort: LongInt;
nThreShold: LongInt;
nPort: VOID (CALLBACK* SOURCEBUFCALLBACK)(LONG;
nBufSize: LongInt;
dwUser: LongInt;
pResvered): Pointer;
dwUser: LongInt;
pReserved: Pointer): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_ResetSourceBufFlag: function(nPort: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_SetDisplayBuf: function(nPort: LongInt;
nNum: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_GetDisplayBuf: function(nPort: LongInt): HIK_PLAYM4_API DWORD cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_OneByOneBack: function(nPort: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_SetFileRefCallBack: function(nPort: LongInt;
nPort: VOID (__STDCALL*PFILEREFDONE)(DWORD;
nUser): LongInt;
nUser: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_SetCurrentFrameNum: function(nPort: LongInt;
nFrameNum: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_GetKeyFramePos: function(nPort: LongInt;
nValue: LongInt;
nType: LongInt;
var pFramePos: FRAME_POS): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_GetNextKeyFramePos: function(nPort: LongInt;
nValue: LongInt;
nType: LongInt;
var pFramePos: FRAME_POS): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
{$IFDEF (WINVER > 0x0400)}
{///Note: These funtion must be builded under win2000 or above with Microsoft Platform sdk. }
{/// You can download the sdk from "http://www.microsoft.com/msdownload/platformsdk/sdkupdate/"; }
var
Hik_PlayM4_InitDDrawDevice: function: HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_ReleaseDDrawDevice: function cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_GetDDrawDeviceTotalNums: function: HIK_PLAYM4_API DWORD cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_SetDDrawDevice: function(nPort: LongInt;
nDeviceNum: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_GetDDrawDeviceInfo: function(nDeviceNum: LongInt;
lpDriverDescription: PChar;
nDespLen: LongInt;
lpDriverName: PChar;
nNameLen: LongInt;
var hhMonitor: HMONITOR): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_GetCapsEx: function(nDDrawDeviceNum: LongInt): HIK_PLAYM4_API INT cdecl {$IFDEF WIN32} stdcall {$ENDIF};
{$ENDIF}
var
Hik_PlayM4_ThrowBFrameNum: function(nPort: LongInt;
nNum: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};

{/////////////////ver 2.5 added/////////////////////////////////////// }
var
Hik_PlayM4_SetDisplayType: function(nPort: LongInt;
nType: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_GetDisplayType: function(nPort: LongInt): HIK_PLAYM4_API LONG cdecl {$IFDEF WIN32} stdcall {$ENDIF};

{/////////////////ver 3.0 added/////////////////////////////////////// }
var
Hik_PlayM4_SetDecCBStream: function(nPort: LongInt;
nStream: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_SetDisplayRegion: function(nPort: LongInt;
nRegionNum: LongInt;
var pSrcRect: RECT;
hDestWnd: HWND;
bEnable: Bool): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_RefreshPlayEx: function(nPort: LongInt;
nRegionNum: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
{$IFDEF (WINVER > 0x0400)}
{///Note: The funtion must be builded under win2000 or above with Microsoft Platform sdk. }
{/// You can download the sdk from http://www.microsoft.com/msdownload/platformsdk/sdkupdate/; }
var
Hik_PlayM4_SetDDrawDeviceEx: function(nPort: LongInt;
nRegionNum: LongInt;
nDeviceNum: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
{$ENDIF}
{//////////////////v3.2 added///////////////////////////////////////// }

var
Hik_PlayM4_GetRefValue: function(nPort: LongInt;
var pBuffer: BYTE;
var pSize: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_SetRefValue: function(nPort: LongInt;
var pBuffer: BYTE;
nSize: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_OpenStreamEx: function(nPort: LongInt;
var pFileHeadBuf: BYTE;
nSize: LongInt;
nBufPoolSize: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_CloseStreamEx: function(nPort: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_InputVideoData: function(nPort: LongInt;
var pBuf: BYTE;
nSize: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_InputAudioData: function(nPort: LongInt;
var pBuf: BYTE;
nSize: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_RigisterDrawFun: function(nPort: LongInt;
nPort: VOID (CALLBACK* DRAWFUN)(LONG;
hDc: HDC;
nUser): LongInt;
nUser: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
{///////////////////v3.4///////////////////////////////////////////////////// }
var
Hik_PlayM4_SetTimerType: function(nPort: LongInt;
nTimerType: LongInt;
nReserved: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_GetTimerType: function(nPort: LongInt;
var pTimerType: LongInt;
var pReserved: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_ResetBuffer: function(nPort: LongInt;
nBufType: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_GetBufferValue: function(nPort: LongInt;
nBufType: LongInt): HIK_PLAYM4_API DWORD cdecl {$IFDEF WIN32} stdcall {$ENDIF};
{///////////////////V3.6///////////////////////////////////////////////////////// }
var
Hik_PlayM4_AdjustWaveAudio: function(nPort: LongInt;
nCoefficient: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_SetVerifyCallBack: function(nPort: LongInt;
nBeginTime: LongInt;
nEndTime: LongInt;
nPort: VOID (__STDCALL* FUNVERIFY)(LONG;
var pFilePos: FRAME_POS;
bIsVideo: LongInt;
nUser): LongInt;
nUser: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_SetAudioCallBack: function(nPort: LongInt;
nPort: VOID (__STDCALL* FUNAUDIO)(LONG;
pAudioBuf: PChar;
nSize: LongInt;
nStamp: LongInt;
nType: LongInt;
nUser): LongInt;
nUser: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_SetEncTypeChangeCallBack: function(nPort: LongInt;
nPort: VOID(CALLBACK*FUNENCCHANGE)(LONG;
nUser): LongInt;
nUser: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_SetColor: function(nPort: LongInt;
nRegionNum: LongInt;
nBrightness: Integer;
nContrast: Integer;
nSaturation: Integer;
nHue: Integer): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_GetColor: function(nPort: LongInt;
nRegionNum: LongInt;
var pBrightness: Integer;
var pContrast: Integer;
var pSaturation: Integer;
var pHue: Integer): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_SetEncChangeMsg: function(nPort: LongInt;
hWnd: HWND;
nMsg: Word): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_GetOriginalFrameCallBack: function(nPort: LongInt;
bIsChange: Bool;
bNormalSpeed: Bool;
nStartFrameNum: LongInt;
nStartStamp: LongInt;
nFileHeader: LongInt;
nPort: VOID(CALLBACK*FUNGETORIGNALFRAME)(LONG;
var frameType: FRAME_TYPE;
nUser): LongInt;
nUse: LongInt;
)
: HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};

var
DLLLoaded: Boolean { is DLL (dynamically) loaded already? }
{$IFDEF WIN32} = False; {$ENDIF}

implementation

var
SaveExit: pointer;
DLLHandle: THandle;
{$IFNDEF MSDOS}
ErrorMode: Integer;
{$ENDIF}

procedure NewExit; far;
begin
ExitProc := SaveExit;
FreeLibrary(DLLHandle)
end {NewExit};

procedure LoadDLL;
begin
if DLLLoaded then Exit;
{$IFNDEF MSDOS}
ErrorMode := SetErrorMode($8000{SEM_NoOpenFileErrorBox});
{$ENDIF}
DLLHandle := LoadLibrary('HIKPLAYMPEG4.DLL');
if DLLHandle >= 32 then
begin
DLLLoaded := True;
SaveExit := ExitProc;
ExitProc := @NewExit;
@Hik_PlayM4_InitDDraw := GetProcAddress(DLLHandle,'Hik_PlayM4_InitDDraw');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_InitDDraw <> nil);
{$ENDIF}
@Hik_PlayM4_RealeseDDraw := GetProcAddress(DLLHandle,'Hik_PlayM4_RealeseDDraw');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_RealeseDDraw <> nil);
{$ENDIF}
@Hik_PlayM4_OpenFile := GetProcAddress(DLLHandle,'Hik_PlayM4_OpenFile');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_OpenFile <> nil);
{$ENDIF}
@Hik_PlayM4_CloseFile := GetProcAddress(DLLHandle,'Hik_PlayM4_CloseFile');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_CloseFile <> nil);
{$ENDIF}
@Hik_PlayM4_Play := GetProcAddress(DLLHandle,'Hik_PlayM4_Play');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_Play <> nil);
{$ENDIF}
@Hik_PlayM4_Stop := GetProcAddress(DLLHandle,'Hik_PlayM4_Stop');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_Stop <> nil);
{$ENDIF}
@Hik_PlayM4_Pause := GetProcAddress(DLLHandle,'Hik_PlayM4_Pause');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_Pause <> nil);
{$ENDIF}
@Hik_PlayM4_Fast := GetProcAddress(DLLHandle,'Hik_PlayM4_Fast');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_Fast <> nil);
{$ENDIF}
@Hik_PlayM4_Slow := GetProcAddress(DLLHandle,'Hik_PlayM4_Slow');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_Slow <> nil);
{$ENDIF}
@Hik_PlayM4_OneByOne := GetProcAddress(DLLHandle,'Hik_PlayM4_OneByOne');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_OneByOne <> nil);
{$ENDIF}
@Hik_PlayM4_SetPlayPos := GetProcAddress(DLLHandle,'Hik_PlayM4_SetPlayPos');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_SetPlayPos <> nil);
{$ENDIF}
@Hik_PlayM4_GetPlayPos := GetProcAddress(DLLHandle,'Hik_PlayM4_GetPlayPos');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetPlayPos <> nil);
{$ENDIF}
@Hik_PlayM4_SetFileEndMsg := GetProcAddress(DLLHandle,'Hik_PlayM4_SetFileEndMsg');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_SetFileEndMsg <> nil);
{$ENDIF}
@Hik_PlayM4_SetVolume := GetProcAddress(DLLHandle,'Hik_PlayM4_SetVolume');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_SetVolume <> nil);
{$ENDIF}
@Hik_PlayM4_StopSound := GetProcAddress(DLLHandle,'Hik_PlayM4_StopSound');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_StopSound <> nil);
{$ENDIF}
@Hik_PlayM4_PlaySound := GetProcAddress(DLLHandle,'Hik_PlayM4_PlaySound');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_PlaySound <> nil);
{$ENDIF}
@Hik_PlayM4_OpenStream := GetProcAddress(DLLHandle,'Hik_PlayM4_OpenStream');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_OpenStream <> nil);
{$ENDIF}
@Hik_PlayM4_InputData := GetProcAddress(DLLHandle,'Hik_PlayM4_InputData');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_InputData <> nil);
{$ENDIF}
@Hik_PlayM4_CloseStream := GetProcAddress(DLLHandle,'Hik_PlayM4_CloseStream');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_CloseStream <> nil);
{$ENDIF}
@Hik_PlayM4_GetCaps := GetProcAddress(DLLHandle,'Hik_PlayM4_GetCaps');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetCaps <> nil);
{$ENDIF}
@Hik_PlayM4_GetFileTime := GetProcAddress(DLLHandle,'Hik_PlayM4_GetFileTime');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetFileTime <> nil);
{$ENDIF}
@Hik_PlayM4_GetPlayedTime := GetProcAddress(DLLHandle,'Hik_PlayM4_GetPlayedTime');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetPlayedTime <> nil);
{$ENDIF}
@Hik_PlayM4_GetPlayedFrames := GetProcAddress(DLLHandle,'Hik_PlayM4_GetPlayedFrames');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetPlayedFrames <> nil);
{$ENDIF}
@Hik_PlayM4_SetDecCallBack := GetProcAddress(DLLHandle,'Hik_PlayM4_SetDecCallBack');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_SetDecCallBack <> nil);
{$ENDIF}
@Hik_PlayM4_SetDisplayCallBack := GetProcAddress(DLLHandle,'Hik_PlayM4_SetDisplayCallBack');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_SetDisplayCallBack <> nil);
{$ENDIF}
@Hik_PLayM4_ConvertToBmpFile := GetProcAddress(DLLHandle,'Hik_PLayM4_ConvertToBmpFile');
{$IFDEF WIN32}
Assert(@Hik_PLayM4_ConvertToBmpFile <> nil);
{$ENDIF}
@Hik_PlayM4_GetFileTotalFrames := GetProcAddress(DLLHandle,'Hik_PlayM4_GetFileTotalFrames');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetFileTotalFrames <> nil);
{$ENDIF}
@Hik_PlayM4_GetCurrentFrameRate := GetProcAddress(DLLHandle,'Hik_PlayM4_GetCurrentFrameRate');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetCurrentFrameRate <> nil);
{$ENDIF}
@Hik_PlayM4_GetPlayedTimeEx := GetProcAddress(DLLHandle,'Hik_PlayM4_GetPlayedTimeEx');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetPlayedTimeEx <> nil);
{$ENDIF}
@Hik_PlayM4_SetPlayedTimeEx := GetProcAddress(DLLHandle,'Hik_PlayM4_SetPlayedTimeEx');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_SetPlayedTimeEx <> nil);
{$ENDIF}
@Hik_PlayM4_GetCurrentFrameNum := GetProcAddress(DLLHandle,'Hik_PlayM4_GetCurrentFrameNum');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetCurrentFrameNum <> nil);
{$ENDIF}
@Hik_PlayM4_SetStreamOpenMode := GetProcAddress(DLLHandle,'Hik_PlayM4_SetStreamOpenMode');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_SetStreamOpenMode <> nil);
{$ENDIF}
@Hik_PlayM4_GetFileHeadLength := GetProcAddress(DLLHandle,'Hik_PlayM4_GetFileHeadLength');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetFileHeadLength <> nil);
{$ENDIF}
@Hik_PlayM4_GetSdkVersion := GetProcAddress(DLLHandle,'Hik_PlayM4_GetSdkVersion');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetSdkVersion <> nil);
{$ENDIF}
@Hik_PlayM4_GetLastError := GetProcAddress(DLLHandle,'Hik_PlayM4_GetLastError');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetLastError <> nil);
{$ENDIF}
@Hik_PlayM4_RefreshPlay := GetProcAddress(DLLHandle,'Hik_PlayM4_RefreshPlay');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_RefreshPlay <> nil);
{$ENDIF}
@Hik_PlayM4_SetOverlayMode := GetProcAddress(DLLHandle,'Hik_PlayM4_SetOverlayMode');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_SetOverlayMode <> nil);
{$ENDIF}
@Hik_PlayM4_GetPictureSize := GetProcAddress(DLLHandle,'Hik_PlayM4_GetPictureSize');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetPictureSize <> nil);
{$ENDIF}
@Hik_PlayM4_SetPicQuality := GetProcAddress(DLLHandle,'Hik_PlayM4_SetPicQuality');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_SetPicQuality <> nil);
{$ENDIF}
@Hik_PlayM4_PlaySoundShare := GetProcAddress(DLLHandle,'Hik_PlayM4_PlaySoundShare');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_PlaySoundShare <> nil);
{$ENDIF}
@Hik_PlayM4_StopSoundShare := GetProcAddress(DLLHandle,'Hik_PlayM4_StopSoundShare');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_StopSoundShare <> nil);
{$ENDIF}
@Hik_PlayM4_GetStreamOpenMode := GetProcAddress(DLLHandle,'Hik_PlayM4_GetStreamOpenMode');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetStreamOpenMode <> nil);
{$ENDIF}
@Hik_PlayM4_GetOverlayMode := GetProcAddress(DLLHandle,'Hik_PlayM4_GetOverlayMode');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetOverlayMode <> nil);
{$ENDIF}
@Hik_PlayM4_GetColorKey := GetProcAddress(DLLHandle,'Hik_PlayM4_GetColorKey');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetColorKey <> nil);
{$ENDIF}
@Hik_PlayM4_GetVolume := GetProcAddress(DLLHandle,'Hik_PlayM4_GetVolume');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetVolume <> nil);
{$ENDIF}
@Hik_PlayM4_GetPictureQuality := GetProcAddress(DLLHandle,'Hik_PlayM4_GetPictureQuality');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetPictureQuality <> nil);
{$ENDIF}
@Hik_PlayM4_GetSourceBufferRemain := GetProcAddress(DLLHandle,'Hik_PlayM4_GetSourceBufferRemain');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetSourceBufferRemain <> nil);
{$ENDIF}
@Hik_PlayM4_ResetSourceBuffer := GetProcAddress(DLLHandle,'Hik_PlayM4_ResetSourceBuffer');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_ResetSourceBuffer <> nil);
{$ENDIF}
@Hik_PlayM4_SetSourceBufCallBack := GetProcAddress(DLLHandle,'Hik_PlayM4_SetSourceBufCallBack');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_SetSourceBufCallBack <> nil);
{$ENDIF}
@Hik_PlayM4_ResetSourceBufFlag := GetProcAddress(DLLHandle,'Hik_PlayM4_ResetSourceBufFlag');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_ResetSourceBufFlag <> nil);
{$ENDIF}
@Hik_PlayM4_SetDisplayBuf := GetProcAddress(DLLHandle,'Hik_PlayM4_SetDisplayBuf');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_SetDisplayBuf <> nil);
{$ENDIF}
@Hik_PlayM4_GetDisplayBuf := GetProcAddress(DLLHandle,'Hik_PlayM4_GetDisplayBuf');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetDisplayBuf <> nil);
{$ENDIF}
@Hik_PlayM4_OneByOneBack := GetProcAddress(DLLHandle,'Hik_PlayM4_OneByOneBack');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_OneByOneBack <> nil);
{$ENDIF}
@Hik_PlayM4_SetFileRefCallBack := GetProcAddress(DLLHandle,'Hik_PlayM4_SetFileRefCallBack');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_SetFileRefCallBack <> nil);
{$ENDIF}
@Hik_PlayM4_SetCurrentFrameNum := GetProcAddress(DLLHandle,'Hik_PlayM4_SetCurrentFrameNum');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_SetCurrentFrameNum <> nil);
{$ENDIF}
@Hik_PlayM4_GetKeyFramePos := GetProcAddress(DLLHandle,'Hik_PlayM4_GetKeyFramePos');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetKeyFramePos <> nil);
{$ENDIF}
@Hik_PlayM4_GetNextKeyFramePos := GetProcAddress(DLLHandle,'Hik_PlayM4_GetNextKeyFramePos');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetNextKeyFramePos <> nil);
{$ENDIF}
@Hik_PlayM4_InitDDrawDevice := GetProcAddress(DLLHandle,'Hik_PlayM4_InitDDrawDevice');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_InitDDrawDevice <> nil);
{$ENDIF}
@Hik_PlayM4_ReleaseDDrawDevice := GetProcAddress(DLLHandle,'Hik_PlayM4_ReleaseDDrawDevice');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_ReleaseDDrawDevice <> nil);
{$ENDIF}
@Hik_PlayM4_GetDDrawDeviceTotalNums := GetProcAddress(DLLHandle,'Hik_PlayM4_GetDDrawDeviceTotalNums');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetDDrawDeviceTotalNums <> nil);
{$ENDIF}
@Hik_PlayM4_SetDDrawDevice := GetProcAddress(DLLHandle,'Hik_PlayM4_SetDDrawDevice');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_SetDDrawDevice <> nil);
{$ENDIF}
@Hik_PlayM4_GetDDrawDeviceInfo := GetProcAddress(DLLHandle,'Hik_PlayM4_GetDDrawDeviceInfo');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetDDrawDeviceInfo <> nil);
{$ENDIF}
@Hik_PlayM4_GetCapsEx := GetProcAddress(DLLHandle,'Hik_PlayM4_GetCapsEx');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetCapsEx <> nil);
{$ENDIF}
@Hik_PlayM4_ThrowBFrameNum := GetProcAddress(DLLHandle,'Hik_PlayM4_ThrowBFrameNum');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_ThrowBFrameNum <> nil);
{$ENDIF}
@Hik_PlayM4_SetDisplayType := GetProcAddress(DLLHandle,'Hik_PlayM4_SetDisplayType');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_SetDisplayType <> nil);
{$ENDIF}
@Hik_PlayM4_GetDisplayType := GetProcAddress(DLLHandle,'Hik_PlayM4_GetDisplayType');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetDisplayType <> nil);
{$ENDIF}
@Hik_PlayM4_SetDecCBStream := GetProcAddress(DLLHandle,'Hik_PlayM4_SetDecCBStream');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_SetDecCBStream <> nil);
{$ENDIF}
@Hik_PlayM4_SetDisplayRegion := GetProcAddress(DLLHandle,'Hik_PlayM4_SetDisplayRegion');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_SetDisplayRegion <> nil);
{$ENDIF}
@Hik_PlayM4_RefreshPlayEx := GetProcAddress(DLLHandle,'Hik_PlayM4_RefreshPlayEx');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_RefreshPlayEx <> nil);
{$ENDIF}
@Hik_PlayM4_SetDDrawDeviceEx := GetProcAddress(DLLHandle,'Hik_PlayM4_SetDDrawDeviceEx');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_SetDDrawDeviceEx <> nil);
{$ENDIF}
@Hik_PlayM4_GetRefValue := GetProcAddress(DLLHandle,'Hik_PlayM4_GetRefValue');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetRefValue <> nil);
{$ENDIF}
@Hik_PlayM4_SetRefValue := GetProcAddress(DLLHandle,'Hik_PlayM4_SetRefValue');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_SetRefValue <> nil);
{$ENDIF}
@Hik_PlayM4_OpenStreamEx := GetProcAddress(DLLHandle,'Hik_PlayM4_OpenStreamEx');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_OpenStreamEx <> nil);
{$ENDIF}
@Hik_PlayM4_CloseStreamEx := GetProcAddress(DLLHandle,'Hik_PlayM4_CloseStreamEx');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_CloseStreamEx <> nil);
{$ENDIF}
@Hik_PlayM4_InputVideoData := GetProcAddress(DLLHandle,'Hik_PlayM4_InputVideoData');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_InputVideoData <> nil);
{$ENDIF}
@Hik_PlayM4_InputAudioData := GetProcAddress(DLLHandle,'Hik_PlayM4_InputAudioData');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_InputAudioData <> nil);
{$ENDIF}
@Hik_PlayM4_RigisterDrawFun := GetProcAddress(DLLHandle,'Hik_PlayM4_RigisterDrawFun');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_RigisterDrawFun <> nil);
{$ENDIF}
@Hik_PlayM4_SetTimerType := GetProcAddress(DLLHandle,'Hik_PlayM4_SetTimerType');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_SetTimerType <> nil);
{$ENDIF}
@Hik_PlayM4_GetTimerType := GetProcAddress(DLLHandle,'Hik_PlayM4_GetTimerType');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetTimerType <> nil);
{$ENDIF}
@Hik_PlayM4_ResetBuffer := GetProcAddress(DLLHandle,'Hik_PlayM4_ResetBuffer');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_ResetBuffer <> nil);
{$ENDIF}
@Hik_PlayM4_GetBufferValue := GetProcAddress(DLLHandle,'Hik_PlayM4_GetBufferValue');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetBufferValue <> nil);
{$ENDIF}
@Hik_PlayM4_AdjustWaveAudio := GetProcAddress(DLLHandle,'Hik_PlayM4_AdjustWaveAudio');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_AdjustWaveAudio <> nil);
{$ENDIF}
@Hik_PlayM4_SetVerifyCallBack := GetProcAddress(DLLHandle,'Hik_PlayM4_SetVerifyCallBack');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_SetVerifyCallBack <> nil);
{$ENDIF}
@Hik_PlayM4_SetAudioCallBack := GetProcAddress(DLLHandle,'Hik_PlayM4_SetAudioCallBack');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_SetAudioCallBack <> nil);
{$ENDIF}
@Hik_PlayM4_SetEncTypeChangeCallBack := GetProcAddress(DLLHandle,'Hik_PlayM4_SetEncTypeChangeCallBack');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_SetEncTypeChangeCallBack <> nil);
{$ENDIF}
@Hik_PlayM4_SetColor := GetProcAddress(DLLHandle,'Hik_PlayM4_SetColor');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_SetColor <> nil);
{$ENDIF}
@Hik_PlayM4_GetColor := GetProcAddress(DLLHandle,'Hik_PlayM4_GetColor');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetColor <> nil);
{$ENDIF}
@Hik_PlayM4_SetEncChangeMsg := GetProcAddress(DLLHandle,'Hik_PlayM4_SetEncChangeMsg');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_SetEncChangeMsg <> nil);
{$ENDIF}
@Hik_PlayM4_GetOriginalFrameCallBack := GetProcAddress(DLLHandle,'Hik_PlayM4_GetOriginalFrameCallBack');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetOriginalFrameCallBack <> nil);
{$ENDIF}
end
else
begin
DLLLoaded := False;
{ Error: HIKPLAYMPEG4.DLL could not be loaded !! }
end;
{$IFNDEF MSDOS}
SetErrorMode(ErrorMode)
{$ENDIF}
end {LoadDLL};

begin
LoadDLL;
end.
 
R

rzqcjwrz

Unregistered / Unconfirmed
GUEST, unregistred user!
请问高手,我用软件转换的dll文件头文件,错在哪里?
unit HIKPLAYMPEG4;
{**************************************************************************}
{ }
{ This C DLL header file first (automatic) conversion generated by: }
{ HeadConv 4.0 (c) 2000 by Bob Swart (aka Dr.Bob - www.drbob42.com) }
{ Final Delphi-Jedi (Darth) command-line units edition }
{ }
{ Generated Date: 2005-5-1 }
{ Generated Time: 11:48:19 }
{ }
{**************************************************************************}

interface
uses
{$IFDEF WIN32}
Windows;
{$ELSE}
Wintypes, WinProcs;
{$ENDIF}


{=> d:/杭州海康威视数字技术有限公司/sdk/player sdk/HIKPLAYMPEG4.H <=}

{//////////////////////////////////////////////////////////////////// }
{///File: HikPlayMpeg4.h }
{///Date: 2003-12-06 }
{///Description: Interface for HikPlayM4.dll }
{///Copyright: Copyright(C)HangZhou Hikvision Digital Technology Co,.Ltd 2002-2008. All rights reserved. }
{//////////////////////////////////////////////////////////////////// }
{$IFNDEF _HIK_PLAY_M4}
{$DEFINE _HIK_PLAY_M4}

{$IFDEF _WINDLL}
const
HIK_PLAYM4_API = extern 'C'__declspec(dllexport);
{$ELSE}
const
HIK_PLAYM4_API = extern 'C'; {//__declspec(dllimport)}
{$ENDIF}

{///Max channel numbers }
const
HIK_PLAYM4_MAX_SUPPORTS = 100;
{///Wave coef range; }
const
MIN_WAVE_COEF = -100;
const
MAX_WAVE_COEF = 100;
{///Timer type }
const
TIMER_1 = 1; {//Only 16 timers for every process.Default TIMER;}
const
TIMER_2 = 2; {//Not limit;But the precision less than TIMER_1;}
{///BUFFER TYPE }
const
BUF_VIDEO_SRC = 1;
const
BUF_AUDIO_SRC = 2;
const
BUF_VIDEO_RENDER = 3;
const
BUF_AUDIO_RENDER = 4;
{///Error code }
const
HIK_PLAYM4_NOERROR = 0; {//no error}
const
HIK_PLAYM4_PARA_OVER = 1; {//input parameter is invalid;}
const
HIK_PLAYM4_ORDER_ERROR = 2; {//The order of the function to be called is error.}
const
HIK_PLAYM4_TIMER_ERROR = 3; {//Create multimedia clock failed;}
const
HIK_PLAYM4_DEC_VIDEO_ERROR = 4; {//Decode video data failed.}
const
HIK_PLAYM4_DEC_AUDIO_ERROR = 5; {//Decode audio data failed.}
const
HIK_PLAYM4_ALLOC_MEMORY_ERROR = 6; {//Allocate memory failed.}
const
HIK_PLAYM4_OPEN_FILE_ERROR = 7; {//Open the file failed.}
const
HIK_PLAYM4_CREATE_OBJ_ERROR = 8; {//Create thread or event failed}
const
HIK_PLAYM4_CREATE_DDRAW_ERROR = 9; {//Create DirectDraw object failed.}
const
HIK_PLAYM4_CREATE_OFFSCREEN_ERROR = 10; {//failed when creating off-screen surface.}
const
HIK_PLAYM4_BUF_OVER = 11; {//buffer is overflow}
const
HIK_PLAYM4_CREATE_SOUND_ERROR = 12; {//failed when creating audio device.}
const
HIK_PLAYM4_SET_VOLUME_ERROR = 13; {//Set volume failed}
const
HIK_PLAYM4_SUPPORT_FILE_ONLY = 14; {//The function only support play file.}
const
HIK_PLAYM4_SUPPORT_STREAM_ONLY = 15; {//The function only support play stream.}
const
HIK_PLAYM4_SYS_NOT_SUPPORT = 16; {//System not support.}
const
HIK_PLAYM4_FILEHEADER_UNKNOWN = 17; {//No file header.}
const
HIK_PLAYM4_VERSION_INCORRECT = 18; {//The version of decoder and encoder is not adapted.}
const
HIK_PALYM4_INIT_DECODER_ERROR = 19; {//Initialize decoder failed.}
const
HIK_PLAYM4_CHECK_FILE_ERROR = 20; {//The file data is unknown.}
const
HIK_PLAYM4_INIT_TIMER_ERROR = 21; {//Initialize multimedia clock failed.}
const
HIK_PLAYM4_BLT_ERROR = 22; {//Blt failed.}
const
HIK_PLAYM4_UPDATE_ERROR = 23; {//Update failed.}

{///Max display regions. }
const
MAX_DISPLAY_WND = 4;

{///Display type }
const
DISPLAY_NORMAL = 1;
const
DISPLAY_QUARTER = 2;

{///Display buffers }
const
MAX_DIS_FRAMES = 50;
const
MIN_DIS_FRAMES = 6;

{///Locate by }
const
BY_FRAMENUM = 1;
const
BY_FRAMETIME = 2;

{///Source buffer }
const
SOURCE_BUF_MAX = 1024*100000;
const
SOURCE_BUF_MIN = 1024*50;

{///Stream type }
const
STREAME_REALTIME = 0;
const
STREAME_FILE = 1;

{///frame type }
const
T_AUDIO16 = 101;
const
T_AUDIO8 = 100;

const
T_UYVY = 1;
const
T_YV12 = 3;
const
T_RGB32 = 7;
{///capability }
const
SUPPORT_DDRAW = 1;
const
SUPPORT_BLT = 2;
const
SUPPORT_BLTFOURCC = 4;
const
SUPPORT_BLTSHRINKX = 8;
const
SUPPORT_BLTSHRINKY = 16;
const
SUPPORT_BLTSTRETCHX = 32;
const
SUPPORT_BLTSTRETCHY = 64;
const
SUPPORT_SSE = 128;
const
SUPPORT_MMX = 256;

{///Frame position }
{{{ typedef struct{ }

{///Frame Info }
{{{ typedef struct{ }

{///Frame }
{{{ typedef struct{ }
{/////////////////////////////////////////////////////////////////////////////// }
{///API }
{/////////////////////////////////////////////////////////////////////////////// }

{/////////////////ver 1.0/////////////////////////////////////// }
{///Initialize DirecDraw.Now invalid. }
var
Hik_PlayM4_InitDDraw: function(hWnd: HWND): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
{///Release directDraw; Now invalid. }
var
Hik_PlayM4_RealeseDDraw: function: HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};

var
Hik_PlayM4_OpenFile: function(nPort: LongInt;
sFileName: PChar): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_CloseFile: function(nPort: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_Play: function(nPort: LongInt;
hWnd: HWND): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_Stop: function(nPort: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_Pause: function(nPort: LongInt;
nPause: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_Fast: function(nPort: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_Slow: function(nPort: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_OneByOne: function(nPort: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_SetPlayPos: function(nPort: LongInt;
fRelativePos: Single): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_GetPlayPos: function(nPort: LongInt): HIK_PLAYM4_API FLOAT cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_SetFileEndMsg: function(nPort: LongInt;
hWnd: HWND;
nMsg: Word): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_SetVolume: function(nPort: LongInt;
nVolume: Word): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_StopSound: function: HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_PlaySound: function(nPort: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_OpenStream: function(nPort: LongInt;
var pFileHeadBuf: BYTE;
nSize: LongInt;
nBufPoolSize: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_InputData: function(nPort: LongInt;
var pBuf: BYTE;
nSize: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_CloseStream: function(nPort: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_GetCaps: function: HIK_PLAYM4_API INT cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_GetFileTime: function(nPort: LongInt): HIK_PLAYM4_API DWORD cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_GetPlayedTime: function(nPort: LongInt): HIK_PLAYM4_API DWORD cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_GetPlayedFrames: function(nPort: LongInt): HIK_PLAYM4_API DWORD cdecl {$IFDEF WIN32} stdcall {$ENDIF};

{/////////////////ver 2.0 added/////////////////////////////////////// }
var
Hik_PlayM4_SetDecCallBack: function(nPort: LongInt;
nPort: VOID (CALLBACK* DECCBFUN)(LONG;
pBuf: PChar;
nSize: LongInt;
var pFrameInfo: FRAME_INFO;
nReserved1: LongInt;
nReserved2): LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_SetDisplayCallBack: function(nPort: LongInt;
nPort: VOID (CALLBACK* DISPLAYCBFUN)(LONG;
pBuf: PChar;
nSize: LongInt;
nWidth: LongInt;
nHeight: LongInt;
nStamp: LongInt;
nType: LongInt;
nReserved): LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PLayM4_ConvertToBmpFile: function(pBuf: PChar;
nSize: LongInt;
nWidth: LongInt;
nHeight: LongInt;
nType: LongInt;
sFileName: PChar): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_GetFileTotalFrames: function(nPort: LongInt): HIK_PLAYM4_API DWORD cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_GetCurrentFrameRate: function(nPort: LongInt): HIK_PLAYM4_API DWORD cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_GetPlayedTimeEx: function(nPort: LongInt): HIK_PLAYM4_API DWORD cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_SetPlayedTimeEx: function(nPort: LongInt;
nTime: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_GetCurrentFrameNum: function(nPort: LongInt): HIK_PLAYM4_API DWORD cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_SetStreamOpenMode: function(nPort: LongInt;
nMode: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_GetFileHeadLength: function: HIK_PLAYM4_API DWORD cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_GetSdkVersion: function: HIK_PLAYM4_API DWORD cdecl {$IFDEF WIN32} stdcall {$ENDIF};

{/////////////////ver 2.2 added/////////////////////////////////////// }
var
Hik_PlayM4_GetLastError: function(nPort: LongInt): HIK_PLAYM4_API DWORD cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_RefreshPlay: function(nPort: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_SetOverlayMode: function(nPort: LongInt;
bOverlay: Bool;
colorKey: TColorRef): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_GetPictureSize: function(nPort: LongInt;
var pWidth: LongInt;
var pHeight: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_SetPicQuality: function(nPort: LongInt;
bHighQuality: Bool): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_PlaySoundShare: function(nPort: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_StopSoundShare: function(nPort: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};

{/////////////////ver 2.4 added/////////////////////////////////////// }
var
Hik_PlayM4_GetStreamOpenMode: function(nPort: LongInt): HIK_PLAYM4_API LONG cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_GetOverlayMode: function(nPort: LongInt): HIK_PLAYM4_API LONG cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_GetColorKey: function(nPort: LongInt): HIK_PLAYM4_API COLORREF cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_GetVolume: function(nPort: LongInt): HIK_PLAYM4_API WORD cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_GetPictureQuality: function(nPort: LongInt;
var bHighQuality: Bool): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_GetSourceBufferRemain: function(nPort: LongInt): HIK_PLAYM4_API DWORD cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_ResetSourceBuffer: function(nPort: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_SetSourceBufCallBack: function(nPort: LongInt;
nThreShold: LongInt;
nPort: VOID (CALLBACK* SOURCEBUFCALLBACK)(LONG;
nBufSize: LongInt;
dwUser: LongInt;
pResvered): Pointer;
dwUser: LongInt;
pReserved: Pointer): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_ResetSourceBufFlag: function(nPort: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_SetDisplayBuf: function(nPort: LongInt;
nNum: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_GetDisplayBuf: function(nPort: LongInt): HIK_PLAYM4_API DWORD cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_OneByOneBack: function(nPort: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_SetFileRefCallBack: function(nPort: LongInt;
nPort: VOID (__STDCALL*PFILEREFDONE)(DWORD;
nUser): LongInt;
nUser: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_SetCurrentFrameNum: function(nPort: LongInt;
nFrameNum: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_GetKeyFramePos: function(nPort: LongInt;
nValue: LongInt;
nType: LongInt;
var pFramePos: FRAME_POS): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_GetNextKeyFramePos: function(nPort: LongInt;
nValue: LongInt;
nType: LongInt;
var pFramePos: FRAME_POS): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
{$IFDEF (WINVER > 0x0400)}
{///Note: These funtion must be builded under win2000 or above with Microsoft Platform sdk. }
{/// You can download the sdk from "http://www.microsoft.com/msdownload/platformsdk/sdkupdate/"; }
var
Hik_PlayM4_InitDDrawDevice: function: HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_ReleaseDDrawDevice: function cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_GetDDrawDeviceTotalNums: function: HIK_PLAYM4_API DWORD cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_SetDDrawDevice: function(nPort: LongInt;
nDeviceNum: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_GetDDrawDeviceInfo: function(nDeviceNum: LongInt;
lpDriverDescription: PChar;
nDespLen: LongInt;
lpDriverName: PChar;
nNameLen: LongInt;
var hhMonitor: HMONITOR): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_GetCapsEx: function(nDDrawDeviceNum: LongInt): HIK_PLAYM4_API INT cdecl {$IFDEF WIN32} stdcall {$ENDIF};
{$ENDIF}
var
Hik_PlayM4_ThrowBFrameNum: function(nPort: LongInt;
nNum: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};

{/////////////////ver 2.5 added/////////////////////////////////////// }
var
Hik_PlayM4_SetDisplayType: function(nPort: LongInt;
nType: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_GetDisplayType: function(nPort: LongInt): HIK_PLAYM4_API LONG cdecl {$IFDEF WIN32} stdcall {$ENDIF};

{/////////////////ver 3.0 added/////////////////////////////////////// }
var
Hik_PlayM4_SetDecCBStream: function(nPort: LongInt;
nStream: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_SetDisplayRegion: function(nPort: LongInt;
nRegionNum: LongInt;
var pSrcRect: RECT;
hDestWnd: HWND;
bEnable: Bool): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_RefreshPlayEx: function(nPort: LongInt;
nRegionNum: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
{$IFDEF (WINVER > 0x0400)}
{///Note: The funtion must be builded under win2000 or above with Microsoft Platform sdk. }
{/// You can download the sdk from http://www.microsoft.com/msdownload/platformsdk/sdkupdate/; }
var
Hik_PlayM4_SetDDrawDeviceEx: function(nPort: LongInt;
nRegionNum: LongInt;
nDeviceNum: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
{$ENDIF}
{//////////////////v3.2 added///////////////////////////////////////// }

var
Hik_PlayM4_GetRefValue: function(nPort: LongInt;
var pBuffer: BYTE;
var pSize: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_SetRefValue: function(nPort: LongInt;
var pBuffer: BYTE;
nSize: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_OpenStreamEx: function(nPort: LongInt;
var pFileHeadBuf: BYTE;
nSize: LongInt;
nBufPoolSize: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_CloseStreamEx: function(nPort: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_InputVideoData: function(nPort: LongInt;
var pBuf: BYTE;
nSize: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_InputAudioData: function(nPort: LongInt;
var pBuf: BYTE;
nSize: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_RigisterDrawFun: function(nPort: LongInt;
nPort: VOID (CALLBACK* DRAWFUN)(LONG;
hDc: HDC;
nUser): LongInt;
nUser: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
{///////////////////v3.4///////////////////////////////////////////////////// }
var
Hik_PlayM4_SetTimerType: function(nPort: LongInt;
nTimerType: LongInt;
nReserved: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_GetTimerType: function(nPort: LongInt;
var pTimerType: LongInt;
var pReserved: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_ResetBuffer: function(nPort: LongInt;
nBufType: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_GetBufferValue: function(nPort: LongInt;
nBufType: LongInt): HIK_PLAYM4_API DWORD cdecl {$IFDEF WIN32} stdcall {$ENDIF};
{///////////////////V3.6///////////////////////////////////////////////////////// }
var
Hik_PlayM4_AdjustWaveAudio: function(nPort: LongInt;
nCoefficient: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_SetVerifyCallBack: function(nPort: LongInt;
nBeginTime: LongInt;
nEndTime: LongInt;
nPort: VOID (__STDCALL* FUNVERIFY)(LONG;
var pFilePos: FRAME_POS;
bIsVideo: LongInt;
nUser): LongInt;
nUser: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_SetAudioCallBack: function(nPort: LongInt;
nPort: VOID (__STDCALL* FUNAUDIO)(LONG;
pAudioBuf: PChar;
nSize: LongInt;
nStamp: LongInt;
nType: LongInt;
nUser): LongInt;
nUser: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_SetEncTypeChangeCallBack: function(nPort: LongInt;
nPort: VOID(CALLBACK*FUNENCCHANGE)(LONG;
nUser): LongInt;
nUser: LongInt): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_SetColor: function(nPort: LongInt;
nRegionNum: LongInt;
nBrightness: Integer;
nContrast: Integer;
nSaturation: Integer;
nHue: Integer): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_GetColor: function(nPort: LongInt;
nRegionNum: LongInt;
var pBrightness: Integer;
var pContrast: Integer;
var pSaturation: Integer;
var pHue: Integer): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_SetEncChangeMsg: function(nPort: LongInt;
hWnd: HWND;
nMsg: Word): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
var
Hik_PlayM4_GetOriginalFrameCallBack: function(nPort: LongInt;
bIsChange: Bool;
bNormalSpeed: Bool;
nStartFrameNum: LongInt;
nStartStamp: LongInt;
nFileHeader: LongInt;
nPort: VOID(CALLBACK*FUNGETORIGNALFRAME)(LONG;
var frameType: FRAME_TYPE;
nUser): LongInt;
nUse: LongInt;
)
: HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};

var
DLLLoaded: Boolean { is DLL (dynamically) loaded already? }
{$IFDEF WIN32} = False; {$ENDIF}

implementation

var
SaveExit: pointer;
DLLHandle: THandle;
{$IFNDEF MSDOS}
ErrorMode: Integer;
{$ENDIF}

procedure NewExit; far;
begin
ExitProc := SaveExit;
FreeLibrary(DLLHandle)
end {NewExit};

procedure LoadDLL;
begin
if DLLLoaded then Exit;
{$IFNDEF MSDOS}
ErrorMode := SetErrorMode($8000{SEM_NoOpenFileErrorBox});
{$ENDIF}
DLLHandle := LoadLibrary('HIKPLAYMPEG4.DLL');
if DLLHandle >= 32 then
begin
DLLLoaded := True;
SaveExit := ExitProc;
ExitProc := @NewExit;
@Hik_PlayM4_InitDDraw := GetProcAddress(DLLHandle,'Hik_PlayM4_InitDDraw');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_InitDDraw <> nil);
{$ENDIF}
@Hik_PlayM4_RealeseDDraw := GetProcAddress(DLLHandle,'Hik_PlayM4_RealeseDDraw');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_RealeseDDraw <> nil);
{$ENDIF}
@Hik_PlayM4_OpenFile := GetProcAddress(DLLHandle,'Hik_PlayM4_OpenFile');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_OpenFile <> nil);
{$ENDIF}
@Hik_PlayM4_CloseFile := GetProcAddress(DLLHandle,'Hik_PlayM4_CloseFile');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_CloseFile <> nil);
{$ENDIF}
@Hik_PlayM4_Play := GetProcAddress(DLLHandle,'Hik_PlayM4_Play');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_Play <> nil);
{$ENDIF}
@Hik_PlayM4_Stop := GetProcAddress(DLLHandle,'Hik_PlayM4_Stop');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_Stop <> nil);
{$ENDIF}
@Hik_PlayM4_Pause := GetProcAddress(DLLHandle,'Hik_PlayM4_Pause');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_Pause <> nil);
{$ENDIF}
@Hik_PlayM4_Fast := GetProcAddress(DLLHandle,'Hik_PlayM4_Fast');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_Fast <> nil);
{$ENDIF}
@Hik_PlayM4_Slow := GetProcAddress(DLLHandle,'Hik_PlayM4_Slow');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_Slow <> nil);
{$ENDIF}
@Hik_PlayM4_OneByOne := GetProcAddress(DLLHandle,'Hik_PlayM4_OneByOne');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_OneByOne <> nil);
{$ENDIF}
@Hik_PlayM4_SetPlayPos := GetProcAddress(DLLHandle,'Hik_PlayM4_SetPlayPos');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_SetPlayPos <> nil);
{$ENDIF}
@Hik_PlayM4_GetPlayPos := GetProcAddress(DLLHandle,'Hik_PlayM4_GetPlayPos');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetPlayPos <> nil);
{$ENDIF}
@Hik_PlayM4_SetFileEndMsg := GetProcAddress(DLLHandle,'Hik_PlayM4_SetFileEndMsg');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_SetFileEndMsg <> nil);
{$ENDIF}
@Hik_PlayM4_SetVolume := GetProcAddress(DLLHandle,'Hik_PlayM4_SetVolume');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_SetVolume <> nil);
{$ENDIF}
@Hik_PlayM4_StopSound := GetProcAddress(DLLHandle,'Hik_PlayM4_StopSound');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_StopSound <> nil);
{$ENDIF}
@Hik_PlayM4_PlaySound := GetProcAddress(DLLHandle,'Hik_PlayM4_PlaySound');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_PlaySound <> nil);
{$ENDIF}
@Hik_PlayM4_OpenStream := GetProcAddress(DLLHandle,'Hik_PlayM4_OpenStream');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_OpenStream <> nil);
{$ENDIF}
@Hik_PlayM4_InputData := GetProcAddress(DLLHandle,'Hik_PlayM4_InputData');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_InputData <> nil);
{$ENDIF}
@Hik_PlayM4_CloseStream := GetProcAddress(DLLHandle,'Hik_PlayM4_CloseStream');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_CloseStream <> nil);
{$ENDIF}
@Hik_PlayM4_GetCaps := GetProcAddress(DLLHandle,'Hik_PlayM4_GetCaps');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetCaps <> nil);
{$ENDIF}
@Hik_PlayM4_GetFileTime := GetProcAddress(DLLHandle,'Hik_PlayM4_GetFileTime');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetFileTime <> nil);
{$ENDIF}
@Hik_PlayM4_GetPlayedTime := GetProcAddress(DLLHandle,'Hik_PlayM4_GetPlayedTime');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetPlayedTime <> nil);
{$ENDIF}
@Hik_PlayM4_GetPlayedFrames := GetProcAddress(DLLHandle,'Hik_PlayM4_GetPlayedFrames');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetPlayedFrames <> nil);
{$ENDIF}
@Hik_PlayM4_SetDecCallBack := GetProcAddress(DLLHandle,'Hik_PlayM4_SetDecCallBack');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_SetDecCallBack <> nil);
{$ENDIF}
@Hik_PlayM4_SetDisplayCallBack := GetProcAddress(DLLHandle,'Hik_PlayM4_SetDisplayCallBack');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_SetDisplayCallBack <> nil);
{$ENDIF}
@Hik_PLayM4_ConvertToBmpFile := GetProcAddress(DLLHandle,'Hik_PLayM4_ConvertToBmpFile');
{$IFDEF WIN32}
Assert(@Hik_PLayM4_ConvertToBmpFile <> nil);
{$ENDIF}
@Hik_PlayM4_GetFileTotalFrames := GetProcAddress(DLLHandle,'Hik_PlayM4_GetFileTotalFrames');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetFileTotalFrames <> nil);
{$ENDIF}
@Hik_PlayM4_GetCurrentFrameRate := GetProcAddress(DLLHandle,'Hik_PlayM4_GetCurrentFrameRate');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetCurrentFrameRate <> nil);
{$ENDIF}
@Hik_PlayM4_GetPlayedTimeEx := GetProcAddress(DLLHandle,'Hik_PlayM4_GetPlayedTimeEx');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetPlayedTimeEx <> nil);
{$ENDIF}
@Hik_PlayM4_SetPlayedTimeEx := GetProcAddress(DLLHandle,'Hik_PlayM4_SetPlayedTimeEx');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_SetPlayedTimeEx <> nil);
{$ENDIF}
@Hik_PlayM4_GetCurrentFrameNum := GetProcAddress(DLLHandle,'Hik_PlayM4_GetCurrentFrameNum');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetCurrentFrameNum <> nil);
{$ENDIF}
@Hik_PlayM4_SetStreamOpenMode := GetProcAddress(DLLHandle,'Hik_PlayM4_SetStreamOpenMode');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_SetStreamOpenMode <> nil);
{$ENDIF}
@Hik_PlayM4_GetFileHeadLength := GetProcAddress(DLLHandle,'Hik_PlayM4_GetFileHeadLength');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetFileHeadLength <> nil);
{$ENDIF}
@Hik_PlayM4_GetSdkVersion := GetProcAddress(DLLHandle,'Hik_PlayM4_GetSdkVersion');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetSdkVersion <> nil);
{$ENDIF}
@Hik_PlayM4_GetLastError := GetProcAddress(DLLHandle,'Hik_PlayM4_GetLastError');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetLastError <> nil);
{$ENDIF}
@Hik_PlayM4_RefreshPlay := GetProcAddress(DLLHandle,'Hik_PlayM4_RefreshPlay');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_RefreshPlay <> nil);
{$ENDIF}
@Hik_PlayM4_SetOverlayMode := GetProcAddress(DLLHandle,'Hik_PlayM4_SetOverlayMode');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_SetOverlayMode <> nil);
{$ENDIF}
@Hik_PlayM4_GetPictureSize := GetProcAddress(DLLHandle,'Hik_PlayM4_GetPictureSize');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetPictureSize <> nil);
{$ENDIF}
@Hik_PlayM4_SetPicQuality := GetProcAddress(DLLHandle,'Hik_PlayM4_SetPicQuality');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_SetPicQuality <> nil);
{$ENDIF}
@Hik_PlayM4_PlaySoundShare := GetProcAddress(DLLHandle,'Hik_PlayM4_PlaySoundShare');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_PlaySoundShare <> nil);
{$ENDIF}
@Hik_PlayM4_StopSoundShare := GetProcAddress(DLLHandle,'Hik_PlayM4_StopSoundShare');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_StopSoundShare <> nil);
{$ENDIF}
@Hik_PlayM4_GetStreamOpenMode := GetProcAddress(DLLHandle,'Hik_PlayM4_GetStreamOpenMode');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetStreamOpenMode <> nil);
{$ENDIF}
@Hik_PlayM4_GetOverlayMode := GetProcAddress(DLLHandle,'Hik_PlayM4_GetOverlayMode');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetOverlayMode <> nil);
{$ENDIF}
@Hik_PlayM4_GetColorKey := GetProcAddress(DLLHandle,'Hik_PlayM4_GetColorKey');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetColorKey <> nil);
{$ENDIF}
@Hik_PlayM4_GetVolume := GetProcAddress(DLLHandle,'Hik_PlayM4_GetVolume');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetVolume <> nil);
{$ENDIF}
@Hik_PlayM4_GetPictureQuality := GetProcAddress(DLLHandle,'Hik_PlayM4_GetPictureQuality');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetPictureQuality <> nil);
{$ENDIF}
@Hik_PlayM4_GetSourceBufferRemain := GetProcAddress(DLLHandle,'Hik_PlayM4_GetSourceBufferRemain');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetSourceBufferRemain <> nil);
{$ENDIF}
@Hik_PlayM4_ResetSourceBuffer := GetProcAddress(DLLHandle,'Hik_PlayM4_ResetSourceBuffer');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_ResetSourceBuffer <> nil);
{$ENDIF}
@Hik_PlayM4_SetSourceBufCallBack := GetProcAddress(DLLHandle,'Hik_PlayM4_SetSourceBufCallBack');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_SetSourceBufCallBack <> nil);
{$ENDIF}
@Hik_PlayM4_ResetSourceBufFlag := GetProcAddress(DLLHandle,'Hik_PlayM4_ResetSourceBufFlag');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_ResetSourceBufFlag <> nil);
{$ENDIF}
@Hik_PlayM4_SetDisplayBuf := GetProcAddress(DLLHandle,'Hik_PlayM4_SetDisplayBuf');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_SetDisplayBuf <> nil);
{$ENDIF}
@Hik_PlayM4_GetDisplayBuf := GetProcAddress(DLLHandle,'Hik_PlayM4_GetDisplayBuf');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetDisplayBuf <> nil);
{$ENDIF}
@Hik_PlayM4_OneByOneBack := GetProcAddress(DLLHandle,'Hik_PlayM4_OneByOneBack');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_OneByOneBack <> nil);
{$ENDIF}
@Hik_PlayM4_SetFileRefCallBack := GetProcAddress(DLLHandle,'Hik_PlayM4_SetFileRefCallBack');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_SetFileRefCallBack <> nil);
{$ENDIF}
@Hik_PlayM4_SetCurrentFrameNum := GetProcAddress(DLLHandle,'Hik_PlayM4_SetCurrentFrameNum');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_SetCurrentFrameNum <> nil);
{$ENDIF}
@Hik_PlayM4_GetKeyFramePos := GetProcAddress(DLLHandle,'Hik_PlayM4_GetKeyFramePos');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetKeyFramePos <> nil);
{$ENDIF}
@Hik_PlayM4_GetNextKeyFramePos := GetProcAddress(DLLHandle,'Hik_PlayM4_GetNextKeyFramePos');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetNextKeyFramePos <> nil);
{$ENDIF}
@Hik_PlayM4_InitDDrawDevice := GetProcAddress(DLLHandle,'Hik_PlayM4_InitDDrawDevice');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_InitDDrawDevice <> nil);
{$ENDIF}
@Hik_PlayM4_ReleaseDDrawDevice := GetProcAddress(DLLHandle,'Hik_PlayM4_ReleaseDDrawDevice');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_ReleaseDDrawDevice <> nil);
{$ENDIF}
@Hik_PlayM4_GetDDrawDeviceTotalNums := GetProcAddress(DLLHandle,'Hik_PlayM4_GetDDrawDeviceTotalNums');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetDDrawDeviceTotalNums <> nil);
{$ENDIF}
@Hik_PlayM4_SetDDrawDevice := GetProcAddress(DLLHandle,'Hik_PlayM4_SetDDrawDevice');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_SetDDrawDevice <> nil);
{$ENDIF}
@Hik_PlayM4_GetDDrawDeviceInfo := GetProcAddress(DLLHandle,'Hik_PlayM4_GetDDrawDeviceInfo');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetDDrawDeviceInfo <> nil);
{$ENDIF}
@Hik_PlayM4_GetCapsEx := GetProcAddress(DLLHandle,'Hik_PlayM4_GetCapsEx');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetCapsEx <> nil);
{$ENDIF}
@Hik_PlayM4_ThrowBFrameNum := GetProcAddress(DLLHandle,'Hik_PlayM4_ThrowBFrameNum');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_ThrowBFrameNum <> nil);
{$ENDIF}
@Hik_PlayM4_SetDisplayType := GetProcAddress(DLLHandle,'Hik_PlayM4_SetDisplayType');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_SetDisplayType <> nil);
{$ENDIF}
@Hik_PlayM4_GetDisplayType := GetProcAddress(DLLHandle,'Hik_PlayM4_GetDisplayType');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetDisplayType <> nil);
{$ENDIF}
@Hik_PlayM4_SetDecCBStream := GetProcAddress(DLLHandle,'Hik_PlayM4_SetDecCBStream');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_SetDecCBStream <> nil);
{$ENDIF}
@Hik_PlayM4_SetDisplayRegion := GetProcAddress(DLLHandle,'Hik_PlayM4_SetDisplayRegion');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_SetDisplayRegion <> nil);
{$ENDIF}
@Hik_PlayM4_RefreshPlayEx := GetProcAddress(DLLHandle,'Hik_PlayM4_RefreshPlayEx');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_RefreshPlayEx <> nil);
{$ENDIF}
@Hik_PlayM4_SetDDrawDeviceEx := GetProcAddress(DLLHandle,'Hik_PlayM4_SetDDrawDeviceEx');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_SetDDrawDeviceEx <> nil);
{$ENDIF}
@Hik_PlayM4_GetRefValue := GetProcAddress(DLLHandle,'Hik_PlayM4_GetRefValue');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetRefValue <> nil);
{$ENDIF}
@Hik_PlayM4_SetRefValue := GetProcAddress(DLLHandle,'Hik_PlayM4_SetRefValue');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_SetRefValue <> nil);
{$ENDIF}
@Hik_PlayM4_OpenStreamEx := GetProcAddress(DLLHandle,'Hik_PlayM4_OpenStreamEx');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_OpenStreamEx <> nil);
{$ENDIF}
@Hik_PlayM4_CloseStreamEx := GetProcAddress(DLLHandle,'Hik_PlayM4_CloseStreamEx');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_CloseStreamEx <> nil);
{$ENDIF}
@Hik_PlayM4_InputVideoData := GetProcAddress(DLLHandle,'Hik_PlayM4_InputVideoData');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_InputVideoData <> nil);
{$ENDIF}
@Hik_PlayM4_InputAudioData := GetProcAddress(DLLHandle,'Hik_PlayM4_InputAudioData');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_InputAudioData <> nil);
{$ENDIF}
@Hik_PlayM4_RigisterDrawFun := GetProcAddress(DLLHandle,'Hik_PlayM4_RigisterDrawFun');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_RigisterDrawFun <> nil);
{$ENDIF}
@Hik_PlayM4_SetTimerType := GetProcAddress(DLLHandle,'Hik_PlayM4_SetTimerType');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_SetTimerType <> nil);
{$ENDIF}
@Hik_PlayM4_GetTimerType := GetProcAddress(DLLHandle,'Hik_PlayM4_GetTimerType');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetTimerType <> nil);
{$ENDIF}
@Hik_PlayM4_ResetBuffer := GetProcAddress(DLLHandle,'Hik_PlayM4_ResetBuffer');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_ResetBuffer <> nil);
{$ENDIF}
@Hik_PlayM4_GetBufferValue := GetProcAddress(DLLHandle,'Hik_PlayM4_GetBufferValue');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetBufferValue <> nil);
{$ENDIF}
@Hik_PlayM4_AdjustWaveAudio := GetProcAddress(DLLHandle,'Hik_PlayM4_AdjustWaveAudio');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_AdjustWaveAudio <> nil);
{$ENDIF}
@Hik_PlayM4_SetVerifyCallBack := GetProcAddress(DLLHandle,'Hik_PlayM4_SetVerifyCallBack');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_SetVerifyCallBack <> nil);
{$ENDIF}
@Hik_PlayM4_SetAudioCallBack := GetProcAddress(DLLHandle,'Hik_PlayM4_SetAudioCallBack');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_SetAudioCallBack <> nil);
{$ENDIF}
@Hik_PlayM4_SetEncTypeChangeCallBack := GetProcAddress(DLLHandle,'Hik_PlayM4_SetEncTypeChangeCallBack');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_SetEncTypeChangeCallBack <> nil);
{$ENDIF}
@Hik_PlayM4_SetColor := GetProcAddress(DLLHandle,'Hik_PlayM4_SetColor');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_SetColor <> nil);
{$ENDIF}
@Hik_PlayM4_GetColor := GetProcAddress(DLLHandle,'Hik_PlayM4_GetColor');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetColor <> nil);
{$ENDIF}
@Hik_PlayM4_SetEncChangeMsg := GetProcAddress(DLLHandle,'Hik_PlayM4_SetEncChangeMsg');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_SetEncChangeMsg <> nil);
{$ENDIF}
@Hik_PlayM4_GetOriginalFrameCallBack := GetProcAddress(DLLHandle,'Hik_PlayM4_GetOriginalFrameCallBack');
{$IFDEF WIN32}
Assert(@Hik_PlayM4_GetOriginalFrameCallBack <> nil);
{$ENDIF}
end
else
begin
DLLLoaded := False;
{ Error: HIKPLAYMPEG4.DLL could not be loaded !! }
end;
{$IFNDEF MSDOS}
SetErrorMode(ErrorMode)
{$ENDIF}
end {LoadDLL};

begin
LoadDLL;
end.
 

弄潮儿.NET

Unregistered / Unconfirmed
GUEST, unregistred user!
这是人看的吗??!!!晕!
 
R

rzqcjwrz

Unregistered / Unconfirmed
GUEST, unregistred user!
希望有高手帮我解决此问题?
 
X

xianguo

Unregistered / Unconfirmed
GUEST, unregistred user!
代码太长,你还是详细说明一下你的意图吧
 
R

rzqcjwrz

Unregistered / Unconfirmed
GUEST, unregistred user!
我的意图是调用海康的动态联结库文件,在编译时报错.
 
R

rzqcjwrz

Unregistered / Unconfirmed
GUEST, unregistred user!
const
HIK_PLAYM4_API = extern 'C'__declspec(dllexport);

const
HIK_PLAYM4_API = extern 'C';
这两句是不是错了,应该怎样写?
 
C

czcn

Unregistered / Unconfirmed
GUEST, unregistred user!
>>> HIK_PLAYM4_API = extern 'C'__declspec(dllexport);
这个是C++的语法,当然要错了.看你的代码原来C++在这里是预定义.但预定义不是完成等于pascal的const,像下面的定义语句在C能用预定义,但在pascal中不能用const的,建议把上面的这种句子注释先.
>>>Hik_PlayM4_InitDDraw: function(hWnd: HWND): HIK_PLAYM4_API BOOL cdecl {$IFDEF WIN32} stdcall {$ENDIF};
所以这个这不对了.

//const
// HIK_PLAYM4_API = extern 'C'__declspec(dllexport);
...
Hik_PlayM4_InitDDraw: function(hWnd: HWND): BOOL;cdecl;stdcall;
 
R

rzqcjwrz

Unregistered / Unconfirmed
GUEST, unregistred user!
Thank you!!!
 
Top Bottom