|
Then FindFirstFile() will return a valid HANDLE, and the "else" statement will be executed.
I'm not sure of what will happen if there is an empty diskette (without directories/files) inserted. You will have to try it out.
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
hi kakan.
I got this info.
I think it works.....
int ret =
GetVolumeInformation(_T("A:\\"), NULL,NULL,NULL,NULL,NULL,NULL,NULL);
if (ret == 0)
{
//Returns 21 on GetLastError() which is "Device Not Ready"
}
|
|
|
|
|
Hello WeirdAct.
I'm sure it will work. There are a number of ways to find out if there is a floppy inserted or not.
Go for this one, since it's simpler than the solution I suggested.
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
What is the difference between dll,plugins and ActiveX plugins???
Siddharth
|
|
|
|
|
Hi,
I have an application which I want to minimize to system tray.
I know that CP has a lots of articles about the system tray,but the problem
is that my application has now window.
Is it possible to minimize to system tray an application which has no window?
With best regards,
Eli
|
|
|
|
|
|
Hai
Iam need to develop a VC++ app to copy a folder to a pendrive without the help of the driver.
Can anyone suggest me in doing it.
Any API's through which i can proceed.
Thanks in advance
Regards
vijay
|
|
|
|
|
Have you tried CopyFile or CopyFileEx ?
I am not ashamed to confess that I am ignorant of what I do not know.
- Marcus Tullius Cicero
|
|
|
|
|
Vjys wrote: without the help of the driver
Then you will have to build your own driver that handles the low-level stuff, such as connecting to the pen drive, identify it, communicating with it, handle error conditions, disconnects, e.t.c. That's the hard part.
On top of that driver, you will have to build a file system. I haven't checked, but there must be quite a few source codes for the FAT32 file system on the net. Else, there is plenty of information about FAT32, so that part shouldn't be too hard to implement.
Good luck.
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
Thanks for your suggestions.
Yes Iam developing my own driver. I have already did some coding for identifying the drive and also communicating for some details.
I got the handle for the device.
Now i want to send folders into it.
If at all if you get any information please inform me.
Regards
vijay
|
|
|
|
|
Hello.
You will have to have some kind of file system on the pen drive. One (standard) way would be to use FAT32. That way, the directories and files on the pen drive will be readable by every machine/OS under the sun.
As I said before, there must be quite a few source codes for the FAT32 file system on the net. Else, there is plenty of information about FAT32, so that part shouldn't be too hard to implement.
Just Google for it. If you can't find a source on the net, its not that hard to implement yourself. Just make sure you handle the FAT table (and eventual copies of it) correct.
I once wrote a diskette file system repair program and that wasn't too hard.
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
I just wonder why would someone want to do this. Win 2K or above merely detects any USB storage device and assigns it a drive letter automatically. If the OS hasn't detected it, it means the device is not assigned with a drive letter and how pretty are you planning to copy stuff into it? In addition to that if there is a driver installed for a device, then there is no reason for someone not to use it.
He is no fool who gives what he cannot keep to gain what he cannot lose.
- Jim Elliot
|
|
|
|
|
I've a MFC Project devoloped using Gamebryo(NetImmerse)Engine. In this Project,
if I change a file for a parent, the clones not automatically updating. The change takes effect only after we save,close and reopen the file. The code for Reload i.e. changing a file is,
void CPerspectiveDoc::OnReload()
{
interactiveload = TRUE;
ChangedLoadedFile = true;
HTREEITEM selectednode = m_StructureView->GetTreeCtrl().GetSelectedItem();
CInsightNode* propkey = (CInsightNode*)m_StructureView->GetTreeCtrl().GetItemData(selectednode);
AddChildSG(propkey,(NiNode *)propkey->GetViewHandle());
}
AddChildSG is defined as,
unsigned int CPerspectiveDoc::AddChildSG(CInsightNode *Insight,NiNode *ParentNode)
{
NiNode *save;
unsigned int retval;
save = m_CurrentNode;
m_CurrentNode = ParentNode;
// get translate and rotate from CInsightNode
placetranslate = Insight->GetPosTrans();
placematrix = Insight->GetPosRotate();
retval = InteractiveAddNodeandSelect(Insight);
placetranslate.x = 0;
placetranslate.y = 0;
placetranslate.z = 0;
placematrix.MakeIdentity();
m_CurrentNode = save;
return retval;
}
|
|
|
|
|
Hello All,
I have a application like client can download updated version of my software and I have made that functionality to download my new file from the FTP.
But major problem is my new application takes more than 10 mins. to download to the client's computer and while downloading the new files the TASKMANAGER shows process Not Responding instead of Running.
In the background download process is running so why TASKMANAGER shows me message Not Responding.
Thanks in advance!!!
|
|
|
|
|
Hi all,
I am making a dialog based application.
In that application i have made a list control...
i m placing maximize and minimise button in dialog box.
when i m maximizing my dialog box dialog box fits according to screen but the list control in it does not fit to Dialog box screen
Basically what i want is, if i increase or decrease dialog box size accordingly control size should increase or decrease and it should fit inside dialog box...
How to do it????????????
Thanks in advance
|
|
|
|
|
|
You can set size of list on the WM_SIZE
|
|
|
|
|
hi,
In my MFC doc/view project I want to find out is main window is maximized or not how can i get this.
Thanks ,
Rushiraj.
|
|
|
|
|
Use GetWindowPlacement .
WINDOWPLACEMENT wndpl;
AfxGetMainWnd()->GetWindowPlacement(&wndpl);
if ( wndpl.showCmd == SW_SHOWMAXIMIZED )
{
}
|
|
|
|
|
|
Hi all.
Can setvice use [use function time(NULL) ] system time or he can't?
|
|
|
|
|
There are, AFAIK, no limitaions using the runtime libraries in a service.
(Network access might be restricted, however).
So calling time(NULL) is perfectly alright.
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
|
david bagaturia wrote: Thanks.
If I were you, I would have rated his post.
Absence is to love what wind is to fire; it extinguishes the small, it enkindles the great - Comte Debussy-Rabutin
|
|
|
|
|
Thanks.
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|