E SERİSİ İP kamera active X resim çekme sorunu?

Delphi'de kod yazma ile ilgili sorularınızı bu foruma yazabilirsiniz.
Cevapla
forumsad
Üye
Mesajlar: 296
Kayıt: 29 Tem 2010 10:47

E SERİSİ İP kamera active X resim çekme sorunu?

Mesaj gönderen forumsad »

arkadaşlar elimde E serisi ip kamera var ducki marka (DS-MIPC-EA)
com1024.dll diye bir dosyası var bunı active x olarak delphiye yükledim
forma kompenantı ekleyerek

Kod: Tümünü seç

CSQ1.IP:= '169.254.1.114';
CSQ1.Port:= 8168;
CSQ1.account :='admin';
CSQ1.password:='admin';
CSQ1.video_on;
yukardaki kodlarla kamera görüntüsünü almayı başardım

fakat resim çektiremiyorum
başka bir ip kamerada resmi aşagıdaki şekilde alıyordum ama bunda alamıyorum

CSQ1.snapshot('resim\a1.jpg'); //kod hata veriyor
//DVM_IPCam21.Photo2('resim\a1.jpg') ; //başka ip kamerada resim çekme kodu

fikri olan var mı acaba teşekkürler..
Kullanıcı avatarı
SimaWB
Üye
Mesajlar: 1316
Kayıt: 07 May 2009 10:42
Konum: İstanbul
İletişim:

Re: E SERİSİ İP kamera active X resim çekme sorunu?

Mesaj gönderen SimaWB »

tdump.exe ile DLL'de export edilen fonksiyonları kontrol edebilirsin.
:ara tdump
There's no place like 127.0.0.1
forumsad
Üye
Mesajlar: 296
Kayıt: 29 Tem 2010 10:47

Re: E SERİSİ İP kamera active X resim çekme sorunu?

Mesaj gönderen forumsad »

deneyeceğim

unit com1024_TLB; ünitini incelediğimde

Kod: Tümünü seç


unit com1024_TLB;

// ************************************************************************ //
// WARNING                                                                    
// -------                                                                    
// The types declared in this file were generated from data read from a       
// Type Library. If this type library is explicitly or indirectly (via        
// another type library referring to this type library) re-imported, or the   
// 'Refresh' command of the Type Library Editor activated while editing the   
// Type Library, the contents of this file will be regenerated and all        
// manual modifications will be lost.                                         
// ************************************************************************ //

// PASTLWTR : 1.2
// File generated on 06.04.2011 08:58:42 from Type Library described below.

// ************************************************************************  //
// Type Lib: D:\WINDOWS\system32\com1024.dll (1)
// LIBID: {97BDC3DB-7695-4C01-91B1-98471A9BE4D6}
// LCID: 0
// Helpfile: 
// HelpString: com1024 1.0 «¬§Oµ{¦¡®w
// DepndLst: 
//   (1) v2.0 stdole, (D:\WINDOWS\system32\stdole2.tlb)
// Errors:
//   Error creating palette bitmap of (TCSQ) : Error reading control bitmap
// ************************************************************************ //
{$TYPEDADDRESS OFF} // Unit must be compiled without type-checked pointers. 
{$WARN SYMBOL_PLATFORM OFF}
{$WRITEABLECONST ON}
{$VARPROPSETTER ON}
interface

uses Windows, ActiveX, Classes, Graphics, OleCtrls, OleServer, StdVCL, Variants;
  


// *********************************************************************//
// GUIDS declared in the TypeLibrary. Following prefixes are used:        
//   Type Libraries     : LIBID_xxxx                                      
//   CoClasses          : CLASS_xxxx                                      
//   DISPInterfaces     : DIID_xxxx                                       
//   Non-DISP interfaces: IID_xxxx                                        
// *********************************************************************//
const
  // TypeLibrary Major and minor versions
  com1024MajorVersion = 1;
  com1024MinorVersion = 0;

  LIBID_com1024: TGUID = '{97BDC3DB-7695-4C01-91B1-98471A9BE4D6}';

  IID_ISQ: TGUID = '{CF637FA0-AA82-4660-A041-C3F4360AE67F}';
  CLASS_CSQ: TGUID = '{B0781EB7-16EA-49F1-9C1D-9716D88206CF}';
