🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.csharpbuilder.language.csharp
Article #164

Re: Passing a delegate to a DLL as a 'void *'

#164
From: Andrue Cope [TeamB]
Date: Tue, 19 Sep 2006 07:57
27 lines
1760 bytes
Marc Rohloff [TeamB] wrote:

> Why don't you the type of fsCmd.Value_VOIDS_2 to be a TCBProgress
> delegate instead?
> 

I could do but traditionally we have one structure per module (which is
why the member name is so generic).

> A common trick is to have several different structures matching the
> expected types of the fields and then overload the DLL call for each
> possible type.

Yeah, makes sense.

> Another possibility which might work is to either use type
> information to get the _methodPtr and _methodPtrAux fields or just use
> the HashCode (which currently is the same thing). Of course this is
> not guaranteed to work the same in different versions of the
> framework.

Best not to do that.

-- 
Andrue Cope [TeamB]
[Bicester, Uk]
http://info.borland.com/newsgroups/guide.html
Technical Details
Message-ID: <450fa2df$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <450e6a4a$1@newsgroups.borland.com> <xl2or5ol7j8v.dlg@dlg.marcrohloff.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 1efe35,497a94e42bdc0848
X-Google-Attributes: gid1efe35,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Andrue Cope [TeamB]" <no.spam@not.a.valid.address>
Subject: Re: Passing a delegate to a DLL as a 'void *'
Newsgroups: borland.public.csharpbuilder.language.csharp
References: <450e6a4a$1@newsgroups.borland.com> <xl2or5ol7j8v.dlg@dlg.marcrohloff.com>
User-Agent: XanaNews/1.18.1.1
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
NNTP-Posting-Host: 217.207.223.34
Message-ID: <450fa2df$1@newsgroups.borland.com>
Date: 19 Sep 2006 00:57:19 -0700
X-Trace: newsgroups.borland.com 1158652639 217.207.223.34 (19 Sep 2006 00:57:19 -0700)
Lines: 27
X-Authenticated-User: acope
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail