|
Check your Configuration manager. If you can think then I Can.
|
|
|
|
|
|
|
rather than removing the question (which results in a crippled thread) you should:
- append "SOLVED" to the original subject line
- and publish the solution to the benefit of the community.
|
|
|
|
|
how do you published when issues are resolved.
|
|
|
|
|
just add a reply to one of the messages in the thread (the one that helped you most, the last one, or the question itself).
|
|
|
|
|
Thanks in Advance
Is it Possible to get the File/Folder Copying History , like who copied a folder at what time etc Best Regards,
SOFTDEV
If you have knowledge, let others light their candles at it
|
|
|
|
|
I would have thought by now, with the other questions you have asked relating to this subject area, that you would know this is not easy to do.
You would have to hook into the system, and watch for all the file io operations.
|
|
|
|
|
I don't beieve that this information is logged anywhere. It would probably add quite an overhead to any OS. txtspeak is the realm of 9 year old children, not developers. Christian Graus
|
|
|
|
|
Windows and NTFS do not track such information. There is no way to get it.
Even writing an NTFS extension wouldn't do anynthing for you since a copy operation is nothing more than "open a file and read it". There's no way to tell the difference between a file being copied and one being read by its application.
|
|
|
|
|
Thanks alot for sharing the information Best Regards,
SOFTDEV
If you have knowledge, let others light their candles at it
|
|
|
|
|
Yes it is Possible. You Should be work on Clipboard Hook. If you can think then I Can.
|
|
|
|
|
No, it's not. Clipboard won't give you the files that are dragged and dropped, nor will it give you anything done through a CMD prompt. Ever hear of XCOPY?
|
|
|
|
|
Yes
Clipboard not get the information regarding Dragged and Droped ,or Sendto method or Command Prompt .If you can think then I Can.
|
|
|
|
|
Hi all...
I am trying to format my pen drive by calling API SHFormatDrive function but it gives an error message.
I am using the following lines of code :
Private Declare Function SHFormatDrive Lib "shell32" (ByVal hwnd As Long, ByVal iDrive As Long, ByVal iCapacity As Long, ByVal iFormatType As Long) As Long
Const SHFD_CAPACITY_DEFAULT = 0 'default drive capacity
Const SHFD_FORMAT_QUICK = 0 'Quick format.
Const SHFD_FORMAT_FULL = 1 'Full format.
Private Sub btnStart_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnStart.Click
Try
Dim drvToFormat As Long = 6 '6 is the index of pendrive for G: drive.
Dim ret As Long
If chkQuickFormat.Checked Then 'Check for quick format.
ret = SHFormatDrive(Me.Handle.ToInt32, _
drvToFormat, _
SHFD_CAPACITY_DEFAULT, _
SHFD_FORMAT_QUICK)
Else
ret = SHFormatDrive(Me.Handle.ToInt32, _
drvToFormat, _
SHFD_CAPACITY_DEFAULT, _
SHFD_FORMAT_FULL)
End If
Select Case ret
Case -1
MsgBox("Error during format operation")
Case -2
MsgBox("Operation canceled by user")
Case -3
MsgBox("This drive cannot be formatted")
Case Else
MsgBox("Done")
End Select
Catch ex As Exception
MsgBox(ex.Message)
End Try
End If
End Sub
The above code is giving an error that "A call to PInvoke function 'SHFormatDrive' has unbalanced the stack. This is likely because the managed PInvoke signature does not match the unmanaged target signature. Check that the calling convention and parameters of the PInvoke signature match the target unmanaged signature."
I don't know exactly what is going wrong and when I am trying to format my pen drive, the above code is first checking for A: drive and then it is giving error.
Suggest me what should I do.
Thanks.
Gagan
|
|
|
|
|
Shouldn't the Me.Handle.ToInt32 be Me.Handle (a long?)
--edit--
PInvoke.net[^] claims that the signature should contain uint , not a long .I are Troll
modified on Sunday, March 7, 2010 6:48 AM
|
|
|
|
|
I tried Me.Handle.ToInt64 as it returns a long value but I still have the same error.
|
|
|
|
|
That would only pose a problem if the handle doesn't fit in a Int32 . Still, seems like the error you're getting is supported by the PInvoke.net claim; a uint isn't a long .I are Troll
|
|
|
|
|
Can you not just use My.Computer.FileSystem.Drives(x).DriveFormat() and keep it managed?
Ignore, i'm speaking pish!Dave
Don't forget to rate messages!Find Me On: Web| Facebook| Twitter| LinkedInWaving? dave.m.auld[at]googlewave.com
modified on Sunday, March 7, 2010 7:45 AM
|
|
|
|
|
daveauld wrote: My.Computer.FileSystem.Drives(x).DriveFormat()
Don't you know what it does? It only tells the drive format as FAT or NTFS and does not format the drive. I want to format my pen drive not to get its drive format name.
Gagan
|
|
|
|
|
Apologies misread the doc's, when i saw the FAT/NTFS, i thought that was the format options.
Note To Self: Don't skim read!
|
|
|
|
|
|
Gagan.20 wrote: Private Declare Function SHFormatDrive Lib "shell32" (ByVal hwnd As Long, ByVal iDrive As Long, ByVal iCapacity As Long, ByVal iFormatType As Long) As Long
You found and used a Declare for SHFormat that works with VB6, not VB.NET. Hint: Long in VB6 was a 32-bit signed Integer. Long in VB.NET is a 64-bit signed Integer.
|
|
|
|
|
When I am using the below code, it appears a Windows format window to format the drive.
<Runtime.InteropServices.DllImport("shell32.dll")> _
Private Shared Function SHFormatDrive(ByVal hwnd As IntPtr, ByVal drive As UInteger, ByVal fmtID As UInteger, ByVal options As UInteger) As UInteger
End Function
Public Enum SHFormatFlags As Integer
SHFMT_ID_DEFAULT = &HFFFF
SHFMT_OPT_FULL = &H1
SHFMT_OPT_SYSONLY = &H2
SHFMT_ERROR = &HFFFFFFFF
SHFMT_CANCEL = &HFFFFFFFE
SHFMT_NOFORMAT = &HFFFFFFD
End Enum
Private Sub btnStart_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnStart.Click
Dim ret = SHFormatDrive(Me.Handle.ToInt64, _
drvToFormat, _
CUInt(SHFormatFlags.SHFMT_ID_DEFAULT), _
0)
msgbox(ret.tostring)
End Sub
It appears Windows format option to format the drive but I want that when I click on start button, it start formatting rather than displaying another window to format drive.
Tell me what should I do.
Thanks.
Gagan
|
|
|
|
|
You could use WMI to format the drive; see http://msdn.microsoft.com/en-us/library/aa390432(VS.85).aspx[^]
I don't have any sample code to share, you will have to do some digging yourself.
[Edit: this page says that it is supported on Server only, not Clients. I would imagine there is an equivalent somewhere that is supported.]
|
|
|
|