Thread: strange dll relatred problem

  1. #1
    Registered User
    Join Date
    Oct 2004
    Posts
    100

    strange dll relatred problem

    Hi all.

    I created 2 programs. One is an exe that uses a dll file, and the other is the dll file (it exports 2 functions).

    Now on my laptop the 2 programs work fine, they communicate with each other fine and everything is honky dory. Now when i take the same 2 (compiled) files (the exe and dll) to my other computer they just dont work. I dont know whether the problem is with the exe or dll. However they work fine when i test them on my girlfriends PC. They seem to be being picky on which computer they will work on.

    All there computers (my laptop, my pc, and my girlfriends pc) are running windowsXP Pro and all have the Visual Studio C++ 6 installed aswell. So why dont you think the files work on some and not ther others?

    Also what might be worth mentioning is when i first created the files they worked fine on my laptop, i then formatted my laptop and they stopped working (just like they do on my other pc). I then reformatted and they work again.

    Thanks for any help

    Cloudy

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    >> ...they just dont work.
    And that means.....

    gg

  3. #3
    Registered User
    Join Date
    Oct 2004
    Posts
    100
    i believe the exe isnt communicating with the dll. I looked at the dll with dependency walker and the functions are being exported

  4. #4
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    >> i believe the exe isnt communicating with the dll.
    And you believe that because....

    We're not psychic - you need to tell us exactly what the problem is. What does the DLL do? Why do you think it isn't working?

    Do you tell your mechanic "My car doesn't work"?

    http://www.catb.org/~esr/faqs/smart-questions.html

    gg

  5. #5
    Registered User
    Join Date
    Jan 2005
    Posts
    847
    Any error messages? And did you place the dll in the same folder or system folder? Also how do you load the dll?

  6. #6
    Registered User
    Join Date
    Oct 2004
    Posts
    100
    hi.

    Im using LoadLibrary to load the dll. The dll is in c:\ but the LoadLibrary is pointing to the correct path of the dll.

    Basically what happens is that the exe file loads the library and calls the exported function.

    The exported function in the dll just writes to a text file saying "ive been called."

    Now on my laptop i get the text file fine, however on my p.c. the text file isnt created (imusing fstream incase you're wondering).

    Im sorry i cant give you more information than this, all i know is that the same exe and dll files work on some pc's and not others.

    I was hoping that this was a regular problem and easily fixed so somebody could identify the problem and tell me how to fix it. If it isnt a regular problem then i will have to do some more debugging and post more "clues" as to where is goes wrong. Im pretty sure that it goes wrong when the exe file calls the function in the dll and not when it loads the dll, i believe it loads the dll fine.

  7. #7
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    It could be anything. Post your code.

    gg

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Strange problem
    By G4B3 in forum C Programming
    Replies: 6
    Last Post: 05-14-2008, 02:07 PM
  2. Strange problem with classes in header files
    By samGwilliam in forum C++ Programming
    Replies: 2
    Last Post: 02-29-2008, 04:55 AM
  3. DLL and std::string woes!
    By Magos in forum C++ Programming
    Replies: 7
    Last Post: 09-08-2004, 12:34 PM
  4. Strange problem with fts_open call
    By jhopper in forum C Programming
    Replies: 0
    Last Post: 02-26-2002, 12:01 AM