Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. confused

confused

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    swatgodjr
    wrote on last edited by
    #1

    lately i been tinkering around with dll files trying to learn more about them and developed a small app that loaded the functions i use a lot across most applications i make from a dll file. the application in a sense works but the main issue i am having is parts of the program do not load as they should, and load at wrong times, maybe a screen or 2 after it should have been displayed. is there something i could do to prevent this from happening or maybe fix the problem?

    K 1 Reply Last reply
    0
    • S swatgodjr

      lately i been tinkering around with dll files trying to learn more about them and developed a small app that loaded the functions i use a lot across most applications i make from a dll file. the application in a sense works but the main issue i am having is parts of the program do not load as they should, and load at wrong times, maybe a screen or 2 after it should have been displayed. is there something i could do to prevent this from happening or maybe fix the problem?

      K Offline
      K Offline
      khan
      wrote on last edited by
      #2

      swatgodjr wrote:

      parts of the program do not load as they should, and load at wrong times, maybe a screen or 2 after it should have been displayed

      That is not clear. Do you mean the dll does not load when it should? Does it load late? Sorry it does not seem clear. Please give more details. Even though I may not be able to help you someone will. :) this is this.

      S 1 Reply Last reply
      0
      • K khan

        swatgodjr wrote:

        parts of the program do not load as they should, and load at wrong times, maybe a screen or 2 after it should have been displayed

        That is not clear. Do you mean the dll does not load when it should? Does it load late? Sorry it does not seem clear. Please give more details. Even though I may not be able to help you someone will. :) this is this.

        S Offline
        S Offline
        swatgodjr
        wrote on last edited by
        #3

        well i fixed part of it, see i made my own functions to format menus in a console app, it would display all but the last line and i think for that, the problem was because when that line gets displayed i have the program ask the user for input. but i also have the same issue some place else, i made it so if incorrect input is detected, it would load a custom error function out of the dll file and display a formated error message. if the functions are inside the program it works fine but when loaded from a dll to be used inside the exe it causes this problem. and about my question, the dll file loads like it should but some how lines of text will not appear from soem of the functions where they are supposed to.

        K 1 Reply Last reply
        0
        • S swatgodjr

          well i fixed part of it, see i made my own functions to format menus in a console app, it would display all but the last line and i think for that, the problem was because when that line gets displayed i have the program ask the user for input. but i also have the same issue some place else, i made it so if incorrect input is detected, it would load a custom error function out of the dll file and display a formated error message. if the functions are inside the program it works fine but when loaded from a dll to be used inside the exe it causes this problem. and about my question, the dll file loads like it should but some how lines of text will not appear from soem of the functions where they are supposed to.

          K Offline
          K Offline
          khan
          wrote on last edited by
          #4

          Sorry, I have never tried what you are doing. It sounds like the dll-function is displaying the error instead of the main program. You can make the dll function so that it only returns the error text message, instead of displaying it also. Take the string from it, and display it in the main program. And are you using cout ? If you are, then you know cout buffers a lot of output, so the displayed output can get messy. Try using something like cprintf. I think that should do it. If it doesn't then try the above ideas. If that doesn't help either, then create a new thread, and try posting some code with it as well, hopefully someone will help you. this is this.

          S 1 Reply Last reply
          0
          • K khan

            Sorry, I have never tried what you are doing. It sounds like the dll-function is displaying the error instead of the main program. You can make the dll function so that it only returns the error text message, instead of displaying it also. Take the string from it, and display it in the main program. And are you using cout ? If you are, then you know cout buffers a lot of output, so the displayed output can get messy. Try using something like cprintf. I think that should do it. If it doesn't then try the above ideas. If that doesn't help either, then create a new thread, and try posting some code with it as well, hopefully someone will help you. this is this.

            S Offline
            S Offline
            swatgodjr
            wrote on last edited by
            #5

            thank you, that worked exactly as i was wanting it to:-D

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups