Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Gráficos
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

 
 
Herramientas Buscar en Tema Desplegado
  #4  
Antiguo 24-01-2007
Roberto Angulo Roberto Angulo is offline
Registrado
 
Registrado: ago 2005
Posts: 6
Poder: 0
Roberto Angulo Va por buen camino
DepjiTwain: Accediendo a sus propiedades

Esta funcion es parte de DelphiTwain

Código Delphi [-]
 
{Sets an one value capability}
function TTwainSource.SetOneValue(Capability: TW_UINT16;
  ItemType: TW_UINT16; Value: Pointer): TCapabilityRet;
var
  Data: HGLOBAL;
  OneV: pTW_ONEVALUE;
  ItemSize,ItemSize2: Integer;
begin
  {Allocate enough memory for the TW_ONEVALUE and obtain pointer}
  ItemSize := TWTypeSize(ItemType);
  //npeter: TW_ONEVALUE minimal size !!!
  //I think to meet the specifications the
  //Item's size must be at least sizeof(TW_UINT32)!
  //when I did it, some mistic errors on some drivers went gone
  if ItemSizethen ItemSize2:=TWTypeSize(TWTY_UINT32) else ItemSize2:=ItemSize;
  Data := GlobalAlloc(GHND, sizeof(OneV^.ItemType) + ItemSize2);
  OneV := GlobalLock(Data);
  {Fill value}
  OneV^.ItemType := ItemType;
  CopyMemory(@OneV^.Item, Value, ItemSize);
  GlobalUnlock(Data);
  {Call method to set}
  Result := SetCapabilityRec(Capability, TWON_ONEVALUE, Data);
  {Unload memory}
  GlobalFree(Data);
end;
Responder Con Cita
 



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Acceso a las propiedades de un objeto desde el editor de propiedades Hugo OOP 0 24-11-2006 12:58:22
Accesar a las propiedades de otros objetos sharky Varios 2 07-12-2004 23:58:55
leer datos del scanner raudelink Varios 2 16-10-2004 02:13:30
scanner huellas digitales jheynoxs Varios 1 08-01-2004 19:46:30
Scanner Aztaroth Varios 1 18-12-2003 20:11:29


La franja horaria es GMT +2. Ahora son las 21:43:45.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi