|
|
For Accessing Recycle bin simple method is to get all the drives of the hard disk using _getdrive() API. Each drive contains 'Recycled' folder. using it you can get the information of the files in the recycle bin.
If you know any best solution then plz send it.
Mahesh Kulkarni
The secret of life is not enjoyment
but education through experience.
- Swami Vivekananda.
|
|
|
|
|
HI
Here Now I am able to find the files and folders in Recycle Bin Folder, now problem is that I want to delete these files and folders from Recycle Bin,
For this either I should have the handle of files in Recycle Bin,
so Please guide me the way to access files of the Recycle Bin Folder
Please help me.
Thanks
Edit/Delete Message
|
|
|
|
|
Thanks
Actually I through the source code of given link,
Infact what I need is to first overwrite the files which are present in Recycle Bin and then delete the file .
So the idea of SHEmptyRecycleBin() or from the source code of above sample does not fulfill my requirement.
So please tell me that how to overwrite the files that are in RECYCLE BIN.
Please Help.
Thanks
|
|
|
|
|
rajeevktripathi wrote: So please tell me that how to overwrite the files that are in RECYCLE BIN.
Overwrite them with what?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
overwriting with some random values to all size of file.
|
|
|
|
|
Hi,
I have to display the Hard Disk free space in the Edit box, can anyone plz tell what function we have to use for calculating Hard disk free space and didplaying it in a edit box in read only mode.
Regards,
Parichay.
|
|
|
|
|
Hi,
BOOL GetDiskFreeSpaceEx(
LPCTSTR lpDirectoryName,
PULARGE_INTEGER lpFreeBytesAvailable,
PULARGE_INTEGER lpTotalNumberOfBytes,
PULARGE_INTEGER lpTotalNumberOfFreeBytes
);
where:
lpDirectoryName - Pointer to a null-terminated string that specifies a directory on the disk of interest. If this parameter is NULL, the function uses the root of the current disk.
You can use i.e.:
std::stringstream sstr;
sstr << lpTotalNumberOfFreeBytes << _T( " bytes" );
SetWindowText( hWnd, sstr.str().c_str() );
where hWnd is a handle to editbox window.
-----------
Mila
|
|
|
|
|
Hi Mila,
Thank u very much for the reply.
Now i have edit box by name IDC_SPACE , i want to know how to display the output in edit box.
it should show the free space when the dialog box is loaded.
how to use hwnd ??
|
|
|
|
|
Use the SendMessage() or SendDlgItemMessage() function passing along the text you want to enter as the lParam and WM_SETTEXT as the message.
|
|
|
|
|
Hi,
Can u please tell me how to use the space calculating function and where the code should be placed so that wehn dialog window loads edit box should have free space calculated.
|
|
|
|
|
So if project is MFC you can do:
std::stringstream sstr;
sstr << lpTotalNumberOfFreeBytes << _T( " bytes" );
GetDlgItem( IDC_SPACE )->SetWindowText( sstr.str().c_str() );
-----------
Mila
|
|
|
|
|
write the code of GetDiskFreeSpaceEx in OnInitDialog Of that particular dialog.
And show it in edit boxes using SetDlgItemText API.
Mahesh Kulkarni
The secret of life is not enjoyment
but education through experience.
- Swami Vivekananda.
|
|
|
|
|
|
check with GetVolumeInformation(...) Api to get the HardDisk Info.
cheers,
uday.
uday kiran
|
|
|
|
|
Exactly how can GetVolumeInformation() be used to get the hard disk free space?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Hi friends,
I use above class and CDaoRecordset for writing into xls file. I set one button. on button event, i write following code
CString Sql,Name,Addr;
GetDlgItemText(IDC_NAME,Name);
GetDlgItemText(IDC_ADDRESS,Addr);
db.Open("Pis.xls");
Sql = "SELECT * FROM Pis";
recset.Open(CRecordset::forwardOnly,Sql,NULL);
recset.AddNew();
recset.SetFieldValue("Name",(LPCSTR)Name);
recset.SetFieldValue("Addr",(LPCSTR)Addr);
recset.Update();
recset.Close();
db.Close();
}
when I enter name and address and click on button, error message come
could'nt open database. unrecognise database format
friend kindly give me a reply. why i am not able to write and read data from xls
Regards
kedar
Girish
Software Developer
|
|
|
|
|
did you specify the pis.xls path correctly? pls check the path of the xls file i mean db.open("path\\pis.xls") give path correctly and i hope it works correctly.
cheers,
uday.
uday kiran
|
|
|
|
|
I have added a new interface(using dispinterface) in odl file. Now how do I check whether the activex control register has the new interface or not. ?
Will "AfxOleRegisterTypeLib" will register all the interfaces existing in the library ? What if old library is register and I am to use new methods in new interfaces ?
Any help on it.
Best Regards,
"C makes it easy to shoot yourself in the foot. C++ makes it
harder, but when you do, it blows away your whole leg."
- Bjarne Stroustrup
|
|
|
|
|
hi,
i want to send a singnal to another application thru socket and make a video(mpeg) file play.. wat r the steps i need to do to play the file
there is always a tomorrow
|
|
|
|
|
When the another application receives the signal, use ShellExecute function
nave
|
|
|
|
|
i'm a beginner,can u elaborate on that please..
there is always a tomorrow
|
|
|
|
|
I said the process to start playing a file after the second application have got the signal for the same( I think u have accomplished that task. isn't it? )
So when ur application receive the signal, use the ShellExecute api.See the help..
ShellExecute(NULL,_T("open"),"wmplayer.exe",csPath,NULL,SW_SHOW);
here the csPath should specify the path of file to play
nave
|
|
|
|
|
hi naveen,
thanks. i was able to open the wmplayer using ur code. the file does not play automatically. i gave full path of the file.. anyway i'll try it out.
there is always a tomorrow
|
|
|
|
|
i tried it out.. Its working here...I hope the problem is with the path u give.
if u r giving a path hard code in the program, Please note the point marked bold below ..
ShellExecute(NULL,_T("open"),"wmplayer.exe","c:\film\cut1.mpg",NULL,SW_SHOW); // will not work
ShellExecute(NULL,_T("open"),"wmplayer.exe","c:\\film\\cut1.mpg",NULL,SW_SHOW); // will work
good luck
nave
|
|
|
|