type

// *********************************************************************//
// Forward declaration of types defined in TypeLibrary                    
// *********************************************************************//
  ISQ = interface;
  ISQDisp = dispinterface;

// *********************************************************************//
// Declaration of CoClasses defined in Type Library                       
// (NOTE: Here we map each CoClass to its Default Interface)              
// *********************************************************************//
  CSQ = ISQ;


// *********************************************************************//
// Interface: ISQ
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {CF637FA0-AA82-4660-A041-C3F4360AE67F}
// *********************************************************************//
  ISQ = interface(IDispatch)
    ['{CF637FA0-AA82-4660-A041-C3F4360AE67F}']
    procedure snapshot; safecall;
    procedure pppoe_terminal; safecall;
    function GetImgWidth: Integer; safecall;
    function Get_Port: Word; safecall;
    procedure Set_Port(pVal: Word); safecall;
    function Get_IP: WideString; safecall;
    procedure Set_IP(const pVal: WideString); safecall;
    function Get_video_on: Byte; safecall;
    procedure Set_video_on(pVal: Byte); safecall;
    function Get_mdpc: Byte; safecall;
    procedure Set_mdpc(pVal: Byte); safecall;
    function Get_cookies: WideString; safecall;
    procedure Set_cookies(const pVal: WideString); safecall;
    function Get_webcamID: WideString; safecall;
    procedure Set_webcamID(const pVal: WideString); safecall;
    function Get_audio_on: Byte; safecall;
    procedure Set_audio_on(pVal: Byte); safecall;
    function Get_ShowText: Byte; safecall;
    procedure Set_ShowText(pVal: Byte); safecall;
    function Get_account: WideString; safecall;
    procedure Set_account(const pVal: WideString); safecall;
    function Get_password: WideString; safecall;
    procedure Set_password(const pVal: WideString); safecall;
    function Get_img_width: Integer; safecall;
    procedure Set_img_width(pVal: Integer); safecall;
    function Get_img_height: Integer; safecall;
    procedure Set_img_height(pVal: Integer); safecall;
    function Get_Authorization: WideString; safecall;
    procedure Set_Authorization(const pVal: WideString); safecall;
    procedure reconnect; safecall;
    property Port: Word read Get_Port write Set_Port;
    property IP: WideString read Get_IP write Set_IP;
    property video_on: Byte read Get_video_on write Set_video_on;
    property mdpc: Byte read Get_mdpc write Set_mdpc;
    property cookies: WideString read Get_cookies write Set_cookies;
    property webcamID: WideString read Get_webcamID write Set_webcamID;
    property audio_on: Byte read Get_audio_on write Set_audio_on;
    property ShowText: Byte read Get_ShowText write Set_ShowText;
    property account: WideString read Get_account write Set_account;
    property password: WideString read Get_password write Set_password;
    property img_width: Integer read Get_img_width write Set_img_width;
    property img_height: Integer read Get_img_height write Set_img_height;
    property Authorization: WideString read Get_Authorization write Set_Authorization;
  end;

// *********************************************************************//
// DispIntf:  ISQDisp
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {CF637FA0-AA82-4660-A041-C3F4360AE67F}
// *********************************************************************//
  ISQDisp = dispinterface
    ['{CF637FA0-AA82-4660-A041-C3F4360AE67F}']
    procedure snapshot; dispid 1;
    procedure pppoe_terminal; dispid 2;
    function GetImgWidth: Integer; dispid 3;
    property Port: {??Word}OleVariant dispid 4;
    property IP: WideString dispid 5;
    property video_on: Byte dispid 6;
    property mdpc: Byte dispid 7;
    property cookies: WideString dispid 8;
    property webcamID: WideString dispid 9;
    property audio_on: Byte dispid 10;
    property ShowText: Byte dispid 11;
    property account: WideString dispid 12;
    property password: WideString dispid 13;
    property img_width: Integer dispid 14;
    property img_height: Integer dispid 15;
    property Authorization: WideString dispid 16;
    procedure reconnect; dispid 17;
  end;


