AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Win32/Win64 API (native code) Delphi DLL Aufruf (void**)&aImgFormat nach Delphi
Thema durchsuchen
Ansicht
Themen-Optionen

DLL Aufruf (void**)&aImgFormat nach Delphi

Ein Thema von yörsch · begonnen am 11. Jan 2007 · letzter Beitrag vom 11. Jan 2007
Antwort Antwort
Benutzerbild von yörsch
yörsch

Registriert seit: 10. Jan 2007
Ort: Lampertheim
206 Beiträge
 
Delphi XE2 Architect
 
#1

Re: DLL Aufruf (void**)&aImgFormat nach Delphi

  Alt 11. Jan 2007, 08:47
So sieht die definition in C aus:


Code:
DWORD WINAPI FX_GetCapability(    IN int iCamId, IN eBCAMQUERYCAP eCap, IN int iIdent, OUT PVOID * ppCap, OUT int * piCapNumber );


typedef struct {
   int   iFormat;      
   int    iSizeX;
   int     iSizeY;
   int    iPixelBytes;
   int     iPixelBits;
   char *    aName;
   int   iColor;
   float   iSizeRoiScaleX;
   float   iSizeRoiScaleY;
   SIZE   sOffset;

}tBoImgFormat, *tpBoImgFormat;

und so sieht meine umsetzung aus

Delphi-Quellcode:
tBoImgFormat = record
    iFormat : integer ;
    iSizeX : LongWord;
    iSizeY : LongWord;
    iPixelBytes : LongWord;
    iPixelBits : LongWord;
    aName : PCHAR;
    iColor    : LongWord;   
    iSizeRoiScaleX : integer;
    iSizeRoiScaleY : integer;
    sOffset : t_size;
    iMinPacketSize : LongWord;
    iMaxPacketSize : LongWord;
  end;
  tpBoImgFormat = ^tBoImgFormat;
 
  aImgFormat : array of tpBoImgFormat;
  HELP : String;

  ...

  fReturn := FX_GetCapability(0, 0, 0, @aImgFormat , @nImgFormat );

  for j := 0 to nImgFormat -1 do
    begin
       HELP := Format('Format[%02d] WxH:%04dx%04d Bpp/Bits:%d/%02d ',
                          [aImgFormat[j]^.iFormat, aImgFormat[j]^.iSizeX,
                           aImgFormat[j]^.iSizeY, aImgFormat[j]^.iPixelBytes,
                           aImgFormat[j]^.iPixelBits ]);
       SetStati('Capability ' + inttostr(J),Help);
    end;
Gruß
Jörg
Jörg
have FUN
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 14:53 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz