|
Muhammad Irfan Azam wrote:
I am the student of masters of computer science.
From where?
I believe I can suggest you some nice ideas .
mE
---------------------
A gasp of breath,
A sudden death:
The tale begun.
A rustled page
Passes an age:
The tale is done.
|
|
|
|
|
Muhammad Irfan Azam wrote:
Please suggest me some ideas regarding the final project.
Your thesis advisor is a good resource for such ideas. At least mine was.
|
|
|
|
|
Dear All,
I am developing an application in MFC VC++ Version 6.0 for Windows 2000.
I need to copy ntuser.dat , but this file is always in use. Is there any way out to copy this file. Any Shell Level API's ?
Regards,
Rohit
|
|
|
|
|
Use MoveFileEx with MOVEFILE_DELAY_UNTIL_REBOOT flag. And then restart computer.
Magnus
|
|
|
|
|
So what becomes of ntuser.dat after it has been moved?
|
|
|
|
|
Well, nothing good probably... which I think you dont want to happen
Try this one SetupQueueCopy, I have never used it my self so I can be of no help there.
Or write a small program and run it under HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServicesOnce
Magnus
|
|
|
|
|
Magnus Westin wrote:
Well, nothing good probably... which I think you dont want to happen
My point exactly.
Magnus Westin wrote:
Or write a small program and run it under HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServicesOnce
This may or may not work, depending on which ntuser.dat file is to be copied, and what user is currently logged in to the machine. The best approach would be to log in as a user other than the user whose ntuser.dat is to be copied. Then locate the ntuser.dat file in the C:\Documents and Settings\username folder and copy accordingly. This will keep the OS from complaining about a locked file.
|
|
|
|
|
Question would be what becomes of a system after it has been moved?
Answer to original question is simple
HANDLE hFile = CreateFile("ntuser.dat", GENERIC_READ,
FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
while()
{
ReadFile(hFile);
WriteFile();
}
I tried this few minutes ago and it worked like a charm....
|
|
|
|
|
Brian Shifrin wrote:
I tried this few minutes ago and it worked like a charm....
Was this your ntuser.dat, or that of another user account?
|
|
|
|
|
Good point it was local vs domain.
|
|
|
|
|
Hi. Does anyone know how can I include exe files as resource as that I can use them later?
|
|
|
|
|
You could load it as a binary resource but you will probably have to expand it to disk when you need to run it...
John
|
|
|
|
|
How can I do that (cause I am not that good with binary resource)?
|
|
|
|
|
Are you using vc6??
Go to the resource view. Right click on the folder at the top. Select import. A file dialog appears. Change the file type to all files(*.*). Select yout executable. And enter EXE as the resource type. Now the executable resource is included in your project as a binary resource.
John
|
|
|
|
|
ok thanks for your help. By the way, I have some more questions to ask. Can you help me? Below is the description:
I have an exe file that shows a dialog. The user need to type in a product id, a vendor id and need to select a file to do the locking. When the user have have completed these tasks and clicked on the OK button, a dialog box (created by CFileDialog) will appear and ask the user where he/she want to save the second exe file to. After that, the first exe file will create the second exe file which will hold all the information that the user has typed and also the file that the user has selected previously.
When the user open the second exe, it will need the user to type his/her username and password before he/she can open up the file which is attached to it.
Can you give mi some ideas on the following:
1) How can I create an exe file using another exe file?
2) How can I attach a file to the second exe file?
3) How to pass in the values from the first exe file to the second exe file?
|
|
|
|
|
|
I've been searching forever on this one! Does anyone know how to change text formatting for text in a loaded HTML page using CHTMLView? I'm trying to add a strikethrough to links that I have identified as invalid based on prior surfing. Any ideas?
|
|
|
|
|
Is anyone familar with MSBNx Bayesian Networks, created at Microsoft Research. I have correctly imported the Activex but I get an error here which are arguements into the api function.
<br />
<br />
#include "stdafx.h"<br />
#include "bn.h"<br />
#include "bnDlg.h"<br />
#include "models.h"<br />
.....<br />
void CBnDlg::OnButton1() <br />
{<br />
CModels model1;<br />
model1.Add("jps", "C:\\belief.xbn", "C:\\error.log", ine_Default, recommendtype_Default);<br />
<br />
}
C:\Backup2\projects\bn\bnDlg.cpp(178) : error C2065: 'ine_Default' : undeclared identifier
C:\Backup2\projects\bn\bnDlg.cpp(178) : error C2065: 'recommendtype_Default' : undeclared identifier
I
Add (Models)
http://www.research.microsoft.com/adapt/MSBNx/msbn3/Methods/Add-Models.htm[^]
http://www.research.microsoft.com/adapt/MSBNx/faqs.aspx[^]
all of the example code from MS is in VB
"obe wan, your my only hope"
Later, JoeSox www.humanaiproject.org
my friend's Hawaiian Art :
http://www.cafeshops.com/coolroxart
|
|
|
|
|
Hi all,
I implemented CToolTipCtrl in a custom control. It work fined in debug mode but the tooltip doesn't come out after I compile to exe.
Anyone encounter the problem before and I would be very grateful if you share your opinions. Thanks. ^_^
|
|
|
|
|
Could anyone help me figure out how to use the SAPI 4 PhraseParse function? I can't find any helpful info in MS's documentation and other that I don't know where else to look. Thanks!
|
|
|
|
|
Hi,
In my MFC app I need to read and write to a file. Write now I am working on the writing part of it all. I can write to a file that doesn't exist, but when the file does exists it always overwrites the contents of the file.
I am using the following code:
CStdioFile f;
f.Open("test.txt",CFile::modeCreate | CFile::modeReadWrite | CFile::shareDenyWrite, NULL);
f.WriteString(temp);
f.Close();
temp is just some string that the user enters.
Can anyone tell me what I am doing wrong, and tell me how would i get it to append to the end when the file exists already? Is there a better way to do this?
|
|
|
|
|
Put this in the pot and see if it boils:
<br />
f.Open("test.txt",CFile::modeCreate | CFile::modeNoTruncate | CFile::shareDenyWrite, NULL);<br />
Also, are you sure you need "modeReadWrite"? I doubt you'll ever need that for CStdioFile.
"When a man sits with a pretty girl for an hour, it seems like a minute. But let him sit on a hot stove for a minute and it's longer than any hour. That's relativity." - Albert Einstein
|
|
|
|
|
Hi,
I'm trying to make an Instant Messenger-program for my school. I'm building a client in C++ and I've made a protocol and some other things, but I really don't know what's the best option for a server.
Can I do something in combination with SQL or... Anybody got suggestions? The server has to verify the user and send his/her status to everybody else etc. etc. It also has to hold a bit of user-information and if it's possible also keep offline messages.
I've been searching for solutions, but most 'new' Instant Messengers are multi-messengers and use known protocols/servers like ICQ/MSN/AOL/etc.
Please can anyone help me?!
Best regards, Jesper.
|
|
|
|
|
Caveat : The following is just one suggested method out of many. I admit there are other 'better' methods - I am aware of them and not interested in hearing about them.
(yes i'm in a pissy mood that will likely be reflected here)
Break the project into milestones.
You want to get to something that compiles and does something as soon as possible.
From there you can incrementally add features.
Milestone 1 : Define database schema
- gather user requirements, for you this can be accomplished by creating a mockup of how you want the client app to behave on paper or a whiteboard.
- from this you can get the user defined data that you will need to persist (i.e. offline message table)
- from the user defined data will follow some of the system data you will need to store to support the client app and user data (e.g. user account table)
Milestone 2 : Client GUI
- create the client app project and build the GUI with menu, toolbars, and view windows as appropriate.
At this point you don't get to take a break, any VB programmer could get this far, keep going.
Milestone 3 : Database access
- http://www.codeproject.com/database/[^]
- pick a RDBMS e.g. Access, SQL Server, mSQL, Postgres, ... and mock up your tables and populate with some test data (e.g. 3 users, 2 offline messages).
- you'll want to use something that wraps ODBC, OLE DB, or ADO to access the database. I use class' that wrap ODBC (and OLE DB on WinCE) but the current trend seems to be ADO (which wraps OLE DB).
- use the database class' in the client app to directly insert/update/delete records.
At this point your database is defined and has test data, your data access logic has been worked out, and you have a working client app, - take a 5 min break and have a beer, you've earned it.
Milestone 4 : Create server console app
- Len Holgate has written a good series on writing a socket server class. http://www.codeproject.com/internet/[^]
- use Len's code to learn about IOCP
- define/implement your protocol
- create a console based exe for the server code, move the database access code from the client app to the server app.
- modify the client app, replace the database access code with the client socket w/ protocol class.
At this point you can see the finish line, you have a working client/server application - take a 10 min break and have a bottle of Jack, you've earned it.
Milestone 5 : Convert server from console app to registered service
- for debugging it is much easier to have the server written as a console app
- check out services in http://www.codeproject.com/system/[^]
- create server class and take current console main() and stuff into server class Run() method.
... you're done, you've wasted a couple hours of your life reinventing the wheel, but hopefully you've learned a fair bit in the process.
...cmk
Save the whales - collect the whole set
|
|
|
|
|
Hi Chris,
Thanks for your reaction, even though you where a bit...
The first 3 Milestones won't be a big problem, only a bit of a sweat. I know a lot about SQL, so I would prefer to use that.
4 and 5 will be a lot of learning I guess, but that's no problem(I hope). Thanks again, also for the links, very useful!
Jesper
PS. Have a beer on me.
|
|
|
|