Richard,
In message <vm7nepjtie8qd9@corp.supernews.com>, Richard
<news.20.rdmerrio@xoxy.net> writes
>>
>> To use the poplog DLL via the OLE(2)/(D)COM(+) collection of names for a
>> technology, you would need to have a type library to describe the
>> interface supported by the DLL.
>
>I am initially interested in using the provided DLL, which is used by the
>pop11.exe. I am digging into the sources to try to figure out how pop11.exe
>utilizes the DLL but my lack of C knowledge is catching up with me.
>
If you rebuild with mapping on, i.e. add the following lines into the
middle of the poplink_cmnd file, or concatenate them, separated by
spaces, into the link command in the makefile, you will get a pop11.map,
amongst others, that gives you some idea of the external functions from
the component libraries used by pop11.exe.
/MAP
/MAPINFO:LINES
/MAPINFO:FIXUPS
/MAPINFO:EXPORTS
The most important is pop_start which is used to start Poplog via the
DLL from both pop11.exe and winpop11.exe.
The function pop_start is defined in %usepop%\pop\extern\src\start.c
The pop11.exe usage features in %usepop%\pop\extern\src\main.c
The winpop11.exe usage features in %usepop%\pop\extern\src\winmain.c
The prototype for pop_start and other functions is declared in
popcore.h, (ignore all of the "external" keywords), along with useful
comments detailing the relevant source file(s).
Unfortunately, if you've already looked at popcore.h as an indicator of
a rich set of Poplog functions that you can use from Delphi, you may be
disappointed. Only those defined in poplog.def are publicly exported in
the DLL. To change this situation, you would have to play with
poplog.def and
rebuild the system. I wouldn't advise attempting this unless you have a
lot of time on your hands to analyse the consequences for each such
function.
>> Some preamble. The DLL is linked together from the poplog.res resource
>> file and the "src", "vedsrc" and "winsrc" wlb libraries. The wlb
>> libraries are built by using pgcomp(.bat) on the various source
>> directories. The pgcomp routine uses the statically linked version of
>> Poplog (corepop) defined by the code in %usepop%\pop\extern.
>>
>> The system is built with an installation of Microsoft C++ and Microsoft
>> Assembler.
>>
>> The build process generates a command such as the following to make the
>> DLL. (Note that <sandbox path> is the path to your sandbox directory
>> containing the code exported from the CVS).
>
>Perhaps I don't have the latest and greatest sources. I recently downloaded
>v15.53 from http://www.cs.bham.ac.uk/research/poplog/freepoplog.html, which
>included some sources. But, is there another location with more current
>files or a public CVS? If so, where at?
>
I am attempting to keep changes to OpenPoplog
(http://sourceforge.net/projects/openpoplog) synchronised with
FreePoplog at the above site. There are a few small changes, mostly
related to scripting of the build process, that are unlikely to be in
FreePoplog.
If you wanted the entire OpenPoplog CVS repository, you could download
the "nightly CVS tarball" from http://openpoplog.sourceforge.net and/or
extract code from the Sourceforge or your downloaded local repository,
using a CVS client. Since this repository aims to hold umpteen different
versions, you would only want to download it if you intended to make
large changes to the code.
If you have a CVS client, you can connect anonymously to the Sourceforge
CVS and export just the files you want where they differ from
FreePoplog.
Some time before the end of October I should have a bandwidth upgrade
and the time to test and upload individual platform releases for
OpenPoplog. If you would like to get involved in the OpenPoplog work,
all volunteers are welcome.
>>
>> corepop +<sandbox path>\poplog\pop\pop\poplink -p -e
>> $-Sys$-Poplog_Main -s ( $- $-lisp ) -ident 0 -o poplog.dll -lf (
>> /NODEFAULTLIB /INCREM
>> ENTAL:NO /PDB:NONE /RELEASE /NOLOGO -entry:_DllMainCRTStartup@12 -dll
>> -base:0x800000 -def:..\extern\src\poplog.def ) -lo ( poplog.res )
>> ..\obj\winsrc.wlb -ex
>> ( ) ..\obj\vedsrc.wlb -ex ( ) ..\obj\src.wlb -ex ( )
>>
>> Normally, you could adapt this process to generate a suitable list of
>> exports automatically. Poplog has no mechanism I know of to label
>> functions to export via a type library, and labelling the C functions in
>> the extern code won't help because they only feature in the statically
>> linked corepop.exe.
>>
>> So, you will need to create a suitable type library by hand. Having said
>> this, there is a poplog.def (module definition) file in
>> %usepop%\pop\extern\src that conveniently tells you what functions are
>> exported.
>
>I had found poplog.def and while this provides the names of the functions
>exported, it does not reveal the number or types for the arguments used by
>those functions nor can I find any other information describing the usage of
>the functions.
>
>I have also located the functions in the c source and header files; however,
>I am still unable to decipher the function's arguments and types -- again
>probably because of my lack of c knowledge.
>
Hopefully I have covered enough of the analysis process above to give
you a head start. I hope you have a "grep" tool for file searching to
give you matches with context. It will save a lot of time, compared with
Windows Explorer file searching.
For each of the data types featured in a function you want to use listed
in popcore.h, you will have to search through the code, possibly
recursively, to find a declaration/definition.
Generally, the data types a fairly self-explanatory. A UINT is an
unsigned integer. A BOOL is a boolean. A HANDLE is a Windows handle. You
can probably assume that most of these are 32-bits, with some extra
digging to confirm this.
I apologise if this doesn't provide all the answers, but I'm sure you'll
benefit more from going through the process yourself.
>I appreciate you time.
>
Regards,
--
Jeff Best
|