C++的DLL接口单元,如何改写为Delphi的DLL接口单元???C++的DLL接口单元如下 ( 积分: 200 )

  • 主题发起人 主题发起人 cocw
  • 开始时间 开始时间
C

cocw

Unregistered / Unconfirmed
GUEST, unregistred user!
C++的DLL接口单元
// Rye.h: interface for the CRye class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_RYE_H__00A7DDD1_0192_4B68_B9C2_8DDC9A8DC614__INCLUDED_)
#define AFX_RYE_H__00A7DDD1_0192_4B68_B9C2_8DDC9A8DC614__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class CRyeDll
{
public:
CRyeDll();
virtual ~CRyeDll();
public:
virtual long InitControl() = 0;
virtual long GetPropCameraCount( LPLONG lpCamCount ) = 0;
virtual long GetPropConnectCamera(long nCamNo, LPTSTR lpszCameraName ) = 0;
virtual long Connect(long nCamNo) = 0;
virtual long DisConnect(long nCamNo) = 0;
virtual long Capture(long nCamNo) = 0;
virtual long GetPropRemainCount(long nCamNo, LPLONG lpRemCount ) = 0;
virtual long GetPropPicCount(long nCamNo, LPLONG lpPicCount ) = 0;
virtual long SetPropCurrentPicture(long nCamNo, long nPicNo ) = 0;
virtual long GetPropPicSize(long nCamNo, LPLONG lpPicSize ) = 0;
virtual long GetPicture(long nCamNo, long nBufferSize, LPVOID lpszPictureBuffer ) = 0;
virtual long EraseLast(long nCamNo) = 0;
virtual long GetPropCameraID(long nCamNo, LPTSTR lpszCamId ) = 0;
virtual long SetPropCameraID(long nCamNo, LPCTSTR lpszCamId ) = 0;
virtual long GetPropOpticalZoom(long nCamNo, LPLONG lpZoomLength ) = 0;
virtual long SetPropOpticalZoom(long nCamNo, long nZoomLength ) = 0;
virtual long GetPropFocusMode(long nCamNo, LPLONG lpFocusMode ) = 0;
virtual long SetPropFocusMode(long nCamNo, long nFocusMode ) = 0;
virtual long GetPropFlash(long nCamNo, LPLONG lpFlash ) = 0;
virtual long SetPropFlash(long nCamNo, long nFlash ) = 0;
virtual long GetPropResolution(long nCamNo, LPLONG lpResolution ) = 0;
virtual long SetPropResolution(long nCamNo, long nResolution ) = 0;
virtual long GetPropWhiteBalance(long nCamNo, LPLONG lpWhiteBalance ) = 0;
virtual long SetPropWhiteBalance(long nCamNo, long nWhiteBalance ) = 0;
virtual long GetPropExpoBias(long nCamNo, LPLONG lpExpoBias ) = 0;
virtual long SetPropExpoBias(long nCamNo, long nExpoBias ) = 0;
virtual long GetPropMetering(long nCamNo, LPLONG lpMetering ) = 0;
virtual long SetPropMetering(long nCamNo, long nMetering ) = 0;
virtual long GetPropIsoSpeed(long nCamNo, LPLONG lpIsoSpeed ) = 0;
virtual long SetPropIsoSpeed(long nCamNo, long nIsoSpeed ) = 0;
virtual long GetPropFocusPosition(long nCamNo, LPLONG lpFocusPos ) = 0;
virtual long SetPropFocusPosition(long nCamNo, long nFocusPos ) = 0;
virtual long GetPropIndexSize(long nCamNo, LPLONG lpIndexSize ) = 0;
virtual long GetPropFileName(long nCamNo, LPSTR lpszFileName ) = 0;
virtual long GetIndex(long nCamNo, long nBufferSize, LPVOID lpszPictureBuffer ) = 0;
virtual long GetPreview(long nCamNo, long nBufferSize, LPVOID lpszPictureBuffer ) = 0;
virtual long ErasePicture(long nCamNo) = 0;
virtual long EraseAll(long nCamNo) = 0;
virtual long Preview(long nCamNo) = 0;
virtual long SetLcdMode(long nCamNo, long nLcdMode ) = 0;
virtual long GetCaptureProp(long nCamNo, LPCAPTURE_MODE lpCaptureMode ) = 0;
virtual long SetCaptureProp(long nCamNo, LPCAPTURE_MODE lpCaptureMode ) = 0;
virtual long GetCameraProp(long nCamNo, LPCAMERA_PROPERTY lpCamProp ) = 0;
virtual long GetPictureProp(long nCamNo, LPPICTURE_PROPERTY lpPicProp ) = 0;
virtual long GetPicTagProp(long nCamNo, LPPIC_TAG_PROPERTY lpPicTagProp ) = 0;
virtual long GetExposureProp(long nCamNo, LPEXPOSURE_MODE lpExpoProp ) = 0;
virtual long SetExposureProp(long nCamNo, LPEXPOSURE_MODE lpExpoProp ) = 0;

virtual long CardFormat(long nCamNo) = 0;
virtual long SetPropElectricZoom(long nCamNo, long nElectricZoom ) = 0;
virtual long GetPropElectricZoom(long nCamNo, LPLONG lpElectricZoom ) = 0;
virtual long SetCustomValue(long nCamNo, LPRYE_CUSTOM_MODE lpCustomValue ) = 0;
virtual long GetCustomValue(long nCamNo, LPRYE_CUSTOM_MODE lpCustomValue) = 0;
virtual long GetFolderProp(long nCamNo, LPFOLDER_PROPERTY lpFolderProp) = 0;
virtual long GetPropFolderCount(long nCamNo, LPLONG lpFolderCount) = 0;
virtual long GetPropFolderName(long nCamNo, LPSTR lpszFolderName) = 0;
virtual long GetPropFreeMemory(long nCamNo, LPLONG lpFreeMemory ) = 0;
virtual long GetPropLed(long nCamNo, LPLONG lpLed) = 0;
virtual long SetPropLed(long nCamNo, long nNewValue) = 0;
virtual long GetPropLCDBrightness(long nCamNo, LPLONG lpBrightness) = 0;
virtual long SetPropLCDBrightness(long nCamNo, long nNewValue) = 0;
virtual long GetPropCameraTime(long nCamNo, LPLONG lpCameraTime ) = 0;
virtual long GetMemoryProp(long nCamNo, LPMEMORY_CARD_INFO lpCardInfo ) = 0;
virtual long GetPropBattery(long nCamNo, LPLONG lpBatteryStatus ) = 0;
virtual long GetPropPowerSaveCamera(long nCamNo, LPLONG lpSaveTime ) = 0;
virtual long SetPropPowerSaveCamera(long nCamNo, long nNewValue ) = 0;
virtual long GetPropPowerSaveHost(long nCamNo, LPLONG lpSaveTime ) = 0;
virtual long SetPropPowerSaveHost(long nCamNo, long nNewValue ) = 0;
virtual long GetPropPowerSaveLCD(long nCamNo, LPLONG lpSaveTime ) = 0;
virtual long SetPropPowerSaveLCD(long nCamNo, long nNewValue ) = 0;
virtual long GetPropTimeFormat(long nCamNo, LPLONG lpTimeFormat ) = 0;
virtual long SetPropCameraTime(long nCamNo, long nCamTime) = 0;
virtual long SetPropTimeFormat(long nCamNo, long nFormat ) = 0;
virtual long UploadPicture(long nCamNo, long nPicSize, LPVOID pBuffer) = 0;
virtual long SetPropCancel(long nCamNo, BOOL bNewValue = FALSE) = 0;
virtual long SetPropFolderNo(long nCamNo, long nFolderNo) = 0;

virtual long SetPropProtect(long nCamNo, BOOL bNewValue) = 0;//[2002-8-23] long -> bool
virtual long GetPropProtect(long nCamNo, LPBOOL lpProtect) = 0;
virtual long SetPropFolderName(long nCamNo, LPCTSTR lpszFolderName) = 0;
virtual long Release(long nCamNo,long nReleaseType) = 0;

};

