🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.os.ms-windows.programmer.controls
3 messages
3 total messages Started by Ken Shaner Sun, 07 Apr 1996 04:09
calling files from DLL's
#5
Author: Ken Shaner
Date: Sun, 07 Apr 1996 04:09
18 lines
1619 bytes
Does anyone know how to call a file from a DLL made in MS VC++ or Borland 
C++.  I can make a DLL to add integers together, but that's about it.  I 
want to use a DLL to manipulate an Array of data, or data in a file, and 
then be able to return this stuff to VB.  For instance, take and array of 
10 numbers, from a VB app, call the DLL function which adds them together 
or something, and returns the sum.  Another example would be calling the 
DLL from VB that gets 10 numbers from a text file and returns the sum.  
If these kinds of things aren't possible, or if using a DLL to do these 
things is stupid, then you can call me a moron, it wont hurt my feelings 
much.  Also, if MFC makes you happier than a pig in @#!%, then dont pick 
on me for using VB.  I think VB is easy enough for user interface.  When 
you write your response (if anyone actually reads my message this far) 
please keep in mind that I am just a Physicist trying to learn something 
new (dont spare any details unless you're really in a hurry).  Thanks for 
your patience.
Oh, and if you want to e-mail something, please mail to eas1171@sjfc.edu, 
I am not in my account, and I am not quite sure how all this newsgroup 
stuff works anyway.  - Thanks again (in advance)
Re: calling files from DLL's
#6
Author: Kazimir Kylheku
Date: Sun, 07 Apr 1996 07:31
7 lines
742 bytes
In article <4k7f69$jr6@guava.epix.net>,
Ken Shaner <kshaner@news.epix.net> wrote:
 >Does anyone know how to call a file from a DLL made in MS VC++ or Borland 
 >C++.  I can make a DLL to add integers together, but that's about it.  I 

You have to write a separate DLL for that.
-- 
Re: calling files from DLL's
#8
Author: Paul Meyer
Date: Thu, 11 Apr 1996 20:29
56 lines
3731 bytes
(followups restricted to comp.os.ms-windows.programmer.controls since
this looks more like a Windows- and VB-specific thing)

Ken Shaner wrote:
> Does anyone know how to call a file from a DLL made in MS VC++ or Borland
> C++.  I can make a DLL to add integers together, but that's about it.  I
> want to use a DLL to manipulate an Array of data, or data in a file, and
> then be able to return this stuff to VB.  For instance, take and array of
> 10 numbers, from a VB app, call the DLL function which adds them together
> or something, and returns the sum.  Another example would be calling the
> DLL from VB that gets 10 numbers from a text file and returns the sum.

I'm confused. What do you mean by "call" a file from a DLL? Read it? Write
it? ???

As for writing a DLL callable from Visual Basic, you need to export your
interface via OLE Automation. That latter is a specific thing built on the
same low-level abstraction (COM) as OLE, but designed for run-time linkage
by name, which is perfect for scripting engines and things like VB.

> If these kinds of things aren't possible, or if using a DLL to do these
> things is stupid, then you can call me a moron, it wont hurt my feelings
> much.  Also, if MFC makes you happier than a pig in @#!%, then dont pick
> on me for using VB.  I think VB is easy enough for user interface.  When
> you write your response (if anyone actually reads my message this far)
> please keep in mind that I am just a Physicist trying to learn something
> new (dont spare any details unless you're really in a hurry).  Thanks for
> your patience.

In order to write that DLL you're going to have to use a language capable
of manipulating COM interfaces. The built-in stuff that modern MFC provides
makes exporting an OLE Automation interface pretty easy--but I'm a firm
disbeliever in the popular myth that if MFC does something you can use it
as a black box instead of learning how it works.

(Lest I start a flamewar in two groups I don't frequent, yes, I do believe
in reusable, more-or-less opaque objects. But Windows is a complicated system,
and the results of people learning MFC and *believing* themselves to be
"Windows programmers" are at best annoying and at worst disastrous. If they
called themselves "MFC programmers" I wouldn't object to them as much, but I
also wouldn't hire one to do something that requires understanding the system
behind the abstraction. I hope that's clear and reasonable enough.)

> Oh, and if you want to e-mail something, please mail to eas1171@sjfc.edu,
> I am not in my account, and I am not quite sure how all this newsgroup
> stuff works anyway.  - Thanks again (in advance)

Diffidence is almost as good as knowledge, compared to some of the really
annoying things people who ignored the news.announce.newusers articles
have done. Thank *you* for being polite and trying to choose the right
newsgroups!

--
Paul Meyer        | When the Tremere ask you about your style of
pem@radmedia.com  | magic, just feel really confident and say,
pem@amurgsval.org | "These aren't the Druids you're looking for."
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads