🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: a.bsu.programming
Article #86792

Re: VB hooking VC++

#86792
From: Alex Chacha
Date: Wed, 22 Jan 1997 00:00
33 lines
2688 bytes
Bart Torbert wrote:
> 
> In article <01bbfdae$04ae76e0$2c467cce@internetamerica.airmail.net>,
> chizl@airmail.net says...
> >
> >We want to create a VB4 16bit front end and a VC++ 1.52 16bit back end
> >program.  We want to know what is the best or the only way to do this.
> >Thoughts here are VC++ Classes and Functions are compiles as a DLL and
> then
> >called from VB objects.  Is this correct or are we completly off base..

> While I have not tried it yet(but will have to shortly) you can make VB
> call a C/C++ DLL.  The VB Manuals say how to call functions from a DLL.
> 
> There however is a catch.  VB can not call a C++ Classes directly.
> OUCH!!!!
> 
> But it can call a regular C function from a DLL.  What you have to do is
> create two DLLs. One is whatever C++ classes you need.  The other is
> straight C that then calls the C++ classes. VB calls the straight C DLL
> which then calls the C++ DLL.  Some weird plumbing here, but it does work.

Best thing to do is write a DLL that you need (with C++ objects if
needed),
then create another DLL that wraps up the methods and exports only C
functions.
This would solve the problem.  The 2nd DLL would be the intermediary to
the first,
doing object manipulation and alloction from C function calls.


...ecaeP_Alex...
Technical Details
Message-ID: <32E68B26.4C98@panix.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <01bbfdae$04ae76e0$2c467cce@internetamerica.airmail.net> <5bbnu8$qtl$4@beetle.privatei.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1032a1,dc6e85c5ade6949e
X-Google-Attributes: gid1032a1,public
X-Google-Thread: f5380,dc6e85c5ade6949e
X-Google-Attributes: gidf5380,public
X-Google-Thread: 107d8b,dc6e85c5ade6949e
X-Google-Attributes: gid107d8b,public
X-Google-Thread: fe885,dc6e85c5ade6949e
X-Google-Attributes: gidfe885,public
X-Google-Thread: 108717,dc6e85c5ade6949e
X-Google-Attributes: gid108717,public
X-Google-Thread: 10804c,dc6e85c5ade6949e
X-Google-Attributes: gid10804c,public
X-Google-Thread: 115d0d,dc6e85c5ade6949e
X-Google-Attributes: gid115d0d,public
X-Google-Thread: fc8d0,dc6e85c5ade6949e
X-Google-Attributes: gidfc8d0,public
From: Alex Chacha <achacha@panix.com>
Subject: Re: VB hooking VC++
Date: 1997/01/22
Message-ID: <32E68B26.4C98@panix.com>
X-Deja-AN: 211536541
references: <01bbfdae$04ae76e0$2c467cce@internetamerica.airmail.net> <5bbnu8$qtl$4@beetle.privatei.com>
content-type: text/plain; charset=us-ascii
organization: http://www.panix.com/~achacha
mime-version: 1.0
reply-to: achacha@panix.com
newsgroups: a.bsu.programming,adass.iraf.programming,alt.mud.programming,alt.winsock.programming,comp.os.os2.programming,comp.programming,comp.programming.contests,comp.programming.literate,comp.programming.threads,csugrad.programming.c,fj.net.programming
x-mailer: Mozilla 3.01Gold (WinNT; U)