Search found 340 matches: loadlibrary

Searched query: loadlibrary

by richard-service
Tue Jan 21, 2025 4:52 am
Forum: FiveWin for Harbour/xHarbour
Topic: How to convert LIB from .NET dll file
Replies: 2
Views: 5902

Re: How to convert LIB from .NET dll file

... instance->MyMethod(param);
}
// C Application
#include <windows.h>

typedef int (*CallDotNetFunction)(int);

int main() {
HMODULE hDll = LoadLibrary("Wrapper.dll");
CallDotNetFunction func = (CallDotNetFunction)GetProcAddress(hDll, "CallDotNetFunction");

int result = func(42 ...
by Antonio Linares
Sun Jan 19, 2025 7:12 pm
Forum: FiveWin for Harbour/xHarbour
Topic: How to convert LIB from .NET dll file
Replies: 2
Views: 5902

Re: How to convert LIB from .NET dll file

... instance->MyMethod(param);
}
// C Application
#include <windows.h>

typedef int (*CallDotNetFunction)(int);

int main() {
HMODULE hDll = LoadLibrary("Wrapper.dll");
CallDotNetFunction func = (CallDotNetFunction)GetProcAddress(hDll, "CallDotNetFunction");

int result = func(42 ...
by ShumingWang
Tue Oct 15, 2024 1:45 am
Forum: FiveWin for Harbour/xHarbour
Topic: How to add 2d barcode to fastreport or fwh/harbour?
Replies: 7
Views: 1326

Re: How to add 2d barcode to fastreport or fwh/harbour?

1.
FUNCTION img2dbarcode()
local h2d
private hlib
hLib = LOADLIBRARY( "zint.dll" )

h2d:=ZBarcode_Create()
//// h2d should has datas: symbology,height,width,bitmap,...
?h2d:symbology
// error: method symbology does not exsist

ZBarcode_Encode_and_buffer(h2d,"abc45",5,0)
//error: will hangup ...
by GUSPRE
Mon Apr 01, 2024 3:38 pm
Forum: FiveWin for Harbour/xHarbour
Topic: Error Usando LoadLib32 o LoadLib - Retorno Puntero
Replies: 3
Views: 1195

Error Usando LoadLib32 o LoadLib - Retorno Puntero

... esto provoca que al llamar a las funciones internas de las DLL estas arrojen error.

He probado con los samples que vienen en FWH (Que usan LoadLibrary or LoadLib32) y hacen lo mismo , por ejemplo EMF.PRG
Error

Time from start: 0 hours 0 mins 0 secs
Error occurred at: 04/01/24, 11:43:31 ...
by Antonio Linares
Tue Feb 13, 2024 11:20 am
Forum: FiveWin for Harbour/xHarbour
Topic: RC to PRG generator
Replies: 23
Views: 3549

Re: RC to PRG generator

... for it:
simply rename your RC file as rctoprg.rc and build rctoprg.prg

If you keep your dialogs inside a DLL then replace GetInstance() for LoadLibrary( "yourdll.dll" )

This example and the new C code listed at the bottom will be included in next FWH build.

rctoprg.prg
#include "FiveWin.ch ...
by Antonio Linares
Thu Dec 21, 2023 10:51 am
Forum: FiveWin for Harbour/xHarbour
Topic: Using Microsoft AI Phi-2 from FWH
Replies: 51
Views: 16154

Re: Using Microsoft AI Phi-2 from FWH

hi Antonio,

Could you kindly adapt this code to HMG ?

i´m not sure about "Callback" under HMG

will FWH CODE work when "LoadLibrary", "llama64.dll" or do i need DLL FUNCTION :?:

Dear Jimmy,

Does HMG support DLL FUNCTION ? or similar ? Or should we use Harbour default DLL management functions ...
by Jimmy
Thu Dec 21, 2023 10:26 am
Forum: FiveWin for Harbour/xHarbour
Topic: Using Microsoft AI Phi-2 from FWH
Replies: 51
Views: 16154

Re: Using Microsoft AI Phi-2 from FWH

hi Antonio,
Antonio Linares wrote: Could you kindly adapt this code to HMG ?
i´m not sure about "Callback" under HMG

will FWH CODE work when "LoadLibrary", "llama64.dll" or do i need DLL FUNCTION :?:
by Garbi
Thu Oct 19, 2023 4:51 pm
Forum: FiveWin para Harbour/xHarbour
Topic: PDF en aplicacion con RICHEDIT
Replies: 13
Views: 1702

Re: PDF en aplicacion con RICHEDIT

... 5.40
Copyright (c) 1990, 1999 Inprise Corporation. All rights reserved.
Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
Fatal: Unable to open file 'GDIPLUS.LIB'
* Linking errors *


Ademas si esta libreria : LoadLibrary( "riched20.dll" ) debe de estar en la carpeta de fwh\samples, no esta
by Antonio Linares
Tue Aug 08, 2023 4:07 am
Forum: FiveWin for Harbour/xHarbour
Topic: xHarbour Commercial and latest FWH
Replies: 3
Views: 676

Re: xHarbour Commercial and latest FWH

Dear Randal,

xHarbour provides a function LoadLibrary() that returns a pointer, thats why we modified dll.ch to check if a pointer is returned and then we turn it into a number.

When you link FWH dll.c then you are using FWH LoadLibrary() that retuns a number and everything is correct.

So, again ...
by Randal
Mon Aug 07, 2023 5:03 pm
Forum: FiveWin for Harbour/xHarbour
Topic: xHarbour Commercial and latest FWH
Replies: 3
Views: 676

Re: xHarbour Commercial and latest FWH

I put together a small test and if works fine with Fivewin and Harbour (Borland) but not xBuilder/xHarbour.

The problem is with LoadLibrary, this function returns a pointer instead of a numeric value.

I'm linking these libs:

\fwh\lib\xfw.lib
\xhb\lib\xHBZIP.LIB
\xhb\lib\xHBZipDll.lib
\xhb\c_lib\win ...
by Randal
Sat Aug 05, 2023 2:06 am
Forum: FiveWin for Harbour/xHarbour
Topic: xHarbour Commercial and latest FWH
Replies: 3
Views: 676

xHarbour Commercial and latest FWH

... however, I'm getting an error in a particular function.

I'm using a 3rd party lib for emailing. This is the code in question:

hSmtp := LoadLibrary("CSMTPAV9.dll")
// Must initialize first. Should return true
lSmtpInit := SmtpInitialize(CSTOOLS9_LICENSE_KEY)

DLL FUNCTION SmtpInitialize ...
by jpcavagnaro
Wed Apr 26, 2023 8:13 am
Forum: FiveWin for Harbour/xHarbour
Topic: Error al leer un dll
Replies: 19
Views: 3435

Re: Error al leer un dll

Hola Antonio, el error lo tengo en el loadllibrary, lo que devuelve:

hDll := LoadLibrary( "winfis32.dll" )

el hDll = 0x0000000 si la librería existe o 0x0 si no existe, en lugar de devolver 0 si es correcto o el -1

Saludos
Jorge

Si hDLL vale cero (da igual que esté escrito en hexadecimal ...
by jpcavagnaro
Mon Apr 24, 2023 11:44 am
Forum: FiveWin for Harbour/xHarbour
Topic: Error al leer un dll
Replies: 19
Views: 3435

Re: Error al leer un dll

jpcavagnaro wrote:Hola Antonio, el error lo tengo en el loadllibrary, lo que devuelve:

hDll := LoadLibrary( "winfis32.dll" )

el hDll = 0x0000000 si la librería existe o 0x0 si no existe, en lugar de devolver 0 si es correcto o el -1

Saludos
Jorge
by Antonio Linares
Sat Apr 22, 2023 1:49 pm
Forum: FiveWin for Harbour/xHarbour
Topic: Error al leer un dll
Replies: 19
Views: 3435

Re: Error al leer un dll

Hola Antonio, el error lo tengo en el loadllibrary, lo que devuelve:

hDll := LoadLibrary( "winfis32.dll" )

el hDll = 0x0000000 si la librería existe o 0x0 si no existe, en lugar de devolver 0 si es correcto o el -1

Saludos
Jorge

Si hDLL vale cero (da igual que esté escrito en hexadecimal ...
by jpcavagnaro
Sat Apr 22, 2023 11:35 am
Forum: FiveWin for Harbour/xHarbour
Topic: Error al leer un dll
Replies: 19
Views: 3435

Re: Error al leer un dll

Hola Antonio, el error lo tengo en el loadllibrary, lo que devuelve:

hDll := LoadLibrary( "winfis32.dll" )

el hDll = 0x0000000 si la librería existe o 0x0 si no existe, en lugar de devolver 0 si es correcto o el -1

Saludos
Jorge