Fivewin/Clipper/C and DLLs 
Author Message
 Fivewin/Clipper/C and DLLs

  A client is interested in converting a DOS Clipper app to Windows.
Using any number of software packages, Fivewin, Clip-4-Win, Delphi,
Visual Dbase etc, I know I can do it for him. (I currently use Fivewin
for my own stuff.)
  But... (And this is a big But)  He wants to incorporate in the same
application the ability to draw 3D CAD graphics.  Cool.  He has
requested a demo package from a C source code company that specializes
in CAD graphics and if the app were to be entirely written in C, there
wouldn't be a problem. (It may end up going that route anyhow.)
  Anyway, the deal is this: the documentation with the CAD demo says
the CAD library is available, (and I quote) as a "DOS library, Windows
Library, and a Windows DLL.  The DLL form of the library can be accessed
using any programming language that can access a Windows DLL."
  Forgive my ignorance, but I thought DLLs were merely collections of
resources, Dialog Boxes, Icons etc.   You can put compiled code in a
DLL?  Accessible by any other language?  If this is the case, it sounds
like I could create my own windows, icons, functions and so on and just
plug this sucker in, regardless of the fact that it's in C and keeps its
own linked lists of drawing objects in the background.
  Clue me in.  (And yes, I should call up the CAD company, and will.)

...Gordon.



Sun, 25 Oct 1998 03:00:00 GMT  
 Fivewin/Clipper/C and DLLs


Quote:

>  A client is interested in converting a DOS Clipper app to Windows.
>Using any number of software packages, Fivewin, Clip-4-Win, Delphi,
>Visual Dbase etc, I know I can do it for him. (I currently use Fivewin
>for my own stuff.)
>  But... (And this is a big But)  He wants to incorporate in the same
>application the ability to draw 3D CAD graphics.  Cool.  He has
>requested a demo package from a C source code company that specializes
>in CAD graphics and if the app were to be entirely written in C, there
>wouldn't be a problem. (It may end up going that route anyhow.)
>  Anyway, the deal is this: the documentation with the CAD demo says
>the CAD library is available, (and I quote) as a "DOS library, Windows
>Library, and a Windows DLL.  The DLL form of the library can be accessed
>using any programming language that can access a Windows DLL."
>  Forgive my ignorance, but I thought DLLs were merely collections of
>resources,

A DLL can also contain code.

When the DLL is loaded, a startup function in the DLL is called (the name
changes depending on if it's a 16 or 32 bit DLL), and when the DLL is
unloaded, an exit function is called.

The rest of the DLL can contain resources and/or functions.

Terry



Sun, 25 Oct 1998 03:00:00 GMT  
 Fivewin/Clipper/C and DLLs

Quote:
>   Clue me in.  (And yes, I should call up the CAD company, and will.)

> ....Gordon.

The DLL you are referring to probably contains mostly code -and this can be
accessed [by FiveWin] in two way (1) the DLL FUNCTION which is a reference to
the DLL in a Pascal format, or (2) writing your own C-wrappers for each
function-

#1 has both speed and performance problems, and if the function you wish to
use depends on other functions a lot of funky things can go wrong.

I'd take this up with Omnicron Software and John Stolte and I am confident you
will get an honest answer.

stan littlefield
BTI



Sun, 25 Oct 1998 03:00:00 GMT  
 Fivewin/Clipper/C and DLLs

Quote:

>   Forgive my ignorance, but I thought DLLs were merely collections of
> resources, Dialog Boxes, Icons etc.   You can put compiled code in a
> DLL?  Accessible by any other language?  

Yup, that is the "main use" of DLLs. DLLs can contain resources in the
same way that an EXE can contain resources, but the main point of DLLs
is to contain code and export functions for use by other programs. If
this were not the case Windows would not work. :-)

Quote:
> If this is the case, it sounds like I could create my own windows,
> icons, functions and so on and just plug this sucker in, regardless
> of the fact that it's in C and keeps its own linked lists of drawing
> objects in the background.  Clue me in.  (And yes, I should call up
> the CAD company, and will.)

In theory this would be possible, in practice, well, it will depend
on what kind of API this CAD software offers. Yes, you should call
the CAD company. :-)

--
Take a look in Hagbard's World: |     w3ng - The WWW Norton Guide reader.
http://www.acemake.com/hagbard  |  ng2html - The NG to HTML converter.
Free software with source code  |       eg - Norton Guide reader for OS/2.
for Linux, OS/2 and Dos.        | DBF.java - DBF reader class for Java.



Mon, 26 Oct 1998 03:00:00 GMT  
 Fivewin/Clipper/C and DLLs


Quote:
(G.C.McRae) writes:

ry, Windows
Quote:
>Library, and a Windows DLL.  The DLL form of the library can be

accessed using any programming language that can access a Windows DLL."
Quote:
>  Forgive my ignorance, but I thought DLLs were merely collections of
>resources, Dialog Boxes, Icons etc.   You can put compiled code in a
>DLL?  Accessible by any other language?  If this is the case, it

sounds like I could create my own windows, icons, functions and so on
and just plug this sucker in, regardless of the fact that it's in C and
keeps its own linked lists of drawing objects in the background.

Quote:
>  Clue me in.  (And yes, I should call up the CAD company, and will.)

>...Gordon.

In the normal world of Windows programming most DLL's contain code vice
resources.  With Clip-4-Win or any other good Windows programming
language you can easily incorporate DLL's containing specialized
functions into your application.


Mon, 26 Oct 1998 03:00:00 GMT  
 Fivewin/Clipper/C and DLLs



Quote:
>  A client is interested in converting a DOS Clipper app to Windows.
>Using any number of software packages, Fivewin, Clip-4-Win, Delphi,
>Visual Dbase etc, I know I can do it for him. (I currently use Fivewin
>for my own stuff.)
>  Anyway, the deal is this: the documentation with the CAD demo says
>the CAD library is available, (and I quote) as a "DOS library, Windows
>Library, and a Windows DLL.  The DLL form of the library can be accessed
>using any programming language that can access a Windows DLL."

It can certainly be done in Delphi.  There's a neat little shareware ($25?)
program called Header Converter (HDCNV100.ZIP on various Delphi web sites)
that will take a C header include file (a .h file) for a .DLL and convert it
to a Delphi .PAS unit.  It takes a bit of cleanup sometimes, but it's quick
and easy.  If you understand how to use PChars in Object Pascal
(null-terminated strings), accessing DLLs is fairly painless.

++++
Bill Sorensen



Tue, 27 Oct 1998 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. CTL3D.DLL, CTL3D32.DLL, CTL3DV2.DLL and Clipper/Fivewin/R&R

2. FiveWin: can't switch from DLL to DLL

3. to CS: or not to CS: in F-PC assembler

4. FiveWin+AXS problem, nwipxspx.dll wanted

5. Using .DLL with FiveWin

6. Fivewin and .dll (again)

7. FiveWin and .Dll

8. Clipper DLL's using Clipper 5.2e and Blinker 5.10

9. Clipper to Windows-Fivewin

10. Anyone use Clipper and Fivewin in Thailand

11. Clipper/FiveWin/ODBC - revised

12. Clipper 5.2e + Fivewin with mySQL Database

 

 
Powered by phpBB® Forum Software