Announcement

Collapse
No announcement yet.

Problems in Demo of Problems

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problems in Demo of Problems

    I have been stripping back code to demo a problem I am having involving Threads and the Status of the threads, when I finally got things stripped down now I have a problem with the Demo, where VB can not find the DLL.

    I went further on and built "DemoProblemPb.exe" to see if a true compiler could show me "the error of the ways" that VB is known for causing, and found that the true error is that the entry point to the dll could not be found.

    I have checked over and over, and best I can see both the declare and the function are the same, and no spelling mistakes (even in Alias)

    I went further on, and fired up "Depends.exe" and sure enough, the function is exported, and the entry point can be seen.

    (Sure I could LoadLibrary, and avoid the error(s) but I need hardcoded so that I can find and FIX the error)

    Can someone spot what I can not so that I can post my real question?
    Attached Files
    Engineer's Motto: If it aint broke take it apart and fix it

    "If at 1st you don't succeed... call it version 1.0"

    "Half of Programming is coding"....."The other 90% is DEBUGGING"

    "Document my code????" .... "WHYYY??? do you think they call it CODE? "

  • #2
    Code:
    Listing of exported functions for file D:\Work\DemoProblem.dll
    Run Date & Time 12-09-2008    18:49:42
    
    GetDrivesInformation
    InitApp
            END OF REPORT      2  items printed
    -----
    Listing of imported functions for file D:\Work\DemoProblemPb.exe
    Run Date & Time 12-09-2008    18:49:20
    
    DEMOPROBLEM.DLL
        GETDRIVESINFORMATION
            END OF REPORT     53  items printed
    Show exports and imports for PB/Win 6x, 7x (original by Torsten Reinow)
    Michael Mattias
    Tal Systems (retired)
    Port Washington WI USA
    [email protected]
    http://www.talsystems.com

    Comment


    • #3
      FWIW: five, six minutes it took me to find your error.

      I bill in units of one quarter-hour or fraction thereof.

      I truly appreciate the nine-minute paid vacation provided.

      MCM
      Michael Mattias
      Tal Systems (retired)
      Port Washington WI USA
      [email protected]
      http://www.talsystems.com

      Comment


      • #4
        I tried several versions of Imports/Exports, and depending on the version, it would show either Capitalized, or not capitalized "GetDrivesInformation" (although clearly exported with an Alias)

        I hunted and hunted, and decided to break down even more and build code JUST for the Dll and JUST for a test Exe separately when I noticed that somehow I had commented out the "FUNCTION = %TRUE" in my LibMain

        Uncommenting....and everything is working fine again. (Amazing how 1 line of code can compile fine, but not replying to the DllEntryPoint, can SURE reek havoc

        Now I am off to see if this too will fix my original question? or if I will still need to ask.
        Engineer's Motto: If it aint broke take it apart and fix it

        "If at 1st you don't succeed... call it version 1.0"

        "Half of Programming is coding"....."The other 90% is DEBUGGING"

        "Document my code????" .... "WHYYY??? do you think they call it CODE? "

        Comment


        • #5
          tried several versions of Imports/Exports, and depending on the version, it would show either Capitalized, or not capitalized "GetDrivesInformation" (although clearly exported with an Alias)
          The link gives you a program with source code so you KNOW how casing is handled. Not to mention, it saves the info to a text file with one click so you can print/search, edit, whatever.

          Someone else here had this same problem this week. I suggested that although it is not ever required for your own projects, you just always use the ALIAS option in the two places it is supported (procedure headers and DECLARE statements) and all these problems go away forever.
          Last edited by Michael Mattias; 10 Dec 2008, 08:36 AM.
          Michael Mattias
          Tal Systems (retired)
          Port Washington WI USA
          [email protected]
          http://www.talsystems.com

          Comment

          Working...
          X