In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.

Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.

LLamadas a Funciones del API

Foro público de Xailer en español
Responder
antonio.ortega
Mensajes: 124
Registrado: Mié May 17, 2006 10:50 am

LLamadas a Funciones del API

Mensaje por antonio.ortega »

En FW para llamar a una funcion dentro de una DLL de windows poniamos DLL32
Function NombredeLafuncion ( parametros ), como lo debo hacer con Xailer ?.
GPA.
Antonio F. Ortega
Avatar de Usuario
jfgimenez
Site Admin
Mensajes: 5718
Registrado: Lun Abr 06, 2015 8:48 pm
Contactar:

LLamadas a Funciones del API

Mensaje por jfgimenez »

Antonio,
> En FW para llamar a una funcion dentro de una DLL de windows poniamos
> DLL32
> Function NombredeLafuncion ( parametros ), como lo debo hacer con Xailer
> ?.
Por ahora no hay más remedio que escribir el "wrapper".
--
Un saludo,
José F. Giménez
José F. Giménez
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9442
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

LLamadas a Funciones del API

Mensaje por ignacio »

Antonio,
La contribución de xHarbour What32 tiene algo al respecto. Del fichero contribwhat32examplesimport.prg:
STATIC USER32
STATIC GDI32
STATIC COMCTL32
STATIC KERNEL32
STATIC WINSPOOL
STATIC WINMM
INIT PROCEDURE LoadLibs()
USER32 := LoadLibrary("USER32")
GDI32 := LoadLibrary("GDI32")
COMCTL32 := LoadLibrary("COMCTL32")
KERNEL32 := LoadLibrary("Kernel32")
WINSPOOL := LoadLibrary("WINSPOOL.DRV")
WINMM := LoadLibrary("WINMM")
RETURN
EXIT PROCEDURE FreeLibs
FreeLibrary(USER32)
FreeLibrary(GDI32)
FreeLibrary(COMCTL32)
FreeLibrary(KERNEL32)
FreeLibrary(WINSPOOL)
FreeLibrary(WINMM)
RETURN
// MCI
#define MCIERROR DWORD
#define MCIDEVICEID UINT
IMPORT WINMM FUNCTION BOOL mciExecute(LPCSTR cCmd ) // obsolete
IMPORT WINMM FUNCTION BOOL mciSendStringA(LPCSTR lpstrCommand, LPSTR lpstrReturnString, UINT uReturnLength, HWND hwndCallback) AS mciSendString
IMPORT WINMM FUNCTION BOOL sndPlaySoundA(LPCSTR pszSound, UINT fuSound) AS sndPlaySound
IMPORT WINMM FUNCTION MCIERROR mciSendCommandA(MCIDEVICEID mciId, UINT uMsg, DWORD dwParam1, DWORD dwParam2) AS mciSendCommand
IMPORT WINMM FUNCTION MCIDEVICEID mciGetDeviceIDA(LPCSTR pszDevice) AS mciGetDeviceID
IMPORT WINMM FUNCTION MCIDEVICEID mciGetDeviceIDFromElementIDA(DWORD dwElementID, LPCSTR lpstrType ) AS mciGetDeviceIDFromElementID
IMPORT WINMM FUNCTION BOOL mciGetErrorStringA(MCIERROR mcierr, LPSTR pszText, UINT cchText) AS mciGetErrorString
// SPOOLER
IMPORT WINSPOOL FUNCTION BOOL ClosePrinter( HANDLE hPrinter )
IMPORT WINSPOOL FUNCTION BOOL EndDocPrinter(HANDLE hPrinter)
IMPORT WINSPOOL FUNCTION BOOL EndPagePrinter(HANDLE hPrinter)
Un saludo,
<antonio.ortega@puentelibros.com> escribió en el mensaje news:424a8e23$[email=1@ozsrv2.ozlan.local...]1@ozsrv2.ozlan.local...[/email]
> En FW para llamar a una funcion dentro de una DLL de windows poniamos DLL32
> Function NombredeLafuncion ( parametros ), como lo debo hacer con Xailer ?.
>
> GPA.
>
> Antonio F. Ortega
>
>
--
Ignacio Ortiz de Zúñiga
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
antonio.ortega
Mensajes: 124
Registrado: Mié May 17, 2006 10:50 am

LLamadas a Funciones del API

Mensaje por antonio.ortega »

Vale. Gracias Ignacio.
Antonio F. Ortega
--
Responder