Unable to run my application..!! Plz Help..!!


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 9 of 9

Thread: Unable to run my application..!! Plz Help..!!

Hybrid View

  1. #1
    Join Date
    Jan 2006
    Posts
    82

    Unable to run my application..!! Plz Help..!!

    Hi all,

    I have created a dialog-based project using MFC AppWizard of VC++ 5.0. This project is equipped with the default options checked, with Automation and ActiveX Control options checked too.

    I have compiled it with no warnings and errors but when I pressed the execute button (!), nothing happens. When I press the button located at the bottom left corner of the output window, a button that shows the appearance of the application window, it works fine. :confused: (At this point in time, this application has got no functionality yet!!)

    Now I add a registered ActiveX control called the ImageDevice using the PROJECT|ADD TO PROJECT|COMPONENTS AND CONTROLS menu. I compiled it and I try to run the application again. Nothing happens. So I press the button which i have stated earlier on and this time round, I recieved a runtime error and another error msg claiming that the memory cannot be read. :eek: (plz refer to the attachments) Why is this happening??? The funny thing is: I am following a tutorial from the manual and I am very sure that every steps were followed.

    Guys, I really need your help here. I am currently on a project and I am stuck here for quite a while already. I have tried reinstalling the VC++ 5.0 many times and it seems like I can't run any application that has the automation function checked. Plz give me some advice on how can I solve this problem.

    Thanks a million in advance to all. Looking forward to all replies. :)
    Attached Files Attached Files

  2. #2
    Join Date
    Jan 2005
    Location
    UK
    Posts
    604
    Hi,
    have you installed all the relevant service patches. VS5.0 is a bit antiquated but I think you shold still be able to download the patches from the MS download site.
    (something like download.microsoft.com). What kind of equipment are you running the IDE on? Is there enough memory? Look in the task manager, whether more than one instance of the environment are running? If the IDE crashes it sometimes leaves a background process running. (Re-Boot?)
    I don't know about the component you are using, but are you sure it works (i.e. is bug-free) and you have rights to access it?
    Just some things to check...
    Cheers,
    D

  3. #3
    Join Date
    Jan 2006
    Posts
    82
    Quote Originally Posted by drkybelk
    Hi,
    have you installed all the relevant service patches. VS5.0 is a bit antiquated but I think you shold still be able to download the patches from the MS download site.
    (something like download.microsoft.com). What kind of equipment are you running the IDE on? Is there enough memory? Look in the task manager, whether more than one instance of the environment are running? If the IDE crashes it sometimes leaves a background process running. (Re-Boot?)
    I don't know about the component you are using, but are you sure it works (i.e. is bug-free) and you have rights to access it?
    Just some things to check...
    Cheers,
    D

    Hi drkybelk,

    Thanks for your help bro. I have tried many times and I even uninstalled VC++ program a few times but the same problem exist. I am running the IDE on this software call XCaliper (copyright) and it acts like a middleman between the image I wanna capture and my application.

    I have just realised something actually: The versions of the VC++ are different.
    What I mean is, the C++ codes (these codes are functionable) written in the XCaplier is using VC++ 4.2 while I am using 5.0 to write my application. So now I am wondering, is there any conflict between this 2 versions during compilation that may cause memory conflict? or should I use VC++ 6.0?
    Thanks for your help once again.

    Cheers,
    Justin

  4. #4
    Join Date
    Jan 2005
    Location
    UK
    Posts
    604
    Hi,
    as far as I can remember there was the change from 16bit to 32bit between the versions 4.2 and 5.0 of VS. If that is the case, yes you have a problem, I suspect.
    If I was you, I'd try to compile on VS6 (SP6) or later (best try VS2005, if you have it). And read the documention of your component to find out about system requirements and compatibility.
    Cheers,
    D

  5. #5
    Join Date
    Jan 2006
    Posts
    82
    Hi drkybelk,

    the funny thing now is that I realise that I cant seem to run application with automation on? How come it is like this? I have tried with 6.0 but the same problem still persist.

    remember the control (ImageDevice) that I have added previously? If i were to compile then remove the control, and i try to exe it without building the .exe and .res file (ie compiling with the control in the project but exe it with the control deleted), i am able to run the application as if the control is there.....Why is it like that?

    Thanks for your help once again....

  6. #6
    Join Date
    Jan 2005
    Location
    UK
    Posts
    604
    Sorry but what exactly do you mean by "If i were to compile then remove the control"? Are you physically removing/renaming your component, or are you just no longer referencing it from your project? A COM component is not physically compiled and linked into the executable (the whole point of COM is exactly that...). That's why I am puzzled as to why you are"able to run the application as if the control is there".
    Is it possible, that you are linking in a *lib fib file?
    But to be honest, without some code we are fishing in the dark here...

    Ciao,

    D

  7. #7
    Join Date
    Jan 2006
    Posts
    82
    Hihi....

    I hope that my explanation is clear enough...here goes...

    1. I created a dialog-based application using AppWizard(exe) with automation unchecked, activex control checked and the rest at default.

    2. Now, I go to Project|Add to Project|Components and Controls, and add in a Registered ActiveX Control named ImageDevice.

    3. Now the ImageDevice icon appears at the control bar located at the side and I drag and drop the ImageDevice control onto my dialog application (just like a button control, whereby I can just drag and drop onto my dialog application).

    4. Now, I compile it (no errors and warnings). When I execute it, I encountered a runtime error.

    5. Now I remove the ImageDevice (literally removed as in clicking on the ImageDevice and press delete, and now it looks like the orginally created dialog-based application with OK, Cancel and the static text only)

    6. I execute the application again WITHOUT building. This time round, I was prompted that the .exe and .res files are not build and asked me if I were to build them. I chose not to build these 2 files and I manage to get my dialog application running, WITH the ImageDevice appearing on my dialog application.

    7. The funny thing is, I can also use the ImageDevice control as it is designed to do.

    Things to Note:
    This ImageDevice control comes from XCaplier, which is a software platform that allows a developer to use it to develop his application.

    I will post some printscreen shots in my next post.

    I really hope someone can help me with this. I am using MS VC++ 6.0 to compile these codes written in 4.2.

    I hope that my steps are clear enough.

    Thank you all.......

  8. #8
    Join Date
    Jan 2005
    Location
    UK
    Posts
    604
    You got me there mate! I am speechless, although not surprised, considering you are using VS6. I have my own little Gremlins with that compiler...
    The second time round you are indeed using the executable you created in the first attempt. Have you tried to start this program from the commandline/explorer? Have you tried all configurations Release/Debug? What happens? A very remote shot: probably your component has properties that are different the second time round (basically it is not stateless). Hard to say.
    I do not know too much about the inner workings of COM, but can you check in you Admin console that the COM server is up and running?
    I'm baffled...
    D

    D

  9. #9
    Join Date
    Feb 2006
    Posts
    4
    Try downloading Dev-C++ and using that to run your program or put your code online so we can look at it
    Last edited by kyle_charest; 02-13-2006 at 03:24 AM.

Similar Threads

  1. Replies: 0
    Last Post: 06-15-2005, 07:31 PM
  2. Replies: 0
    Last Post: 03-24-2005, 02:13 PM
  3. Replies: 0
    Last Post: 08-29-2002, 09:40 AM
  4. Execute and application
    By Marco Losavio in forum .NET
    Replies: 0
    Last Post: 08-22-2002, 09:49 AM
  5. Replies: 3
    Last Post: 09-27-2000, 12:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center