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. Problem when I run the application using cntrl+F5. Wintech OPC DLL

Problem when I run the application using cntrl+F5. Wintech OPC DLL

Scheduled Pinned Locked Moved C / C++ / MFC
csharphelpc++dotnetwpf
4 Posts 3 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.
  • D Offline
    D Offline
    D Manivelan
    wrote on last edited by
    #1

    Hi, I have an MFC application for which I have integrated OPC function using Wintech OPC DLL. This application is an OPC Client which connects to a OPC Server and gets values from it using OPC communication. I call the OPC functions in my application. I used WPF(dll created by C#) in this application for some graphics and turned on the project setting "Common Language Runtime Support (/clr)" When I run my application in VS2008 using F5, it runs without any issues it shows correct values. But when I run the same application using Cntrl+F5 or directly run the EXE, it runs but it shows junk values. Notes Suppose i change project setting from "Common Language Runtime Support (/clr)" to "No Common Language Runtime support" it is not supported WPF dll. Please help me to find the solution for this problem

    1 1 Reply Last reply
    0
    • D D Manivelan

      Hi, I have an MFC application for which I have integrated OPC function using Wintech OPC DLL. This application is an OPC Client which connects to a OPC Server and gets values from it using OPC communication. I call the OPC functions in my application. I used WPF(dll created by C#) in this application for some graphics and turned on the project setting "Common Language Runtime Support (/clr)" When I run my application in VS2008 using F5, it runs without any issues it shows correct values. But when I run the same application using Cntrl+F5 or directly run the EXE, it runs but it shows junk values. Notes Suppose i change project setting from "Common Language Runtime Support (/clr)" to "No Common Language Runtime support" it is not supported WPF dll. Please help me to find the solution for this problem

      1 Offline
      1 Offline
      11917640 Member
      wrote on last edited by
      #2

      So, you cannot use debugger to find an error, since the program runs correctly under debugger. You need to use another debugging technique, for example, tracing. Add TRACE/OutputDebugString messages to different parts of the program. Print results of different function calls, values of a variables etc., whatever you need to check the program. Run the program without debugger with DebugView: https://docs.microsoft.com/en-us/sysinternals/downloads/debugview Use the TRACE output to find what is wrong. By the way, during development process, always run your program without debugging. Use debugger only if you really want to debug. This allows to prevent such situations in the future.

      D 1 Reply Last reply
      0
      • 1 11917640 Member

        So, you cannot use debugger to find an error, since the program runs correctly under debugger. You need to use another debugging technique, for example, tracing. Add TRACE/OutputDebugString messages to different parts of the program. Print results of different function calls, values of a variables etc., whatever you need to check the program. Run the program without debugger with DebugView: https://docs.microsoft.com/en-us/sysinternals/downloads/debugview Use the TRACE output to find what is wrong. By the way, during development process, always run your program without debugging. Use debugger only if you really want to debug. This allows to prevent such situations in the future.

        D Offline
        D Offline
        D Manivelan
        wrote on last edited by
        #3

        Hi Thanks for replay. I downloaded debugview application it is also not display issue. Still i couldn't identify the issue. Please help me

        V 1 Reply Last reply
        0
        • D D Manivelan

          Hi Thanks for replay. I downloaded debugview application it is also not display issue. Still i couldn't identify the issue. Please help me

          V Offline
          V Offline
          Victor Nijegorodov
          wrote on last edited by
          #4

          Try to log: at first step log the main steps of the running application, then implement smaller logging steps and so on...

          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