|
Is there a limit to the number of computers that can access an executable at the same time? Would the file be locked at certain times?
|
|
|
|
|
Joshua Lunsford wrote: Is there a limit to the number of computers that can access an executable at the same time?
None that I am aware of, unless the application itself has restrictions.
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
wouldn't the server(pc) OS have a restriction on how many concurrent connections it will allow?
I think XP and lower only allow like 10-15 connections, and then the NT4 & Up series limits it at some point as well(i think) but can't remember the number.
Would that constitute as a restriction on the # of connections to the exe?
|
|
|
|
|
|
i want to develop an application to copy files from one PC to another. the app maintains a logfile which keeps the record of all the files visited in a day(i.e. opened, modified, renamed, deleted etc). now the files should be copied to the portable media alongwith the logfile which would then be transfered to the destination PC. and at the destination PC the files will be copied in the same directory structure as of source PC. for this reason a logfile is to be maintained. my application should reside in the system tray.
please help me how to develop this application in MFC. reply me as soon as possible. i hope u get it now.
RabiaAslam
|
|
|
|
|
looks like you want to do a mirror/backup software.
The first time this is used, the original log will have all the files from PC-A; and they will all be transfered to PC-B; the log files will be the same on both machines.
the next time you do it, make a list of files on PC-A, compare it to what is on PC-B, if file on PC-A exists on PC-B and has been modified on PC-A, copy new version on PC-B, if file on PC-A does not exists on PC-B, copy it to PC-B, if file on PC-B is not in the PC-A log, remove it from PC-B, ...
Does it really matter if a file is only openned on PC-A ? it should not have repercussion on PC-B
renaming a file is like copying it and deleting the original, so, you will create a new file ( new name ) and delete the old file ( old name ) from the destination PC.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
I am working on an MFC MDI application and I have some problems about doing the things below if you provide any help I would be very happy.
Like Macromedia applications, I want my application to have a start up dialog when there is no child window. This dialog contains options such as New , Open and Resent File List. I examine the Macromedia Fireworks and I think they opening a Dialog based FormView or just a Dialog...My problems are:
1. I cant start my MDI application empty, without a child window.
2. When I open a dialog window ( FormView or other kind of Dialog) I cant use the MainMenu in MainFrame, I know this is normal because of the focus. But in Macromedia Applications you can both use the Startup dialog or the menu in the main frame. So decided that its not a dialog its another CView. But I cant find a way to open my CView derived window when there is no MDIChild. I dont know how to call it or Create it.
3. When I tried to use Dialog (FormView) still unable to call or create it.
4. Another thing is I am using DialogBars instead of Toolbars, and I want my DialogBars to be shown without a standart splitter on the left side. They wont be dockable so I dont need them to have splitter.
I am using Visual Studio .NET 2005 with MFC 8.0 library. most of tutorials or examples in this site , returns with linker 2019 errors I tried hard to repair them but no way....
Any codes, any articles, any suggestions I would be very happy.
-- modified at 12:45 Wednesday 28th December, 2005
|
|
|
|
|
Hi all,
I'm using Edit() and Update() functions to update the fields in the table. However, at particular (always) record, I got error exception which can't catch with CDBException or CException. So I used catch(...) to catch any exception. Then used sqlcomman to update the field. That particular record, let's say recnum=600,
exception got thrown, caught it by using catch(...), the field2 of recnum=600 got updated executing sql command "UPDATE ... SET". But got exception at the next following record,which is in this example, recnum=601, and got another CDBException after calling SQL command, . Error is saying "connection to DB got lost".
Why??
Why can't always at some particular record cant' update and throwing exception that can't catch with neither CDBException nor CException.
Why after that particular record get updated with SQL command, the next record can't update by using Edit() and Update() or ExecuteSQL()?
my code looks like this
<br />
while(!rs.IsEOF())<br />
{<br />
if(recnum==600 || recnum==953 )
rs.MoveNext();<br />
rs.Edit();<br />
rs.field2 = newdata;<br />
rs.Update();<br />
<br />
}<br />
catch(...)
{<br />
CString qstr;<br />
qstr.Format("Update %s set field2=%d where recnum=%d",tablename,newdata,recnum);<br />
rs.m_pDatabase->ExecuteSQL(qstr);<br />
}<br />
<br />
|
|
|
|
|
Does your code fail to update any record, or just the two following rows 600 and 953?
pnpfriend wrote: Error is saying "connection to DB got lost".
Are you sure this is the exact text of the message?
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
Just at that two rows, David.
I try to call the same function that Update the recordset using CRecordset::Edit() and CRecordset::Update() serveral time to see. whenever it reachs to those rows, the exception got thrown and couldnt' catch with CDBException or CException.
If I skip using row number 600, like
if(rownum == 600)
rs.MoveNext();
I got stack at row number 953 and then.. if I skip that row using same way as 600 (if statement), I got error again at another rows.. all the way down somewhere.. it is like keep comming up once in awhile. I dont' get error at every single row but certain rows.
So I try to catch error with catch(...) and able to use sql command to update at first row which is rownum=600. but the following record which was able to update before using if statement to skip rownum=600, can't update any way anymore.. either using CRecordset::Update() or ExecuteSQL().
|
|
|
|
|
My cod is fail to update at those two records.
The error message was saying "Lost Connection to MySQL server during query."
after skipping that two records.
|
|
|
|
|
Does this help?
"The words of God are not like the oak leaf which dies and falls to the earth, but like the pine tree which stays green forever." - Native American Proverb
|
|
|
|
|
I've been playing with different programming languages for the last few months. Mainly from books, websites etc. To be frank all of this is VERY dry (I know, I know - its programming what did I expect :P). If I see "Hello World" again I think I'll snap. Its all basic - understandably - but for me (at this point) its TOO basic. I guess I would consider myself an intermediate programmer.
The issue with being an intermediate programmer - one that cannot yet create a whole program - is that there is lack of direction. I will be taking a class on VB.Net this semester which SHOULD clear up a lot of my questions / issues.
What I am trying to find is a simple game and its code. As far as I know Tetris is one of the most basic games (as far as programming goes) and would be a great study. I'm having issues trying to find a copy with code attached.
I have a copy of Visual Studio 6. If anyone could point me in the direction of some code for Tetris - or a simple game that I can delve into please let me know. If it is geared toward learning to program that'd be a huge bonus!
Thanks!!
Dan
-- modified at 10:53 Wednesday 28th December, 2005
|
|
|
|
|
dbough wrote: I will be taking a class on VB.Net this semester which SHOULD clear up a lot of my questions / issues.
Or create a ton more.
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
A game of tetris is nothing but implementation of a logic in C/C++, so if you know the logic of Tetris which is quite easy, you should not have problem implementing it.
-Prakash
|
|
|
|
|
Hello,
The only way that you'll learn to write a complete program is to do it yourself. The things that you'll learn from sample code is almost nothing more than how to use it.
Programming is not as most people think: writing code, but programming is way more than that: finding and designing solutions to a given problem. Writing code is just one way to implement it and this too is a skill that is only learned by doing.
So the best way for you is a simple problem that you have (this can be tetris or some administrative problem) and try to make a sound solution for it. Than implement the solution in some programming language.
This is how I learned to make programs.
Hope this helps.
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
Hi Bob,
Very good answer, that's how a learned too! You find some thing that you wish to write a program for, then figure out how to do it, one piece at a time, as you write it.
P.S. You once told me you where taking classes, well I am now going back to. I need those little pieces of paper.
INTP
Every thing is relative...
|
|
|
|
|
Hello John,
Thank you!
John R. Shaw wrote: P.S. You once told me you where taking classes, well I am now going back to. I need those little pieces of paper.
If all goes well, then I'll get my paper in 6 months. After that, I'll (happily) start working.
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
You might try looking here[^] on SourceForge.
Software Zen: delete this; // <a href="http://www.codeproject.com/script/profile/whos_who.asp?msg=1307432&id=10338#xx1307432xx" rel="nofollow">Fold With Us!</a>[<a href="http://www.codeproject.com/script/profile/whos_who.asp?msg=1307432&id=10338#xx1307432xx" target="_blank" rel="nofollow" title="New Window">^</a>]
|
|
|
|
|
Thank you all for your replies. As I ahve said I am a (self proclaimed) intermediate programmer - perhaps that is overtating my skill - its hard to judge my abilities when I have nothing to compare them too.
By looking at the code for a program that I am familiar with (ie Tetris) I can pick apart things I know and find things I don't know. By finding code I am not familiar with, it is my belief, I can gain a direction and figure out what I need to learn to further my understanding of programming.
I can read all the books I want, but theory is just that - theory. Without practice (again, I'm not 100% familiar with all aspects of programming) or some 'reverese engineering' finding a direction to lead myself down can be frustrating.
If I could define a problem and then try to find a solution to get an answer I would - I think my biggest issue is not being familiar with all the tools I have at my disposal to complete the job.
|
|
|
|
|
Here is an idea for you!
Get a copy of "The C++ Programming Language" by Bjarne Stroustrup. Recreate the code for the desktop calculator, by typing it in by hand (important). Once you have it working, figure out how to get it to work with a (Windows) GUI front end (may require some rewriting).
I guarantee, by the time you have accomplished that, you will know a lot more about programming.
I have an algibraic equation parser function that I wrote in C, 18-19 years ago (that still works today). I started with some code in a book, I rewote it, modified it completely, and expanded its capabilities. Then I created a caculator and a program for graphing algibraic equations. Well actualy, in those days, I had to create a DOS windowing interface first, since my goal was to write an equation graphing program to start with.
When you are writing code for your self it can be fun, it only becomes dry (some times) when you have to do it for someone else. I stopped enjoying it as much when I could look at the problem and know the answer before I touched a keyboard (what fun is that?), after that it was just typing, and typing, and typing. To bad the computer could not just read my mind.;)
As for the understanding what tools you have and how to use them, first understand the language at the console level. The majority of the tools available with VC6 are to simplify creating GUI applications and are MS Windows specific.
Well that's enough, good luck.
INTP
Every thing is relative...
|
|
|
|
|
I have loaded image using GDI funcs and ZOOMING in and out using stretchblt funcn with memory as source and window screen as destination. while zooming in i am invalidating the screen area with third param set as false and hence able to achieve flicker free image but how to do low flicker (if possible no flicker ) for zoom out.
also please tell me if i can directly write on to the vdu buffer and freeze the client area until the write on buffer is complete
Thankyou
nothing is illegal until you are caught
|
|
|
|
|
There are articles at CP on flicker free drawing, and it is probably in the FAQ as well. Essentialy you need to override OnEraseBkgnd() so that it does not earase the background (causing flicker), then do all the drawing (including background if any) in the OnDraw() function. It actualy can be a little more complicated than that, so look at any code the displays bitmaps of thumb nails or allows you to edit an image (See CP articles).
INTP
Every thing is relative...
|
|
|
|
|
how to maintain the logfile of any file being accessed (opened,modified,renamed,deleted) in any drive(i mean the whole system). the application should be developed in MFC. please help me and reply as soon as possible.
RabiaAslam
|
|
|
|
|
uh. What have you written? I have read it in many ways, it simply is not making sense.
Please refine your question if you would need someone to respond quickly.
Vipin - MVP
|
|
|
|