Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

On the Internet, nobody knows you're a dog. -- Cartoon caption


devel / comp.lang.xharbour / bcc64 - no DllCall() function in RTL library

SubjectAuthor
* bcc64 - no DllCall() function in RTL libraryPiotr
`* Re: bcc64 - no DllCall() function in RTL libraryEnrico Maria Giordano
 `* Re: bcc64 - no DllCall() function in RTL libraryPiotr
  `* Re: bcc64 - no DllCall() function in RTL libraryEnrico Maria Giordano
   `* Re: bcc64 - no DllCall() function in RTL libraryPiotr
    `- Re: bcc64 - no DllCall() function in RTL libraryEnrico Maria Giordano

1
bcc64 - no DllCall() function in RTL library

<ff6fb2c3-8873-4e79-911b-3273b533fc5dn@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17176&group=comp.lang.xharbour#17176

  copy link   Newsgroups: comp.lang.xharbour
X-Received: by 2002:a37:c40c:0:b0:705:af79:c22e with SMTP id d12-20020a37c40c000000b00705af79c22emr623700qki.674.1673529350156;
Thu, 12 Jan 2023 05:15:50 -0800 (PST)
X-Received: by 2002:a5b:208:0:b0:702:1135:a891 with SMTP id
z8-20020a5b0208000000b007021135a891mr9344684ybl.116.1673529349817; Thu, 12
Jan 2023 05:15:49 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.xharbour
Date: Thu, 12 Jan 2023 05:15:49 -0800 (PST)
Injection-Info: google-groups.googlegroups.com; posting-host=31.172.186.130; posting-account=kUi2zAoAAACx_cZ5d-lWU5av_9dr7Jg9
NNTP-Posting-Host: 31.172.186.130
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <ff6fb2c3-8873-4e79-911b-3273b533fc5dn@googlegroups.com>
Subject: bcc64 - no DllCall() function in RTL library
From: psibarg@gmail.com (Piotr)
Injection-Date: Thu, 12 Jan 2023 13:15:50 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1390
 by: Piotr - Thu, 12 Jan 2023 13:15 UTC

I try to move my 32bit application to 64bit and first problem I found there is no DllCall() function in rtl.a ? (last binaries from xharbour.org)
(no problem with other functions in RTL library)
linker error is:
Turbo Incremental Link64 6.75 Copyright (c) 1997-2016 Embarcadero Technologies, Inc.
Error: Unresolved external 'HB_FUN_DLLCALL' referenced from ...

has anyone had a similar problem ?

Re: bcc64 - no DllCall() function in RTL library

<tpp2qk$19een$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17177&group=comp.lang.xharbour#17177

  copy link   Newsgroups: comp.lang.xharbour
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: e.m.giordano@emagsoftware.it (Enrico Maria Giordano)
Newsgroups: comp.lang.xharbour
Subject: Re: bcc64 - no DllCall() function in RTL library
Date: Thu, 12 Jan 2023 14:43:50 +0100
Organization: A noiseless patient Spider
Lines: 30
Message-ID: <tpp2qk$19een$1@dont-email.me>
References: <ff6fb2c3-8873-4e79-911b-3273b533fc5dn@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 12 Jan 2023 13:43:48 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="451df78e6ba5636d5cb3e5c40d0541dc";
logging-data="1358295"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/RG32IhM8kOZqrDaD9nDye"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.6.1
Cancel-Lock: sha1:xZ0Zo+d9PLYksXkb7mtxMqiLiI8=
In-Reply-To: <ff6fb2c3-8873-4e79-911b-3273b533fc5dn@googlegroups.com>
 by: Enrico Maria Giordan - Thu, 12 Jan 2023 13:43 UTC

Il 12/01/2023 14:15, Piotr ha scritto:

> I try to move my 32bit application to 64bit and first problem I found there is no DllCall() function in rtl.a ? (last binaries from xharbour.org)
> (no problem with other functions in RTL library)
> linker error is:
> Turbo Incremental Link64 6.75 Copyright (c) 1997-2016 Embarcadero Technologies, Inc.
> Error: Unresolved external 'HB_FUN_DLLCALL' referenced from ...
>
> has anyone had a similar problem ?

Yes, the module dllcall.c is excluded (I don't know why) from 64 bit
builds due to the NODLL symbol that is defined in common3.mak:

!if ("$(HB_ARCH)"=="64")
CC_DEFINES =-DHB_OS_WIN_64 -DNODLL $(CC_DEFINES)
HARBOURFLAGS =-dNODLL $(HARBOURFLAGS)
!endif

I could remove it but I am afraid of the consequences.

--
Enrico Maria Giordano

http://www.emagsoftware.it
http://www.emagsoftware.it/emgmusic
http://www.emagsoftware.it/spectrum
http://www.emagsoftware.it/tbosg

Re: bcc64 - no DllCall() function in RTL library

<1c023f46-8755-4e2c-b969-34a0468dcc06n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17178&group=comp.lang.xharbour#17178

  copy link   Newsgroups: comp.lang.xharbour
X-Received: by 2002:a05:6214:2f07:b0:531:ce85:c6e8 with SMTP id od7-20020a0562142f0700b00531ce85c6e8mr1825497qvb.40.1673539319515;
Thu, 12 Jan 2023 08:01:59 -0800 (PST)
X-Received: by 2002:a5b:ce:0:b0:7c8:8925:2d67 with SMTP id d14-20020a5b00ce000000b007c889252d67mr296548ybp.372.1673539319314;
Thu, 12 Jan 2023 08:01:59 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.xharbour
Date: Thu, 12 Jan 2023 08:01:59 -0800 (PST)
In-Reply-To: <tpp2qk$19een$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=31.172.186.130; posting-account=kUi2zAoAAACx_cZ5d-lWU5av_9dr7Jg9
NNTP-Posting-Host: 31.172.186.130
References: <ff6fb2c3-8873-4e79-911b-3273b533fc5dn@googlegroups.com> <tpp2qk$19een$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <1c023f46-8755-4e2c-b969-34a0468dcc06n@googlegroups.com>
Subject: Re: bcc64 - no DllCall() function in RTL library
From: psibarg@gmail.com (Piotr)
Injection-Date: Thu, 12 Jan 2023 16:01:59 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1522
 by: Piotr - Thu, 12 Jan 2023 16:01 UTC

Thanks for explanation,
I tried to compile dllcall.c from source but no success, bcc32 compiles it OK but bcc64 not, this file does not want to compile for 64bit - some errors in ASM inserts,
unfortunately I do not know assembler and C so well to solve these problems, my failure, maybe this file was removed from the RTL library because it is not converted to 64bit, who knows...

Re: bcc64 - no DllCall() function in RTL library

<tppi8q$1b61s$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17179&group=comp.lang.xharbour#17179

  copy link   Newsgroups: comp.lang.xharbour
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: e.m.giordano@emagsoftware.it (Enrico Maria Giordano)
Newsgroups: comp.lang.xharbour
Subject: Re: bcc64 - no DllCall() function in RTL library
Date: Thu, 12 Jan 2023 19:07:24 +0100
Organization: A noiseless patient Spider
Lines: 46
Message-ID: <tppi8q$1b61s$1@dont-email.me>
References: <ff6fb2c3-8873-4e79-911b-3273b533fc5dn@googlegroups.com>
<tpp2qk$19een$1@dont-email.me>
<1c023f46-8755-4e2c-b969-34a0468dcc06n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 12 Jan 2023 18:07:22 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="451df78e6ba5636d5cb3e5c40d0541dc";
logging-data="1415228"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18kC2cLkn8Hpty0X65O1H9O"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.6.1
Cancel-Lock: sha1:y7wJG/zpIbIWqSnzsp5KKmNT5EY=
In-Reply-To: <1c023f46-8755-4e2c-b969-34a0468dcc06n@googlegroups.com>
 by: Enrico Maria Giordan - Thu, 12 Jan 2023 18:07 UTC

Il 12/01/2023 17:01, Piotr ha scritto:

> Thanks for explanation,
> I tried to compile dllcall.c from source but no success, bcc32 compiles it OK but bcc64 not, this file does not want to compile for 64bit - some errors in ASM inserts,
> unfortunately I do not know assembler and C so well to solve these problems, my failure, maybe this file was removed from the RTL library because it is not converted to 64bit, who knows...

You can drop all of this and use Windows API only. This is a sample that
work with MSC64 and BCC64:

FUNCTION MAIN()

SHELLEXECUTE( 0, 0, "calc.exe", 0, 0, 1 )

RETURN NIL

#pragma BEGINDUMP

#include "windows.h"
#include "hbapi.h"

HB_FUNC( SHELLEXECUTE )
{ HMODULE hDll = LoadLibrary( "shell32.dll" );

FARPROC pFunc = GetProcAddress( hDll, "ShellExecuteA" );

hb_retnl( ( LONG ) ( *pFunc ) ( hb_parnl( 1 ), hb_parc( 2 ),
hb_parc( 3 ), hb_parc( 4 ), hb_parc( 5 ), hb_parnl( 6 ) ) );

FreeLibrary( hDll );
}

#pragma ENDDUMP

--
Enrico Maria Giordano

http://www.emagsoftware.it
http://www.emagsoftware.it/emgmusic
http://www.emagsoftware.it/spectrum
http://www.emagsoftware.it/tbosg

Re: bcc64 - no DllCall() function in RTL library

<bed4e478-b60a-42d6-ba3d-a6f24d5edcb8n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17246&group=comp.lang.xharbour#17246

  copy link   Newsgroups: comp.lang.xharbour
X-Received: by 2002:a37:b007:0:b0:732:9519:a068 with SMTP id z7-20020a37b007000000b007329519a068mr105913qke.36.1676479890935;
Wed, 15 Feb 2023 08:51:30 -0800 (PST)
X-Received: by 2002:a81:e94c:0:b0:527:81c8:8b87 with SMTP id
e12-20020a81e94c000000b0052781c88b87mr391509ywm.116.1676479890599; Wed, 15
Feb 2023 08:51:30 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.xharbour
Date: Wed, 15 Feb 2023 08:51:30 -0800 (PST)
In-Reply-To: <tppi8q$1b61s$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=31.172.186.130; posting-account=kUi2zAoAAACx_cZ5d-lWU5av_9dr7Jg9
NNTP-Posting-Host: 31.172.186.130
References: <ff6fb2c3-8873-4e79-911b-3273b533fc5dn@googlegroups.com>
<tpp2qk$19een$1@dont-email.me> <1c023f46-8755-4e2c-b969-34a0468dcc06n@googlegroups.com>
<tppi8q$1b61s$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <bed4e478-b60a-42d6-ba3d-a6f24d5edcb8n@googlegroups.com>
Subject: Re: bcc64 - no DllCall() function in RTL library
From: psibarg@gmail.com (Piotr)
Injection-Date: Wed, 15 Feb 2023 16:51:30 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Piotr - Wed, 15 Feb 2023 16:51 UTC

sorry I didn't reply sooner but I had a lot of other problems related to migrating to 64bit and left it for last, unfortunately your proposal does not replace dllcall() because shellexecute() is more for running EXE than for using functions from DLL.
Since I couldn't handle the asm inserts in dllcall.c I used the hb_dynCall function from Harbor -> hbdyn.c after adapting the missing functions from strapi.c and eliminating UTF16 support I now have the dllcall() function working
best regards

Re: bcc64 - no DllCall() function in RTL library

<tsj8sv$2v5ln$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=17247&group=comp.lang.xharbour#17247

  copy link   Newsgroups: comp.lang.xharbour
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: e.m.giordano@emagsoftware.it (Enrico Maria Giordano)
Newsgroups: comp.lang.xharbour
Subject: Re: bcc64 - no DllCall() function in RTL library
Date: Wed, 15 Feb 2023 19:39:27 +0100
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <tsj8sv$2v5ln$1@dont-email.me>
References: <ff6fb2c3-8873-4e79-911b-3273b533fc5dn@googlegroups.com>
<tpp2qk$19een$1@dont-email.me>
<1c023f46-8755-4e2c-b969-34a0468dcc06n@googlegroups.com>
<tppi8q$1b61s$1@dont-email.me>
<bed4e478-b60a-42d6-ba3d-a6f24d5edcb8n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 15 Feb 2023 18:39:27 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="acdd8b505270903b1f70015be1916130";
logging-data="3118775"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18a6vsXR6wlXFBWmtISqxkG"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.7.2
Cancel-Lock: sha1:69ia1sATObaPeUHc+gV6KMQ30Go=
In-Reply-To: <bed4e478-b60a-42d6-ba3d-a6f24d5edcb8n@googlegroups.com>
 by: Enrico Maria Giordan - Wed, 15 Feb 2023 18:39 UTC

Il 15/02/2023 17:51, Piotr ha scritto:

> sorry I didn't reply sooner but I had a lot of other problems related to migrating to 64bit and left it for last, unfortunately your proposal does not replace dllcall() because shellexecute() is more for running EXE than for using functions from DLL.
> Since I couldn't handle the asm inserts in dllcall.c I used the hb_dynCall function from Harbor -> hbdyn.c after adapting the missing functions from strapi.c and eliminating UTF16 support I now have the dllcall() function working

That was only an example. You can write anything you want in the C code
part.

--
Enrico Maria Giordano

http://www.emagsoftware.it
http://www.emagsoftware.it/emgmusic
http://www.emagsoftware.it/spectrum
http://www.emagsoftware.it/tbosg

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor