Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

System checkpoint complete.


devel / comp.os.ms-windows.programmer.win32 / OCX returning a variable number of variants ?

SubjectAuthor
* OCX returning a variable number of variants ?R.Wieser
+- Re: OCX returning a variable number of variants ? - updateR.Wieser
`* Re: OCX returning a variable number of variants ?JJ
 `* Re: OCX returning a variable number of variants ?R.Wieser
  `* Re: OCX returning a variable number of variants ?JJ
   `- Re: OCX returning a variable number of variants ?R.Wieser

1
OCX returning a variable number of variants ?

<sr9t0a$6ue$1@gioia.aioe.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=277&group=comp.os.ms-windows.programmer.win32#277

  copy link   Newsgroups: comp.os.ms-windows.programmer.win32
Path: i2pn2.org!i2pn.org!aioe.org!BHGTVyTGRwF2ntnqLVfpDg.user.46.165.242.75.POSTED!not-for-mail
From: address@not.available (R.Wieser)
Newsgroups: comp.os.ms-windows.programmer.win32
Subject: OCX returning a variable number of variants ?
Date: Fri, 7 Jan 2022 18:19:50 +0100
Organization: Aioe.org NNTP Server
Lines: 31
Message-ID: <sr9t0a$6ue$1@gioia.aioe.org>
Injection-Info: gioia.aioe.org; logging-data="7118"; posting-host="BHGTVyTGRwF2ntnqLVfpDg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-MSMail-Priority: Normal
X-Notice: Filtered by postfilter v. 0.9.2
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-RFC2646: Format=Flowed; Original
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-Priority: 3
 by: R.Wieser - Fri, 7 Jan 2022 17:19 UTC

Hello all,

I've written a method which, using VBScript, accepts a variable number of
arguments, which is described in the IDL as follows :

[vararg] HRESULT Put([in] SAFEARRAY(VARIANT) aList);

But now I want to do the reverse. Call a method with a variable number of
variants and have the called method fill them in.

To be clear about it :

1) I do /not/ want to return a fixed number of results.

2) I do /not/ want the method to return an array and than pick my results
outof that array.

IOW, I want to be able to use :

Put(Var1,Var2,Var3, ...) '<-- This already works

and than :

Get(Var1,Var2,Var3, ...)

Question : is what I'm after at all possible ?

Regards,
Rudy Wieser

Re: OCX returning a variable number of variants ? - update

<sra0tr$aiq$1@gioia.aioe.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=278&group=comp.os.ms-windows.programmer.win32#278

  copy link   Newsgroups: comp.os.ms-windows.programmer.win32
Path: i2pn2.org!i2pn.org!aioe.org!BHGTVyTGRwF2ntnqLVfpDg.user.46.165.242.75.POSTED!not-for-mail
From: address@not.available (R.Wieser)
Newsgroups: comp.os.ms-windows.programmer.win32
Subject: Re: OCX returning a variable number of variants ? - update
Date: Fri, 7 Jan 2022 19:30:57 +0100
Organization: Aioe.org NNTP Server
Lines: 26
Message-ID: <sra0tr$aiq$1@gioia.aioe.org>
References: <sr9t0a$6ue$1@gioia.aioe.org>
Injection-Info: gioia.aioe.org; logging-data="10842"; posting-host="BHGTVyTGRwF2ntnqLVfpDg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-MSMail-Priority: Normal
X-Notice: Filtered by postfilter v. 0.9.2
X-Priority: 3
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-RFC2646: Format=Flowed; Response
 by: R.Wieser - Fri, 7 Jan 2022 18:30 UTC

> But now I want to do the reverse. Call a method with a variable number
> of variants and have the called method fill them in.

The answer ofcourse popped into my mind mere minutes after having posted the
question :

[vararg] HRESULT Get([in,out] SAFEARRAY(VARIANT)* aList);

The called method does show the contents of the supplied variants.

But I've ran into the next problem : when I now use SafeArrayPutElement (to
return some values) I do not see it back in the variant(s) I supplied to the
method.

Most likely this is because the contents of the SafeArray are ByRef, and (I
think) I'm putting the data into the array ByVal - and thus not into the
supplied (ByRef) variant(s).

Hmmm ... Anyone have an idea for me ?

Regards,
Rudy Wieser

Re: OCX returning a variable number of variants ?

<wpmm212047t9.1lgw5l6qh6gup$.dlg@40tude.net>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=279&group=comp.os.ms-windows.programmer.win32#279

  copy link   Newsgroups: comp.os.ms-windows.programmer.win32
Path: i2pn2.org!i2pn.org!aioe.org!hguIa9TnryNnV8d2snYOIg.user.46.165.242.91.POSTED!not-for-mail
From: jj4public@gmail.com (JJ)
Newsgroups: comp.os.ms-windows.programmer.win32
Subject: Re: OCX returning a variable number of variants ?
Date: Sat, 8 Jan 2022 13:09:50 +0700
Organization: Aioe.org NNTP Server
Message-ID: <wpmm212047t9.1lgw5l6qh6gup$.dlg@40tude.net>
References: <sr9t0a$6ue$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="2076"; posting-host="hguIa9TnryNnV8d2snYOIg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: 40tude_Dialog/2.0.15.84
X-Face: \*\`0(1j~VfYC>ebz[&O.]=,Nm\oRM{of,liRO#7Eqi4|!]!(Gs=Akgh{J)605>C9Air?pa d{sSZ09u+A7f<^paR"/NH_#<mE1S"hde\c6PZLUB[t/s5-+Iu5DSc?P0+4%,Hl
X-Bitcoin: 1LcqwCQBQmhcWfWsVEAeyLchkAY8ZfuMnS
X-Notice: Filtered by postfilter v. 0.9.2
 by: JJ - Sat, 8 Jan 2022 06:09 UTC

On Fri, 7 Jan 2022 18:19:50 +0100, R.Wieser wrote:
> Hello all,
>
> I've written a method which, using VBScript, accepts a variable number of
> arguments, which is described in the IDL as follows :
>
> [vararg] HRESULT Put([in] SAFEARRAY(VARIANT) aList);
>
> But now I want to do the reverse. Call a method with a variable number of
> variants and have the called method fill them in.
>
> To be clear about it :
>
> 1) I do /not/ want to return a fixed number of results.
>
> 2) I do /not/ want the method to return an array and than pick my results
> outof that array.
>
> IOW, I want to be able to use :
>
> Put(Var1,Var2,Var3, ...) '<-- This already works
>
> and than :
>
> Get(Var1,Var2,Var3, ...)
>
> Question : is what I'm after at all possible ?
>
> Regards,
> Rudy Wieser

I haven't seen any programming language whose function can actually return
multiple values without placing them in some kind of a container or an
interface.

Re: OCX returning a variable number of variants ?

<srbjnk$1eg6$1@gioia.aioe.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=280&group=comp.os.ms-windows.programmer.win32#280

  copy link   Newsgroups: comp.os.ms-windows.programmer.win32
Path: i2pn2.org!i2pn.org!aioe.org!BHGTVyTGRwF2ntnqLVfpDg.user.46.165.242.75.POSTED!not-for-mail
From: address@not.available (R.Wieser)
Newsgroups: comp.os.ms-windows.programmer.win32
Subject: Re: OCX returning a variable number of variants ?
Date: Sat, 8 Jan 2022 09:58:00 +0100
Organization: Aioe.org NNTP Server
Lines: 38
Message-ID: <srbjnk$1eg6$1@gioia.aioe.org>
References: <sr9t0a$6ue$1@gioia.aioe.org> <wpmm212047t9.1lgw5l6qh6gup$.dlg@40tude.net>
Injection-Info: gioia.aioe.org; logging-data="47622"; posting-host="BHGTVyTGRwF2ntnqLVfpDg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-MSMail-Priority: Normal
X-Notice: Filtered by postfilter v. 0.9.2
X-RFC2646: Format=Flowed; Original
X-Priority: 3
 by: R.Wieser - Sat, 8 Jan 2022 08:58 UTC

JJ,

> I haven't seen any programming language whose function can actually
> return multiple values without placing them in some kind of a container
> or an interface.

:-) As you might know I mostly write Assembly. In it returning multiple
results is as easy as supplying pointers to the respective "variables"
(read: memory areas) to a function.

Or, as it is called in several programming languages, providing the argument
"by reference" (instead of the more common "by value").

Ofcourse, there has been a great push to banish "by reference" arguments, as
its is much harder to prove that programs which use them do not have
un-intended side effects (at least, that is what I've been told by someone
who studied for it).

But as a quick test I just tried this method :

HRESULT GetTest(out] variant* var1,[out] variant* var2);

and it works fine.

IOW, thats the second language you now know which can do it. p :-)

-- but --

It turns out I made a simple mistake, making it /look/ as if my OCX didn't
work : while I provided three different variables I displayed the first one
twice followed by the third one. And as I test-stored my result in the
second variable ... :-|

Regards,
Rudy Wieser

Re: OCX returning a variable number of variants ?

<uob08vpagi8a.14gppws1rdebt$.dlg@40tude.net>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=281&group=comp.os.ms-windows.programmer.win32#281

  copy link   Newsgroups: comp.os.ms-windows.programmer.win32
Path: i2pn2.org!i2pn.org!aioe.org!piTPp5g0F9ApsuFV0N1gLw.user.46.165.242.91.POSTED!not-for-mail
From: jj4public@gmail.com (JJ)
Newsgroups: comp.os.ms-windows.programmer.win32
Subject: Re: OCX returning a variable number of variants ?
Date: Sun, 9 Jan 2022 13:33:50 +0700
Organization: Aioe.org NNTP Server
Message-ID: <uob08vpagi8a.14gppws1rdebt$.dlg@40tude.net>
References: <sr9t0a$6ue$1@gioia.aioe.org> <wpmm212047t9.1lgw5l6qh6gup$.dlg@40tude.net> <srbjnk$1eg6$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="56898"; posting-host="piTPp5g0F9ApsuFV0N1gLw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: 40tude_Dialog/2.0.15.84
X-Notice: Filtered by postfilter v. 0.9.2
X-Bitcoin: 1LcqwCQBQmhcWfWsVEAeyLchkAY8ZfuMnS
X-Face: \*\`0(1j~VfYC>ebz[&O.]=,Nm\oRM{of,liRO#7Eqi4|!]!(Gs=Akgh{J)605>C9Air?pa d{sSZ09u+A7f<^paR"/NH_#<mE1S"hde\c6PZLUB[t/s5-+Iu5DSc?P0+4%,Hl
 by: JJ - Sun, 9 Jan 2022 06:33 UTC

On Sat, 8 Jan 2022 09:58:00 +0100, R.Wieser wrote:
> But as a quick test I just tried this method :
>
> HRESULT GetTest(out] variant* var1,[out] variant* var2);
>
> and it works fine.
>
> IOW, thats the second language you now know which can do it. p :-)

Functions' out arguments are just pointers to a buffer for the function to
fill. They're not the function's return value. That function's return value
is the HRESULT. They're all function results. But only one is the function
return return value.

Re: OCX returning a variable number of variants ?

<sre7mf$2ab$1@gioia.aioe.org>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=282&group=comp.os.ms-windows.programmer.win32#282

  copy link   Newsgroups: comp.os.ms-windows.programmer.win32
Path: i2pn2.org!i2pn.org!aioe.org!BHGTVyTGRwF2ntnqLVfpDg.user.46.165.242.75.POSTED!not-for-mail
From: address@not.available (R.Wieser)
Newsgroups: comp.os.ms-windows.programmer.win32
Subject: Re: OCX returning a variable number of variants ?
Date: Sun, 9 Jan 2022 09:02:51 +0100
Organization: Aioe.org NNTP Server
Lines: 12
Message-ID: <sre7mf$2ab$1@gioia.aioe.org>
References: <sr9t0a$6ue$1@gioia.aioe.org> <wpmm212047t9.1lgw5l6qh6gup$.dlg@40tude.net> <srbjnk$1eg6$1@gioia.aioe.org> <uob08vpagi8a.14gppws1rdebt$.dlg@40tude.net>
Injection-Info: gioia.aioe.org; logging-data="2379"; posting-host="BHGTVyTGRwF2ntnqLVfpDg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-RFC2646: Format=Flowed; Original
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-Notice: Filtered by postfilter v. 0.9.2
 by: R.Wieser - Sun, 9 Jan 2022 08:02 UTC

JJ,

> Functions' out arguments are just pointers to a buffer for the function
> to fill.

Indeed. And that is what I was asking for : "and have the called method
*fill them in*" (bolding mine).

Regards,
Rudy Wieser

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor