28-07-13, 09:11 AM
الشي الي مؤرقني هو ان الHandle يجلبه الfilestream يكون خطير ليش خطير ومن اي ناحية ماادري
المهم هذا الكود - فيجوال
السي شارب لإفادة الجميع :
المهم هذا الكود - فيجوال
PHP كود :
Dim fs As New System.IO.FileStream("wmi file path", System.IO.FileMode.Open)
Dim handle As SafeFileHandle = fs.SafeFileHandle
Dim fHandle As IntPtr = handle.DangerousGetHandle()
السي شارب لإفادة الجميع :
PHP كود :
System.IO.FileStream fs = new System.IO.FileStream("wmi file path", System.IO.FileMode.Open);
SafeFileHandle handle = fs.SafeFileHandle;
IntPtr fHandle = handle.DangerousGetHandle();