|
Randall Hanson wrote:
I don't even know how to check for the existence
You can use _access() , _stat() , or CFile::GetStatus() for this.
Randall Hanson wrote:
...or create a directory
You can use CreateDirectory[Ex]() for this.
Randall Hanson wrote:
...can anyone recommend a good book on admistrative software?
Define "administrative software."
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
By administrative software, I mean file I/O, printing/preview, threading, system info...those kinds of things.
Randall Hanson, P.E.
Mechanical Engineer
|
|
|
|
|
Randwulf wrote:
...file I/O...
fopen(), fread(), fprintf(), fwrite(), fclose(), CFile, CStdioFile, CreateFile(), ReadFile(), WriteFile(), CloseHandle().
Randwulf wrote:
...printing/preview
The Scribble example on MSDN goes through this. Other examples exist, but none of my projects have ever required printing or previewing so I can't speak from experience.
Randwulf wrote:
...threading
See here and here for starters.
Randwulf wrote:
...system info
This is a fairly big category. Anything in particular?
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
Thanks, David, but can you recommend a primer book which covers these kinds of topics?
Randall Hanson, P.E.
Mechanical Engineer
|
|
|
|
|
Will an e-book suffice? I own very few books, and those that I do own are from college and graduate school.
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
Perhaps I'm old school, I prefer a real book that I can read and make notes in while I'm drinking coffee on my patio.
Randall Hanson, P.E.
Mechanical Engineer
|
|
|
|
|
Hi.
The CFindFile class can help to finding a file/directory.
you can get more information about this class from MSDN library.
|
|
|
|
|
How do I resolve an email address such as my_email@yahoo.com into an IP address such as 112.33.152.23?
I know using gethostbyname() resolves URL address to an IP address, but won't do it for email address.
Thanks.
|
|
|
|
|
You want the IP of what ? the mail server ? the IP of the end user machine ?
AFAIK, the email address' user part does not "resolve" to an IP, only the domain name. it's the mail protocol that will handle the user management ( on the mail server ), sending the message to the appropriate mailbox.
Maximilien Lincourt
"Never underestimate the bandwidth of a station wagon filled with backup tapes." ("Computer Networks" by Andrew S Tannenbaum )
|
|
|
|
|
Dear all,
How can I get such information as head, cylinder, sector... of a specific physical disk in Win98? I currently use the first sector and parse information from partition entries in order to get those information. Are there any better methods?
Best regards.
____
Tuan
|
|
|
|
|
I'm not sure exactly what you are after, but see if DeviceIoControl(..., IOCTL_DISK_GET_DRIVE_LAYOUT_EX, ...) will help.
Nope, that is for Windows NT-based machines. I'm not sure what will satisfy your Windows 98 requirement (I don't develop for it).
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
Dear David,
That function requires a handle to device Physical Disk. Unfortunately, in Win98, we cannot create that handle. So the function DeviceIoControl won't work.
Thanks for your suggestion.
BRs.
____
Tuan
|
|
|
|
|
Tuan Dang wrote:
Unfortunately, in Win98, we cannot create that handle.
Why not?
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
It's simple. Because the CreateFile() doesn't return a handle.
____
Tuan
|
|
|
|
|
Sure it does. Check the documentation or the function's prototype.
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
I did try it. It worked properly in Win2k/XP, but not in Win98. You can make a simple example and test it in Win98. Just create a file with a file name "PHYSICALDRIVE0".
BRs.
____
Tuan
|
|
|
|
|
This worked as expected:
HANDLE disk = CreateFile(_T("\\\\.\\PHYSICALDRIVE0"),
GENERIC_READ,
0,
NULL,
OPEN_EXISTING,
0,
NULL);
if (INVALID_HANDLE_VALUE != disk)
MessageBox(NULL, _T("Work"), _T(""), MB_OK);
else
MessageBox(NULL, _T("Not Work"), _T(""), MB_OK);
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
Does that code work correctly in Win98 platform? If yes, it looks so strange. Let me try it again. Anyway, thank you so much.
BRs.
____
Tuan
|
|
|
|
|
Can any one suggest me a site or documentation to start wrting io device drivers?
Plese dont say MSDN coz its for reference i am more or less looking for tutorial kinda stuff
thanx.
I Touched Osama Bin Ladens Bushy Beard
|
|
|
|
|
"Windows 2000 Device driver book, A Guide for programmer" by Prentice Hall available in Ebook form.. i got it on some CD of ebooks.
or check Yashavant Kanetkar's online Device Driver course [^]
Muhammad Shoaib Khan
http://geocities.com/lansolution
|
|
|
|
|
Thank you very much.
I Touched Osama Bin Ladens Bushy Beard
|
|
|
|
|
hi,
i am using win2000,and i want to perform following operation in windows login,
i)All ways default user should be GUEST.
ii)if a user enters password wrong for three times, then automatically it has to login as guest.
iii)If administrator logs in it has to goes to desktop,
else i want to perform my application(ie ordinary user have no entry to desktop)
pls help me ....its urgent
bye,
achip
|
|
|
|
|
achip wrote:
i)All ways default user should be GUEST.
Check out the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\system\DontDisplayLastUserName registry key. This won't do anything about a default user, but it does remove the ability to view which user was last logged onto the machine by clearing the username box on the login screen.
achip wrote:
ii)if a user enters password wrong for three times, then automatically it has to login as guest.
I'm not sure if this is possible without a custom GINA.DLL.
achip wrote:
iii)If administrator logs in it has to goes to desktop,
else i want to perform my application(ie ordinary user have no entry to desktop)
By default, after a successful login, the desktop is displayed. I'm not sure what you mean by "ordinary user have no entry to desktop." Perhaps the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows\SecureDesktop registry key might be of use.
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
i) ok......
then how u will set the default user name as Guest.
ii) i also know that for this u have to change the msgina.dll, but i dont have the source code & i dont know how to do it.
iii)what i mean is if the user is Administrator it has to dirrectly goes to desktop.
for all other user, after windows login dirrectly my applicaton has to run. No access to desktop.
i think now it is clear, u can help me..
i am waiting for ur reply,
thanks,
bye
|
|
|
|
|
achip wrote:
then how u will set the default user name as Guest.
Without creating your own MSGINA.DLL, I know of no way to automatically plug "Default" into the login box.
achip wrote:
...i dont know how to do it.
Start here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/security/security/msgina_dll_features.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/security/security/winlogon_and_gina.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/security/security/loading_and_running_a_gina_dll.asp
achip wrote:
what i mean is if the user is Administrator it has to dirrectly goes to desktop.
This happens by default. Some windows, such as Windows Explorer and Control Panel, might open back up if they were open when Administrator last logged off.
achip wrote:
for all other user, after windows login dirrectly my applicaton has to run. No access to desktop.
Then put your application in the Startup group, or the Run key (not in the HKLM hive) in the registry.
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|