#endif // !defined(AFX_RYE_H__00A7DDD1_0192_4B68_B9C2_8DDC9A8DC614__INCLUDED_)
 
C++的DLL接口单元
// Rye.h: interface for the CRye class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_RYE_H__00A7DDD1_0192_4B68_B9C2_8DDC9A8DC614__INCLUDED_)
#define AFX_RYE_H__00A7DDD1_0192_4B68_B9C2_8DDC9A8DC614__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class CRyeDll
{
public:
CRyeDll();
virtual ~CRyeDll();
public:
virtual long InitControl() = 0;
virtual long GetPropCameraCount( LPLONG lpCamCount ) = 0;
virtual long GetPropConnectCamera(long nCamNo, LPTSTR lpszCameraName ) = 0;
virtual long Connect(long nCamNo) = 0;
virtual long DisConnect(long nCamNo) = 0;
virtual long Capture(long nCamNo) = 0;
virtual long GetPropRemainCount(long nCamNo, LPLONG lpRemCount ) = 0;
virtual long GetPropPicCount(long nCamNo, LPLONG lpPicCount ) = 0;
virtual long SetPropCurrentPicture(long nCamNo, long nPicNo ) = 0;
virtual long GetPropPicSize(long nCamNo, LPLONG lpPicSize ) = 0;
virtual long GetPicture(long nCamNo, long nBufferSize, LPVOID lpszPictureBuffer ) = 0;
virtual long EraseLast(long nCamNo) = 0;
virtual long GetPropCameraID(long nCamNo, LPTSTR lpszCamId ) = 0;
virtual long SetPropCameraID(long nCamNo, LPCTSTR lpszCamId ) = 0;
virtual long GetPropOpticalZoom(long nCamNo, LPLONG lpZoomLength ) = 0;
virtual long SetPropOpticalZoom(long nCamNo, long nZoomLength ) = 0;
virtual long GetPropFocusMode(long nCamNo, LPLONG lpFocusMode ) = 0;
virtual long SetPropFocusMode(long nCamNo, long nFocusMode ) = 0;
virtual long GetPropFlash(long nCamNo, LPLONG lpFlash ) = 0;
virtual long SetPropFlash(long nCamNo, long nFlash ) = 0;
virtual long GetPropResolution(long nCamNo, LPLONG lpResolution ) = 0;
virtual long SetPropResolution(long nCamNo, long nResolution ) = 0;
virtual long GetPropWhiteBalance(long nCamNo, LPLONG lpWhiteBalance ) = 0;
virtual long SetPropWhiteBalance(long nCamNo, long nWhiteBalance ) = 0;
virtual long GetPropExpoBias(long nCamNo, LPLONG lpExpoBias ) = 0;
virtual long SetPropExpoBias(long nCamNo, long nExpoBias ) = 0;
virtual long GetPropMetering(long nCamNo, LPLONG lpMetering ) = 0;
virtual long SetPropMetering(long nCamNo, long nMetering ) = 0;
virtual long GetPropIsoSpeed(long nCamNo, LPLONG lpIsoSpeed ) = 0;
virtual long SetPropIsoSpeed(long nCamNo, long nIsoSpeed ) = 0;
virtual long GetPropFocusPosition(long nCamNo, LPLONG lpFocusPos ) = 0;
virtual long SetPropFocusPosition(long nCamNo, long nFocusPos ) = 0;
virtual long GetPropIndexSize(long nCamNo, LPLONG lpIndexSize ) = 0;
virtual long GetPropFileName(long nCamNo, LPSTR lpszFileName ) = 0;
virtual long GetIndex(long nCamNo, long nBufferSize, LPVOID lpszPictureBuffer ) = 0;
virtual long GetPreview(long nCamNo, long nBufferSize, LPVOID lpszPictureBuffer ) = 0;
virtual long ErasePicture(long nCamNo) = 0;
virtual long EraseAll(long nCamNo) = 0;
virtual long Preview(long nCamNo) = 0;
virtual long SetLcdMode(long nCamNo, long nLcdMode ) = 0;
virtual long GetCaptureProp(long nCamNo, LPCAPTURE_MODE lpCaptureMode ) = 0;
virtual long SetCaptureProp(long nCamNo, LPCAPTURE_MODE lpCaptureMode ) = 0;
virtual long GetCameraProp(long nCamNo, LPCAMERA_PROPERTY lpCamProp ) = 0;
virtual long GetPictureProp(long nCamNo, LPPICTURE_PROPERTY lpPicProp ) = 0;
virtual long GetPicTagProp(long nCamNo, LPPIC_TAG_PROPERTY lpPicTagProp ) = 0;
virtual long GetExposureProp(long nCamNo, LPEXPOSURE_MODE lpExpoProp ) = 0;
virtual long SetExposureProp(long nCamNo, LPEXPOSURE_MODE lpExpoProp ) = 0;

virtual long CardFormat(long nCamNo) = 0;
virtual long SetPropElectricZoom(long nCamNo, long nElectricZoom ) = 0;
virtual long GetPropElectricZoom(long nCamNo, LPLONG lpElectricZoom ) = 0;
virtual long SetCustomValue(long nCamNo, LPRYE_CUSTOM_MODE lpCustomValue ) = 0;
virtual long GetCustomValue(long nCamNo, LPRYE_CUSTOM_MODE lpCustomValue) = 0;
virtual long GetFolderProp(long nCamNo, LPFOLDER_PROPERTY lpFolderProp) = 0;
virtual long GetPropFolderCount(long nCamNo, LPLONG lpFolderCount) = 0;
virtual long GetPropFolderName(long nCamNo, LPSTR lpszFolderName) = 0;
virtual long GetPropFreeMemory(long nCamNo, LPLONG lpFreeMemory ) = 0;
virtual long GetPropLed(long nCamNo, LPLONG lpLed) = 0;
virtual long SetPropLed(long nCamNo, long nNewValue) = 0;
virtual long GetPropLCDBrightness(long nCamNo, LPLONG lpBrightness) = 0;
virtual long SetPropLCDBrightness(long nCamNo, long nNewValue) = 0;
virtual long GetPropCameraTime(long nCamNo, LPLONG lpCameraTime ) = 0;
virtual long GetMemoryProp(long nCamNo, LPMEMORY_CARD_INFO lpCardInfo ) = 0;
virtual long GetPropBattery(long nCamNo, LPLONG lpBatteryStatus ) = 0;
virtual long GetPropPowerSaveCamera(long nCamNo, LPLONG lpSaveTime ) = 0;
virtual long SetPropPowerSaveCamera(long nCamNo, long nNewValue ) = 0;
virtual long GetPropPowerSaveHost(long nCamNo, LPLONG lpSaveTime ) = 0;
virtual long SetPropPowerSaveHost(long nCamNo, long nNewValue ) = 0;
virtual long GetPropPowerSaveLCD(long nCamNo, LPLONG lpSaveTime ) = 0;
virtual long SetPropPowerSaveLCD(long nCamNo, long nNewValue ) = 0;
virtual long GetPropTimeFormat(long nCamNo, LPLONG lpTimeFormat ) = 0;
virtual long SetPropCameraTime(long nCamNo, long nCamTime) = 0;
virtual long SetPropTimeFormat(long nCamNo, long nFormat ) = 0;
virtual long UploadPicture(long nCamNo, long nPicSize, LPVOID pBuffer) = 0;
virtual long SetPropCancel(long nCamNo, BOOL bNewValue = FALSE) = 0;
virtual long SetPropFolderNo(long nCamNo, long nFolderNo) = 0;

virtual long SetPropProtect(long nCamNo, BOOL bNewValue) = 0;//[2002-8-23] long -> bool
virtual long GetPropProtect(long nCamNo, LPBOOL lpProtect) = 0;
virtual long SetPropFolderName(long nCamNo, LPCTSTR lpszFolderName) = 0;
virtual long Release(long nCamNo,long nReleaseType) = 0;

};

