Re: Exporting symbols from EXE to DLL?



Marcel Müller schrieb:
As far as I know it is possible that a EXE module exports symbols too.

Interesting to know. I would have never thought that this is possible.

Is it possible to import this symbols in a DLL module?
Reading the info for link386 from the "Tools reference" for the explanation of the IMPORTS def keyword:


Syntax:

IMPORTS
....

[internalname=]modulename.entry
....
<modulename>
The name of the application or library that contains the function.
....

That sounds like it should be possible for a DLL to import a symbol defined in an application. The question would be, how does the program loader know where to look for the module ? I'd think that it would always use the LIBPATH info. And the syntax looks like you cannot specify the module extension (.EXE in this case). Then I wonder what extension the program loader would expect.
If you try out, report the results.

I would like to use this scenario for API functions provided to plugin DLLs. In fact it would be much easier to use the API functions with load time linkage compared to passings a bunch of function pointers to the DLL module.


Lars
.



Relevant Pages

  • Re: MASM as an addition to the VC Express edition now available
    ... Why do you write your editor and debugger yourself, ... Call for an Edit DLL? ... Because it is simpler than to rewrite our own from ... syntax, modify the HLA source to make your own "preparser" ...
    (alt.lang.asm)
  • Re: Windows 64-bit DLL caller
    ... That reminds me of errors that occur when a newer version of bash is interpreting the commands in a configure script that was written with bash syntax of an earlier bash version. ... in a Tcl application I'm using a 3rd party hardware with a device driver ... On my WinXP I accessed the DLL functions using the ...
    (comp.lang.tcl)
  • Re: Function pointers for DLL functions?
    ... For what you want to do, it just screams "ActiveX" ... How would I dynamically pass parameters selected at run-time to a DLL ... What is the syntax for this? ... pass this number to the DLL using function pointers? ...
    (microsoft.public.vc.mfc)
  • Having trouble using regsvcs.exe
    ... I'm running vb.net 1.1 and I need to register a dll using regsvcs.exe and am ... Command "RegSvcs.exe" is not valid. ... Here's one of syntax I tried? ...
    (microsoft.public.dotnet.general)
  • NetExpress and COM+ - Implement an interface
    ... The only syntax I find in the help files ... Further details in case it matters - I am using a third-party tool that ... defines the COM interface I need and it stuffs the typelib into a .dll. ...
    (comp.lang.cobol)