// *********************************************************************//
// OLE Control Proxy class declaration
// Control Name     : TCSQ
// Help String      : SQ Class
// Default Interface: ISQ
// Def. Intf. DISP? : No
// Event   Interface: 
// TypeFlags        : (2) CanCreate
// *********************************************************************//
  TCSQ = class(TOleControl)
  private
    FIntf: ISQ;
    function  GetControlInterface: ISQ;
  protected
    procedure CreateControl;
    procedure InitControlData; override;
  public
    procedure snapshot;
    procedure pppoe_terminal;
    function GetImgWidth: Integer;
    procedure reconnect;
    property  ControlInterface: ISQ read GetControlInterface;
    property  DefaultInterface: ISQ read GetControlInterface;
  published
    property Anchors;
    property  TabStop;
    property  Align;
    property  DragCursor;
    property  DragMode;
    property  ParentShowHint;
    property  PopupMenu;
    property  ShowHint;
    property  TabOrder;
    property  Visible;
    property  OnDragDrop;
    property  OnDragOver;
    property  OnEndDrag;
    property  OnEnter;
    property  OnExit;
    property  OnStartDrag;
    property Port: Word index 4 read GetWordProp write SetWordProp stored False;
    property IP: WideString index 5 read GetWideStringProp write SetWideStringProp stored False;
    property video_on: Byte index 6 read GetByteProp write SetByteProp stored False;
    property mdpc: Byte index 7 read GetByteProp write SetByteProp stored False;
    property cookies: WideString index 8 read GetWideStringProp write SetWideStringProp stored False;
    property webcamID: WideString index 9 read GetWideStringProp write SetWideStringProp stored False;
    property audio_on: Byte index 10 read GetByteProp write SetByteProp stored False;
    property ShowText: Byte index 11 read GetByteProp write SetByteProp stored False;
    property account: WideString index 12 read GetWideStringProp write SetWideStringProp stored False;
    property password: WideString index 13 read GetWideStringProp write SetWideStringProp stored False;
    property img_width: Integer index 14 read GetIntegerProp write SetIntegerProp stored False;
    property img_height: Integer index 15 read GetIntegerProp write SetIntegerProp stored False;
    property Authorization: WideString index 16 read GetWideStringProp write SetWideStringProp stored False;
  end;

procedure Register;

resourcestring
  dtlServerPage = 'ActiveX';

  dtlOcxPage = 'ActiveX';

implementation

uses ComObj;

procedure TCSQ.InitControlData;
const
  CControlData: TControlData2 = (
    ClassID: '{B0781EB7-16EA-49F1-9C1D-9716D88206CF}';
    EventIID: '';
    EventCount: 0;
    EventDispIDs: nil;
    LicenseKey: nil (*HR:$80004002*);
    Flags: $00000000;
    Version: 401);
begin
  ControlData := @CControlData;
end;

procedure TCSQ.CreateControl;

  procedure DoCreate;
  begin
    FIntf := IUnknown(OleObject) as ISQ;
  end;

begin
  if FIntf = nil then DoCreate;
end;

function TCSQ.GetControlInterface: ISQ;
begin
  CreateControl;
  Result := FIntf;
end;

procedure TCSQ.snapshot;
begin
  DefaultInterface.snapshot;
end;

procedure TCSQ.pppoe_terminal;
begin
  DefaultInterface.pppoe_terminal;
end;

function TCSQ.GetImgWidth: Integer;
begin
  Result := DefaultInterface.GetImgWidth;
end;

procedure TCSQ.reconnect;
begin
  DefaultInterface.reconnect;
end;

procedure Register;
begin
  RegisterComponents(dtlOcxPage, [TCSQ]);
end;

end.

burdan bir şey çıkaramadım
Kullanıcı avatarı
SimaWB
Üye
Mesajlar: 1316
Kayıt: 07 May 2009 10:42
Konum: İstanbul
İletişim:

Re: E SERİSİ İP kamera active X resim çekme sorunu?

Mesaj gönderen SimaWB »

Activex olarak yüklediğini unutmuşum, o yüzden tdump'a ihtiyacın yok. Sen zaten unit'e sahipsin, dolayısıyla kullanabileceğin fonksiyon/procedure'leri görebiliyorsun. Seninde gördüğün gibi snapshot procedure hiçbir parametre almıyor gözüküyor.
There's no place like 127.0.0.1
Cevapla