#endif // !defined(AFX_RYE_H__00A7DDD1_0192_4B68_B9C2_8DDC9A8DC614__INCLUDED_)
 
unit RYE;

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

{/// Rye.h: interface for the CRye class. }
{/// }
{/////////////////////////////////////////////////////////////////////// }

{$IFNDEF AFX_RYE_H__00A7DDD1_0192_4B68_B9C2_8DDC9A8DC614__INCLUDED_}
{$DEFINE AFX_RYE_H__00A7DDD1_0192_4B68_B9C2_8DDC9A8DC614__INCLUDED_}

{$IFDEF _MSC_VER > 1000}
{ #pragma once }
{$ENDIF // _MSC_VER > 1000}
var
CRyeDll: var function: UBLIC: cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
~CRyeDll: function: VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
InitControl: var function: UBLIC: VIRTUAL LONG cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
GetPropCameraCount: function(var lpCamCount: LongInt): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
GetPropConnectCamera: function(nCamNo: LongInt

var lpszCameraName: TSTR): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
Connect: function(nCamNo: LongInt): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
DisConnect: function(nCamNo: LongInt): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
Capture: function(nCamNo: LongInt): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
GetPropRemainCount: function(nCamNo: LongInt

var lpRemCount: LongInt): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
GetPropPicCount: function(nCamNo: LongInt

var lpPicCount: LongInt): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
SetPropCurrentPicture: function(nCamNo: LongInt

nPicNo: LongInt): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
GetPropPicSize: function(nCamNo: LongInt

var lpPicSize: LongInt): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
GetPicture: function(nCamNo: LongInt

nBufferSize: LongInt

var lpszPictureBuffer: VOID): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
EraseLast: function(nCamNo: LongInt): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
GetPropCameraID: function(nCamNo: LongInt

var lpszCamId: TSTR): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
SetPropCameraID: function(nCamNo: LongInt

var lpszCamId: CTSTR): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
GetPropOpticalZoom: function(nCamNo: LongInt

var lpZoomLength: LongInt): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
SetPropOpticalZoom: function(nCamNo: LongInt

nZoomLength: LongInt): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
GetPropFocusMode: function(nCamNo: LongInt

var lpFocusMode: LongInt): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
SetPropFocusMode: function(nCamNo: LongInt

nFocusMode: LongInt): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
GetPropFlash: function(nCamNo: LongInt

var lpFlash: LongInt): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
SetPropFlash: function(nCamNo: LongInt

nFlash: LongInt): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
GetPropResolution: function(nCamNo: LongInt

var lpResolution: LongInt): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
SetPropResolution: function(nCamNo: LongInt

nResolution: LongInt): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
GetPropWhiteBalance: function(nCamNo: LongInt

var lpWhiteBalance: LongInt): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
SetPropWhiteBalance: function(nCamNo: LongInt

nWhiteBalance: LongInt): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
GetPropExpoBias: function(nCamNo: LongInt

var lpExpoBias: LongInt): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
SetPropExpoBias: function(nCamNo: LongInt

nExpoBias: LongInt): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
GetPropMetering: function(nCamNo: LongInt

var lpMetering: LongInt): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
SetPropMetering: function(nCamNo: LongInt

nMetering: LongInt): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
GetPropIsoSpeed: function(nCamNo: LongInt

var lpIsoSpeed: LongInt): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
SetPropIsoSpeed: function(nCamNo: LongInt

nIsoSpeed: LongInt): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
GetPropFocusPosition: function(nCamNo: LongInt

var lpFocusPos: LongInt): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
SetPropFocusPosition: function(nCamNo: LongInt

nFocusPos: LongInt): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
GetPropIndexSize: function(nCamNo: LongInt

var lpIndexSize: LongInt): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
GetPropFileName: function(nCamNo: LongInt

lpszFileName: PChar): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
GetIndex: function(nCamNo: LongInt

nBufferSize: LongInt

var lpszPictureBuffer: VOID): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
GetPreview: function(nCamNo: LongInt

nBufferSize: LongInt

var lpszPictureBuffer: VOID): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
ErasePicture: function(nCamNo: LongInt): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
EraseAll: function(nCamNo: LongInt): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
Preview: function(nCamNo: LongInt): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
SetLcdMode: function(nCamNo: LongInt

nLcdMode: LongInt): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
GetCaptureProp: function(nCamNo: LongInt

var lpCaptureMode: CAPTURE_MODE): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
SetCaptureProp: function(nCamNo: LongInt

var lpCaptureMode: CAPTURE_MODE): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
GetCameraProp: function(nCamNo: LongInt

var lpCamProp: CAMERA_PROPERTY): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
GetPictureProp: function(nCamNo: LongInt

var lpPicProp: PICTURE_PROPERTY): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
GetPicTagProp: function(nCamNo: LongInt

var lpPicTagProp: PIC_TAG_PROPERTY): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
GetExposureProp: function(nCamNo: LongInt

var lpExpoProp: EXPOSURE_MODE): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
SetExposureProp: function(nCamNo: LongInt

var lpExpoProp: EXPOSURE_MODE): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}


var
CardFormat: function(nCamNo: LongInt): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
SetPropElectricZoom: function(nCamNo: LongInt

nElectricZoom: LongInt): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
GetPropElectricZoom: function(nCamNo: LongInt

var lpElectricZoom: LongInt): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
SetCustomValue: function(nCamNo: LongInt

var lpCustomValue: RYE_CUSTOM_MODE): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
GetCustomValue: function(nCamNo: LongInt

var lpCustomValue: RYE_CUSTOM_MODE): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
GetFolderProp: function(nCamNo: LongInt

var lpFolderProp: FOLDER_PROPERTY): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
GetPropFolderCount: function(nCamNo: LongInt

var lpFolderCount: LongInt): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
GetPropFolderName: function(nCamNo: LongInt

lpszFolderName: PChar): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
GetPropFreeMemory: function(nCamNo: LongInt

var lpFreeMemory: LongInt): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
GetPropLed: function(nCamNo: LongInt

var lpLed: LongInt): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
SetPropLed: function(nCamNo: LongInt

nNewValue: LongInt): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
GetPropLCDBrightness: function(nCamNo: LongInt

var lpBrightness: LongInt): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
SetPropLCDBrightness: function(nCamNo: LongInt

nNewValue: LongInt): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
GetPropCameraTime: function(nCamNo: LongInt

var lpCameraTime: LongInt): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
GetMemoryProp: function(nCamNo: LongInt

var lpCardInfo: MEMORY_CARD_INFO): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
GetPropBattery: function(nCamNo: LongInt

var lpBatteryStatus: LongInt): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
GetPropPowerSaveCamera: function(nCamNo: LongInt

var lpSaveTime: LongInt): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
SetPropPowerSaveCamera: function(nCamNo: LongInt

nNewValue: LongInt): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
GetPropPowerSaveHost: function(nCamNo: LongInt

var lpSaveTime: LongInt): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
SetPropPowerSaveHost: function(nCamNo: LongInt

nNewValue: LongInt): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
GetPropPowerSaveLCD: function(nCamNo: LongInt

var lpSaveTime: LongInt): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
SetPropPowerSaveLCD: function(nCamNo: LongInt

nNewValue: LongInt): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
GetPropTimeFormat: function(nCamNo: LongInt

var lpTimeFormat: LongInt): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
SetPropCameraTime: function(nCamNo: LongInt

nCamTime: LongInt): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
SetPropTimeFormat: function(nCamNo: LongInt

nFormat: LongInt): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
UploadPicture: function(nCamNo: LongInt

nPicSize: LongInt

var pBuffer: VOID): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
SetPropCancel: function(nCamNo: LongInt

FALSE: BOOL BNEWVALUE =): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
SetPropFolderNo: function(nCamNo: LongInt

nFolderNo: LongInt): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}


var
SetPropProtect: function(nCamNo: LongInt

bNewValue: Bool): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
GetPropProtect: function(nCamNo: LongInt

var lpProtect: Bool): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
SetPropFolderName: function(nCamNo: LongInt

var lpszFolderName: CTSTR): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}

var
Release: function(nCamNo: LongInt

nReleaseType: LongInt): VIRTUAL cdecl {$IFDEF WIN32} stdcall {$ENDIF}



{$ENDIF // !defined(AFX_RYE_H__00A7DDD1_0192_4B68_B9C2_8DDC9A8DC614__INCLUDED_)}



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('RYE.DLL');
if DLLHandle >= 32 then
begin
DLLLoaded := True;
SaveExit := ExitProc;
ExitProc := @NewExit;
@CRyeDll := GetProcAddress(DLLHandle,'CRyeDll');
{$IFDEF WIN32}
Assert(@CRyeDll <> nil);
{$ENDIF}
@~CRyeDll := GetProcAddress(DLLHandle,'~CRyeDll');
{$IFDEF WIN32}
Assert(@~CRyeDll <> nil);
{$ENDIF}
@InitControl := GetProcAddress(DLLHandle,'InitControl');
{$IFDEF WIN32}
Assert(@InitControl <> nil);
{$ENDIF}
@GetPropCameraCount := GetProcAddress(DLLHandle,'GetPropCameraCount');
{$IFDEF WIN32}
Assert(@GetPropCameraCount <> nil);
{$ENDIF}
@GetPropConnectCamera := GetProcAddress(DLLHandle,'GetPropConnectCamera');
{$IFDEF WIN32}
Assert(@GetPropConnectCamera <> nil);
{$ENDIF}
@Connect := GetProcAddress(DLLHandle,'Connect');
{$IFDEF WIN32}
Assert(@Connect <> nil);
{$ENDIF}
@DisConnect := GetProcAddress(DLLHandle,'DisConnect');
{$IFDEF WIN32}
Assert(@DisConnect <> nil);
{$ENDIF}
@Capture := GetProcAddress(DLLHandle,'Capture');
{$IFDEF WIN32}
Assert(@Capture <> nil);
{$ENDIF}
@GetPropRemainCount := GetProcAddress(DLLHandle,'GetPropRemainCount');
{$IFDEF WIN32}
Assert(@GetPropRemainCount <> nil);
{$ENDIF}
@GetPropPicCount := GetProcAddress(DLLHandle,'GetPropPicCount');
{$IFDEF WIN32}
Assert(@GetPropPicCount <> nil);
{$ENDIF}
@SetPropCurrentPicture := GetProcAddress(DLLHandle,'SetPropCurrentPicture');
{$IFDEF WIN32}
Assert(@SetPropCurrentPicture <> nil);
{$ENDIF}
@GetPropPicSize := GetProcAddress(DLLHandle,'GetPropPicSize');
{$IFDEF WIN32}
Assert(@GetPropPicSize <> nil);
{$ENDIF}
@GetPicture := GetProcAddress(DLLHandle,'GetPicture');
{$IFDEF WIN32}
Assert(@GetPicture <> nil);
{$ENDIF}
@EraseLast := GetProcAddress(DLLHandle,'EraseLast');
{$IFDEF WIN32}
Assert(@EraseLast <> nil);
{$ENDIF}
@GetPropCameraID := GetProcAddress(DLLHandle,'GetPropCameraID');
{$IFDEF WIN32}
Assert(@GetPropCameraID <> nil);
{$ENDIF}
@SetPropCameraID := GetProcAddress(DLLHandle,'SetPropCameraID');
{$IFDEF WIN32}
Assert(@SetPropCameraID <> nil);
{$ENDIF}
@GetPropOpticalZoom := GetProcAddress(DLLHandle,'GetPropOpticalZoom');
{$IFDEF WIN32}
Assert(@GetPropOpticalZoom <> nil);
{$ENDIF}
@SetPropOpticalZoom := GetProcAddress(DLLHandle,'SetPropOpticalZoom');
{$IFDEF WIN32}
Assert(@SetPropOpticalZoom <> nil);
{$ENDIF}
@GetPropFocusMode := GetProcAddress(DLLHandle,'GetPropFocusMode');
{$IFDEF WIN32}
Assert(@GetPropFocusMode <> nil);
{$ENDIF}
@SetPropFocusMode := GetProcAddress(DLLHandle,'SetPropFocusMode');
{$IFDEF WIN32}
Assert(@SetPropFocusMode <> nil);
{$ENDIF}
@GetPropFlash := GetProcAddress(DLLHandle,'GetPropFlash');
{$IFDEF WIN32}
Assert(@GetPropFlash <> nil);
{$ENDIF}
@SetPropFlash := GetProcAddress(DLLHandle,'SetPropFlash');
{$IFDEF WIN32}
Assert(@SetPropFlash <> nil);
{$ENDIF}
@GetPropResolution := GetProcAddress(DLLHandle,'GetPropResolution');
{$IFDEF WIN32}
Assert(@GetPropResolution <> nil);
{$ENDIF}
@SetPropResolution := GetProcAddress(DLLHandle,'SetPropResolution');
{$IFDEF WIN32}
Assert(@SetPropResolution <> nil);
{$ENDIF}
@GetPropWhiteBalance := GetProcAddress(DLLHandle,'GetPropWhiteBalance');
{$IFDEF WIN32}
Assert(@GetPropWhiteBalance <> nil);
{$ENDIF}
@SetPropWhiteBalance := GetProcAddress(DLLHandle,'SetPropWhiteBalance');
{$IFDEF WIN32}
Assert(@SetPropWhiteBalance <> nil);
{$ENDIF}
@GetPropExpoBias := GetProcAddress(DLLHandle,'GetPropExpoBias');
{$IFDEF WIN32}
Assert(@GetPropExpoBias <> nil);
{$ENDIF}
@SetPropExpoBias := GetProcAddress(DLLHandle,'SetPropExpoBias');
{$IFDEF WIN32}
Assert(@SetPropExpoBias <> nil);
{$ENDIF}
@GetPropMetering := GetProcAddress(DLLHandle,'GetPropMetering');
{$IFDEF WIN32}
Assert(@GetPropMetering <> nil);
{$ENDIF}
@SetPropMetering := GetProcAddress(DLLHandle,'SetPropMetering');
{$IFDEF WIN32}
Assert(@SetPropMetering <> nil);
{$ENDIF}
@GetPropIsoSpeed := GetProcAddress(DLLHandle,'GetPropIsoSpeed');
{$IFDEF WIN32}
Assert(@GetPropIsoSpeed <> nil);
{$ENDIF}
@SetPropIsoSpeed := GetProcAddress(DLLHandle,'SetPropIsoSpeed');
{$IFDEF WIN32}
Assert(@SetPropIsoSpeed <> nil);
{$ENDIF}
@GetPropFocusPosition := GetProcAddress(DLLHandle,'GetPropFocusPosition');
{$IFDEF WIN32}
Assert(@GetPropFocusPosition <> nil);
{$ENDIF}
@SetPropFocusPosition := GetProcAddress(DLLHandle,'SetPropFocusPosition');
{$IFDEF WIN32}
Assert(@SetPropFocusPosition <> nil);
{$ENDIF}
@GetPropIndexSize := GetProcAddress(DLLHandle,'GetPropIndexSize');
{$IFDEF WIN32}
Assert(@GetPropIndexSize <> nil);
{$ENDIF}
@GetPropFileName := GetProcAddress(DLLHandle,'GetPropFileName');
{$IFDEF WIN32}
Assert(@GetPropFileName <> nil);
{$ENDIF}
@GetIndex := GetProcAddress(DLLHandle,'GetIndex');
{$IFDEF WIN32}
Assert(@GetIndex <> nil);
{$ENDIF}
@GetPreview := GetProcAddress(DLLHandle,'GetPreview');
{$IFDEF WIN32}
Assert(@GetPreview <> nil);
{$ENDIF}
@ErasePicture := GetProcAddress(DLLHandle,'ErasePicture');
{$IFDEF WIN32}
Assert(@ErasePicture <> nil);
{$ENDIF}
@EraseAll := GetProcAddress(DLLHandle,'EraseAll');
{$IFDEF WIN32}
Assert(@EraseAll <> nil);
{$ENDIF}
@Preview := GetProcAddress(DLLHandle,'Preview');
{$IFDEF WIN32}
Assert(@Preview <> nil);
{$ENDIF}
@SetLcdMode := GetProcAddress(DLLHandle,'SetLcdMode');
{$IFDEF WIN32}
Assert(@SetLcdMode <> nil);
{$ENDIF}
@GetCaptureProp := GetProcAddress(DLLHandle,'GetCaptureProp');
{$IFDEF WIN32}
Assert(@GetCaptureProp <> nil);
{$ENDIF}
@SetCaptureProp := GetProcAddress(DLLHandle,'SetCaptureProp');
{$IFDEF WIN32}
Assert(@SetCaptureProp <> nil);
{$ENDIF}
@GetCameraProp := GetProcAddress(DLLHandle,'GetCameraProp');
{$IFDEF WIN32}
Assert(@GetCameraProp <> nil);
{$ENDIF}
@GetPictureProp := GetProcAddress(DLLHandle,'GetPictureProp');
{$IFDEF WIN32}
Assert(@GetPictureProp <> nil);
{$ENDIF}
@GetPicTagProp := GetProcAddress(DLLHandle,'GetPicTagProp');
{$IFDEF WIN32}
Assert(@GetPicTagProp <> nil);
{$ENDIF}
@GetExposureProp := GetProcAddress(DLLHandle,'GetExposureProp');
{$IFDEF WIN32}
Assert(@GetExposureProp <> nil);
{$ENDIF}
@SetExposureProp := GetProcAddress(DLLHandle,'SetExposureProp');
{$IFDEF WIN32}
Assert(@SetExposureProp <> nil);
{$ENDIF}
@CardFormat := GetProcAddress(DLLHandle,'CardFormat');
{$IFDEF WIN32}
Assert(@CardFormat <> nil);
{$ENDIF}
@SetPropElectricZoom := GetProcAddress(DLLHandle,'SetPropElectricZoom');
{$IFDEF WIN32}
Assert(@SetPropElectricZoom <> nil);
{$ENDIF}
@GetPropElectricZoom := GetProcAddress(DLLHandle,'GetPropElectricZoom');
{$IFDEF WIN32}
Assert(@GetPropElectricZoom <> nil);
{$ENDIF}
@SetCustomValue := GetProcAddress(DLLHandle,'SetCustomValue');
{$IFDEF WIN32}
Assert(@SetCustomValue <> nil);
{$ENDIF}
@GetCustomValue := GetProcAddress(DLLHandle,'GetCustomValue');
{$IFDEF WIN32}
Assert(@GetCustomValue <> nil);
{$ENDIF}
@GetFolderProp := GetProcAddress(DLLHandle,'GetFolderProp');
{$IFDEF WIN32}
Assert(@GetFolderProp <> nil);
{$ENDIF}
@GetPropFolderCount := GetProcAddress(DLLHandle,'GetPropFolderCount');
{$IFDEF WIN32}
Assert(@GetPropFolderCount <> nil);
{$ENDIF}
@GetPropFolderName := GetProcAddress(DLLHandle,'GetPropFolderName');
{$IFDEF WIN32}
Assert(@GetPropFolderName <> nil);
{$ENDIF}
@GetPropFreeMemory := GetProcAddress(DLLHandle,'GetPropFreeMemory');
{$IFDEF WIN32}
Assert(@GetPropFreeMemory <> nil);
{$ENDIF}
@GetPropLed := GetProcAddress(DLLHandle,'GetPropLed');
{$IFDEF WIN32}
Assert(@GetPropLed <> nil);
{$ENDIF}
@SetPropLed := GetProcAddress(DLLHandle,'SetPropLed');
{$IFDEF WIN32}
Assert(@SetPropLed <> nil);
{$ENDIF}
@GetPropLCDBrightness := GetProcAddress(DLLHandle,'GetPropLCDBrightness');
{$IFDEF WIN32}
Assert(@GetPropLCDBrightness <> nil);
{$ENDIF}
@SetPropLCDBrightness := GetProcAddress(DLLHandle,'SetPropLCDBrightness');
{$IFDEF WIN32}
Assert(@SetPropLCDBrightness <> nil);
{$ENDIF}
@GetPropCameraTime := GetProcAddress(DLLHandle,'GetPropCameraTime');
{$IFDEF WIN32}
Assert(@GetPropCameraTime <> nil);
{$ENDIF}
@GetMemoryProp := GetProcAddress(DLLHandle,'GetMemoryProp');
{$IFDEF WIN32}
Assert(@GetMemoryProp <> nil);
{$ENDIF}
@GetPropBattery := GetProcAddress(DLLHandle,'GetPropBattery');
{$IFDEF WIN32}
Assert(@GetPropBattery <> nil);
{$ENDIF}
@GetPropPowerSaveCamera := GetProcAddress(DLLHandle,'GetPropPowerSaveCamera');
{$IFDEF WIN32}
Assert(@GetPropPowerSaveCamera <> nil);
{$ENDIF}
@SetPropPowerSaveCamera := GetProcAddress(DLLHandle,'SetPropPowerSaveCamera');
{$IFDEF WIN32}
Assert(@SetPropPowerSaveCamera <> nil);
{$ENDIF}
@GetPropPowerSaveHost := GetProcAddress(DLLHandle,'GetPropPowerSaveHost');
{$IFDEF WIN32}
Assert(@GetPropPowerSaveHost <> nil);
{$ENDIF}
@SetPropPowerSaveHost := GetProcAddress(DLLHandle,'SetPropPowerSaveHost');
{$IFDEF WIN32}
Assert(@SetPropPowerSaveHost <> nil);
{$ENDIF}
@GetPropPowerSaveLCD := GetProcAddress(DLLHandle,'GetPropPowerSaveLCD');
{$IFDEF WIN32}
Assert(@GetPropPowerSaveLCD <> nil);
{$ENDIF}
@SetPropPowerSaveLCD := GetProcAddress(DLLHandle,'SetPropPowerSaveLCD');
{$IFDEF WIN32}
Assert(@SetPropPowerSaveLCD <> nil);
{$ENDIF}
@GetPropTimeFormat := GetProcAddress(DLLHandle,'GetPropTimeFormat');
{$IFDEF WIN32}
Assert(@GetPropTimeFormat <> nil);
{$ENDIF}
@SetPropCameraTime := GetProcAddress(DLLHandle,'SetPropCameraTime');
{$IFDEF WIN32}
Assert(@SetPropCameraTime <> nil);
{$ENDIF}
@SetPropTimeFormat := GetProcAddress(DLLHandle,'SetPropTimeFormat');
{$IFDEF WIN32}
Assert(@SetPropTimeFormat <> nil);
{$ENDIF}
@UploadPicture := GetProcAddress(DLLHandle,'UploadPicture');
{$IFDEF WIN32}
Assert(@UploadPicture <> nil);
{$ENDIF}
@SetPropCancel := GetProcAddress(DLLHandle,'SetPropCancel');
{$IFDEF WIN32}
Assert(@SetPropCancel <> nil);
{$ENDIF}
@SetPropFolderNo := GetProcAddress(DLLHandle,'SetPropFolderNo');
{$IFDEF WIN32}
Assert(@SetPropFolderNo <> nil);
{$ENDIF}
@SetPropProtect := GetProcAddress(DLLHandle,'SetPropProtect');
{$IFDEF WIN32}
Assert(@SetPropProtect <> nil);
{$ENDIF}
@GetPropProtect := GetProcAddress(DLLHandle,'GetPropProtect');
{$IFDEF WIN32}
Assert(@GetPropProtect <> nil);
{$ENDIF}
@SetPropFolderName := GetProcAddress(DLLHandle,'SetPropFolderName');
{$IFDEF WIN32}
Assert(@SetPropFolderName <> nil);
{$ENDIF}
@Release := GetProcAddress(DLLHandle,'Release');
{$IFDEF WIN32}
Assert(@Release <> nil);
{$ENDIF}
end
else
begin
DLLLoaded := False;
{ Error: RYE.DLL could not be loaded !! }
end;
{$IFNDEF MSDOS}
SetErrorMode(ErrorMode)
{$ENDIF}
end {LoadDLL};

begin
LoadDLL;
end.
 
太不负责了。。。
 
接受答案了.
 
后退
顶部