Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  nodelist  faq  login

Disk crisis, please clean up!


programming / comp.lang.smalltalk.dolphin / External Interfacing how to call a method from a function table from a pointer given

SubjectAuthor
* External Interfacing how to call a method from a function table fromZenchess
`- Re: External Interfacing how to call a method from a function tablecit...@gmail.com

1
Subject: External Interfacing how to call a method from a function table from a pointer given
From: Zenchess
Newsgroups: comp.lang.smalltalk.dolphin
Date: Sat, 22 Aug 2020 04:09 UTC
X-Received: by 2002:a05:620a:1325:: with SMTP id p5mr5646544qkj.357.1598069377765;
Fri, 21 Aug 2020 21:09:37 -0700 (PDT)
X-Received: by 2002:a9d:7349:: with SMTP id l9mr4321482otk.341.1598069377410;
Fri, 21 Aug 2020 21:09:37 -0700 (PDT)
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.smalltalk.dolphin
Date: Fri, 21 Aug 2020 21:09:37 -0700 (PDT)
Complaints-To: groups-abuse@google.com
Injection-Info: google-groups.googlegroups.com; posting-host=2600:8804:1207:1200:fc28:c68d:4ed4:6bec;
posting-account=r2EEkwoAAADz3M0x3Szspui4wqseZF5h
NNTP-Posting-Host: 2600:8804:1207:1200:fc28:c68d:4ed4:6bec
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <60bf78b0-f71e-4464-86b0-576e67783c1en@googlegroups.com>
Subject: External Interfacing how to call a method from a function table from
a pointer given
From: zench...@gmail.com (Zenchess)
Injection-Date: Sat, 22 Aug 2020 04:09:37 +0000
Content-Type: text/plain; charset="UTF-8"
View all headers
I am trying to use the openvr c api to get my "game engine" into VR.  I am calling the method
S_API intptr_t VR_GetGenericInterface( const char *pchInterfaceVersion, EVRInitError *peError );

So I guess I'm getting a pointer to an ivr system interface with a function table.  I am trying to call the first method on that functable:

struct VR_IVRSystem_FnTable
{
void (OPENVR_FNTABLE_CALLTYPE *GetRecommendedRenderTargetSize)(uint32_t * pnWidth, uint32_t * pnHeight);

Any idea how to call this method?  I seem to be getting the IVR system correctly and have made an externalstructure for it, but everything I've tried to call the method has failed so far. 


Subject: Re: External Interfacing how to call a method from a function table from a pointer given
From: cit...@gmail.com
Newsgroups: comp.lang.smalltalk.dolphin
Date: Sun, 23 Aug 2020 10:34 UTC
References: 1
X-Received: by 2002:ac8:6f51:: with SMTP id n17mr565246qtv.233.1598178851646;
Sun, 23 Aug 2020 03:34:11 -0700 (PDT)
X-Received: by 2002:aca:efc6:: with SMTP id n189mr464471oih.80.1598178851405;
Sun, 23 Aug 2020 03:34:11 -0700 (PDT)
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.smalltalk.dolphin
Date: Sun, 23 Aug 2020 03:34:11 -0700 (PDT)
In-Reply-To: <60bf78b0-f71e-4464-86b0-576e67783c1en@googlegroups.com>
Complaints-To: groups-abuse@google.com
Injection-Info: google-groups.googlegroups.com; posting-host=109.237.106.254; posting-account=1vJ2SwoAAAD0KhPjvY-nOtgTUjN2duAj
NNTP-Posting-Host: 109.237.106.254
References: <60bf78b0-f71e-4464-86b0-576e67783c1en@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <3c891220-91e7-4d70-9855-7646280986fen@googlegroups.com>
Subject: Re: External Interfacing how to call a method from a function table
from a pointer given
From: citr...@gmail.com (cit...@gmail.com)
Injection-Date: Sun, 23 Aug 2020 10:34:11 +0000
Content-Type: text/plain; charset="UTF-8"
View all headers
Hi,  Zenchess

Please, take a look here:
https://groups.google.com/g/comp.lang.smalltalk.dolphin/c/hgrMr7_6Xhc/m/-nMO9MFUBQAJ
I had a similar task


1
rocksolid light 0.7.2
clearneti2ptor