No announcement yet.

can we use mutex for DLL files ?

  • Filter
  • Time
  • Show
Clear All
new posts

  • #21
    Naming an entry point into either an executable file OR a DLL is a matter of convention.
    Actually, it's a matter of your compiler. When a compiler writes the executable file header, it specifies the entry point (by offset from start of file).

    The PB compiler recognizes specific procedure ("function") names as the programmer's desired entry point for the module... eg PBMAIN or WINMAIN when compiling to an EXE or DLLMAIN or LIBMAIN when compiling to a DLL.

    A DLL is a different animal, it requires a specific format that is defined by the operating system
    Actually, the specifications for an EXE file's entry-point function are O/S defined as well. But the PB compiler makes that transparent when you use the abbreviated procedure header supported by the reserved name PBMAIN when compiling to an EXE. And the compiler makes it REALLY simple when compiling to a DLL, as it handles the format transparently even if the programmer does not explicitly specify an entry point function.

    While pretty much all you say is true when using POwerBASIC compilers, I'd caution you against expanding those statement as you have to state them as universal truths.

    (I have a great story about that, but I'll save that for another day.)
    Michael Mattias
    Tal Systems (retired)
    Port Washington WI USA
    [email protected]