|
char* buffer;
int fileSize = WhateverToGetFileSize();
buffer = new char[fileSize];
DoStuffWithBuffer(buffer);
delete[] buffer;
|
|
|
|
|
Hi,
The small experience that I have with VC++ is not enough to figure out how to run a process and to be able still to use another application.
I appreciate any help.
tony
|
|
|
|
|
You can put the application in the background by creating a hidden window or no window at all.
But what is that you want to do with other application?
-Prakash
|
|
|
|
|
Hi,
I want to do data acquisition and plotting of obtained values and in the same time to use Internet Explorer, for example.
Tony
|
|
|
|
|
Does not seem to be too difficult to do , but then I dont know the entire design of your project, Probably i would design in a different way for more efficiency.
so you have 2 components,
1. background app (to aquire the data)
2. The plotter , background app calls this??
3. IE. Called for what ? to get some data or to show some data or to make the user see some website?
There are lot of things to consider before anyone (atleast me) could give you a solution.
-Prakash
|
|
|
|
|
Hi Prakash,
Yes, points one and two are right. IE was just an example, it could be for example, Origin, where the user wants to analize some data. I use MFC, additional Dialog, where the user enters some parameters and botton to start the data acquisition. After this moment, there is now way to be used any other program on the computer.
Tony
|
|
|
|
|
The background application can do the data acquisition and store it in some file as appropriate to you,
So whenever you start up the plotter the plotter will read the data from the file and plot it periodically say every 1 sec or 5 sec, or what is ur design is.
Who will start the 3rd application??!? The background app or the plotter?
-Prakash
|
|
|
|
|
The background application does the data acquisition, and plots each data point, also stores the data in a file.
The design is: measure, plot, measure, plot...
Every time clear and redraw with the new point.
GDI+ is used for plotting
The 3rd application is started from the user.
Just the measuring application shouldn’t be dominant and should allow other applications to run.
|
|
|
|
|
Tonichka wrote: The background application does the data acquisition, and plots each data point, also stores the data in a file.
The design is: measure, plot, measure, plot...
Every time clear and redraw with the new point.
GDI+ is used for plotting
The 3rd application is started from the user.
Just the measuring application shouldn’t be dominant and should allow other applications to run.
Ok you have all the design, now where exactly is the problem?
-Prakash
|
|
|
|
|
The problem is that, 3rd application can not start. The Windows freezes till the measuring is ended.
|
|
|
|
|
Sounds to me like you have your data acquisition process running with very high priority and very frequently. Those two attributes do not give time for the 3rd application to do anything.
How are you doing your data acquisition and plotting? I am guessing that your data acquisition is the bottle neck. Where is your data coming from? Are you polling some input, like the parallel port, for onesample at a time, or are you processing an interrupt to pull in a buffer of samples? The first solution will use more processor time than the second, and if you sample rate and bits per sample are high, you can block out most other processes.
|
|
|
|
|
The data is coming from an ampere meter and the communication is through a GPIB. The application waits for a service request and reads the value. Unfortunately, I can not use the buffer of the device, in order to reduce the reading frequency. There are involved other devices and synchronization between them which doesn’t allow it.
|
|
|
|
|
So you have two applications:
1) Uses the GPIB interface to get samples of the current.
2) Plots data from the first application.
I think you have to look at your rate of interraction between the applications. For example, how often is APP1 getting the samples and how often is it sending those samples to APP2. If APP1 sends the data directly to APP2, each sample time, you may want to consider buffering your data in APP1 for a certain amount of time before sending the data to APP2.
Parallel Port Programming[^] is a book that describes some of the trade offs you need to consider for data acquisition using a PC.
|
|
|
|
|
Tonichka wrote: The problem is that, 3rd application can not start. The Windows freezes till the measuring is ended.
Try putting threads in your design. May be a seperate thread for data reading.
-Prakash
|
|
|
|
|
Does anyone know if there is any API to obtain the LocalServer32 from a CLSID, rather than querying explicitly in the registry?
thanks!
|
|
|
|
|
i had developed an aplication (vc++ 6.0).
its is ok and working,
but one of the client, had some problem with it
when is strarts executing, the system is getting hanged, and he need to
restart the system to get back to normal working condition
can any one guess and help me out in finding the problem
Thank in Advance
-- modified at 2:00 Friday 30th December, 2005
|
|
|
|
|
Its very minimal information. Can u briefly explain what exactly does ur application ?
|
|
|
|
|
It download files form olympus recoder and uploads to FTP
i had handled all the exceptions,
its working here with me fine,
and also with all the clients except one,
as soon as he started the application, system is struck up it seems
and he need to restart the system, even ATl+CLT+DEL is also not working on his system, if OS is differnet will be so, or can be any other reason
pls help me out
Thanks & Regrads
-- modified at 3:27 Friday 30th December, 2005
|
|
|
|
|
What exactly the functionality it(application) performs in the beginning. What are specs of ur pc and ur client's pc ?
|
|
|
|
|
Its like aking
what is the Disease if i have high temperature.
U need to investigate the machine , probably
reason for such thing is a infinite loop and
he thread hodling the loop is at high priority
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
Thank you for your responce
The Applicatin initially, retrives some information form
DB for user,
Its is running properly on my machine
all the threads, every thing
is that of win 2k SP2 or SP4 installed on the client system, some thing like that
the whole machine freezes up, mouse won't move, ctrl-alt-del does nothing. have to push the reset button on the computer or otherwise power it off and reboot.
Thanks & Regrads
-- modified at 5:04 Friday 30th December, 2005
|
|
|
|
|
Are you sure that the system hangs and not just ur application.
To my knowledge, i Have seen some Syncronous FTP clients getting locking up the system for sometime while the download or upload is going on.
I dont know if this info is of any use to you, but then I guessed
-Prakash
|
|
|
|
|
Mr. Prakash Thank you very much for ur responce
system is hanging not the application alone,
on my system every thing is fine, all the clients r ok,
but except one, i belive he is using win2k, i am on xp..
will that make any differnce,if yes remaing clients should also the
same proble, it is not possible for me to visit him personal and
get the thing done, that is the problem, i need to trace the problem form here itself,
Thanks & Regrads
|
|
|
|
|
it could be also possible if he has installed some application that is causing problem with ur client.
Try on a clean win2k machine and see if the problem is reproduced. If no try get some info from his machine of any suspect software like personal firewall, etc ,etc.
-Prakash
|
|
|
|
|
Thanks u for ur Advice
I will check it out
Thanks & Regrads
I am an INDIAN
|
|
|
|