الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

خفايا المكتبة Coredll.dll

مغلق
بدأه بن العيد في 19 أغسطس 2007 · 0 رد · 2,391 مشاهدة · في برمجة الأجهزة الكفية والمحمولة بالدوت نيت
مشاركة: واتساب X فيسبوك تيليجرام
#1

السلام عليكم

تعتبر المكتبةCoredll.dll القلب النابض لنظام التشغيل في حواسيب الكف والهواتف الذكية التابعة لمايكروسوفة.

أستعرض في هذا الموضوع أغلب الدوال التي توفرها هذه المكتبة والتي تيسر كثيرا تطوير عدة تطبيقات. الموضوع مرفق أيضا بتطبيقين أحدهما بالسي شارب والآخر بالفيزوال بازيك دوت نت لمزيد فهم وضائف هاته الدوال.

post-91400-1187531967_thumb.jpg

المدخلات

C#


protected static extern uint RegisterHotKey

[DllImport("coredll.dll")]
protected static extern uint UnregisterFunc1

[DllImport("coredll.dll")]
protected static extern short GetAsyncKeyState
				  [DllImport("coredll.dll")]

VB


Protected Shared Function RegisterHotKey

<DllImport("coredll.dll")>
Protected Shared Function UnregisterFunc1

<DllImport("coredll.dll")>
Protected Shared Function GetAsyncKeyState
				   <DllImport("coredll.dll")>

الذاكرة

C#

					   [DllImport("coredll.dll")]
						extern public static IntPtr LocalAlloc

						  [DllImport("coredll.dll")]
						extern public static IntPtr LocalFree

						 [DllImport("coredll.dll")]
					   extern public static IntPtr LocalReAlloc

VB

					  <DllImport("coredll.dll")> 
						  Public Shared Function LocalAlloc 

						   <DllImport("coredll.dll")> 
						  Public Shared Function LocalFree 

						   <DllImport("coredll.dll")> 
						  Public Shared Function LocalReAlloc

حال الذاكرة

C#



[DllImport("CoreDll.dll")]
public static extern void GlobalMemoryStatus

[DllImport("CoreDll.dll")]
public static extern int GetSystemMemoryDivision
				  public class MEMORYSTATUS

VB



<DllImport("CoreDll.dll")>
Public Shared Sub GlobalMemoryStatus

<DllImport("CoreDll.dll")>
Public Shared Function GetSystemMemoryDivision
				 Public Class MEMORYSTATUS

مقياس الأداء

C#


public static extern int QueryPerformanceFrequency

[DllImport("CoreDll.dll")]
public static extern int QueryPerformanceCounter
				 [DllImport("CoreDll.dll")]

VB


Public Shared Function QueryPerformanceFrequency

<DllImport("CoreDll.dll")>
Public Shared Function QueryPerformanceCounter
				<DllImport("CoreDll.dll")>

مستوى البطارية

C#

					   public class SYSTEM_POWER_STATUS_EX2
							public class SYSTEM_POWER_STATUS_EX

							[DllImport("coredll")]
						   public static extern uint GetSystemPowerStatusEx

							[DllImport("coredll")]
						   public static extern uint GetSystemPowerStatusEx2

VB

					   Public Class SYSTEM_POWER_STATUS_EX2
						  Public Class SYSTEM_POWER_STATUS_EX

						  <DllImport("coredll")>
							Public Shared Function GetSystemPowerStatusEx

							<DllImport("coredll")>
							  Public Shared Function GetSystemPowerStatusEx2

SIP:Software Input Panel

C#

					[DllImport("coredll.dll")]
					  public extern static void SipShowIM

						   [DllImport("coredll.dll")]
						 public extern static uint SipStatus();

						  public struct RECT
						  public class SIPINFO

						   [DllImport("coredll.dll")]
						  public extern static uint SipGetInfo

						   [DllImport("coredll.dll")]
						  public extern static uint SipSetInfo

VB

					<DllImport("coredll.dll")>
					  Public Shared Sub SipShowIM

					   <DllImport("coredll.dll")>
					  Public Shared Function SipStatus() As Integer

						   Public Structure RECT
					   Public Class SIPINFO

						   <DllImport("coredll.dll")>
						   Public Shared Function SipGetInfo

						   <DllImport("coredll.dll")>
						  Public Shared Function SipSetInfo

System Reset: أعادة التشغيل الجهاز

C#

					[DllImport("Coredll.dll")]
					  public extern static uint KernelIoControl

VB

				   <DllImport("Coredll.dll")>
					  Public Shared Function KernelIoControl

توقيت الجهاز

C#

					 public struct SYSTEMTIME 

							 [DllImport("coredll.dll")]
							public extern static void GetSystemTime

							 [DllImport("coredll.dll")]
							public extern static uint SetSystemTime

VB



<DllImport("coredll.dll")>
Public Shared Sub GetSystemTime

<DllImport("coredll.dll")>
Public Shared Function SetSystemTimeWave Out
				  Public Structure SYSTEMTIME

Wave Out

C#

		   
						 [DllImport ("coredll.dll")]
							protected static extern int waveOutGetNumDevs();

							 [DllImport ("coredll.dll")]
							private static extern Wave.MMSYSERR waveOutOpen

							 [DllImport ("coredll.dll")]
							protected static extern Wave.MMSYSERR waveOutGetVolume

							 [DllImport ("coredll.dll")]
							protected static extern Wave.MMSYSERR waveOutSetVolume

							 [DllImport ("coredll.dll")]
							private static extern Wave.MMSYSERR waveOutPrepareHeader

							 [DllImport ("coredll.dll")]
							private static extern Wave.MMSYSERR waveOutWrite

							 [DllImport ("coredll.dll")]
							private static extern Wave.MMSYSERR waveOutUnprepareHeader

							 [DllImport ("coredll.dll")]
							protected static extern Wave.MMSYSERR waveOutClose

							 [DllImport ("coredll.dll")]
							protected static extern Wave.MMSYSERR waveOutReset

							 [DllImport ("coredll.dll")]
							protected static extern Wave.MMSYSERR waveOutPause

							 [DllImport ("coredll.dll")]
							protected static extern Wave.MMSYSERR waveOutRestart

							 protected class MMTIME

							 [DllImport ("coredll.dll")]
							protected static extern Wave.MMSYSERR waveOutGetPosition

							protected class WAVEOUTCAPS

							 [DllImport ("coredll.dll")]
							protected static extern Wave.MMSYSERR waveOutGetDevCaps

VB

					  <DllImport("coredll.dll")>
						Protected Shared Function waveOutGetNumDevs() As Integer

						<DllImport("coredll.dll")>
					   Private Shared Function waveOutOpen

						<DllImport("coredll.dll")>
					   Protected Shared Function waveOutGetVolume

						<DllImport("coredll.dll")>
					   Protected Shared Function waveOutSetVolume

						<DllImport("coredll.dll")>
					   Private Shared Function waveOutPrepareHeader

							<DllImport("coredll.dll")>
						   Private Shared Function waveOutWrite

							<DllImport("coredll.dll")>
						   Private Shared Function waveOutUnprepareHeader

							<DllImport("coredll.dll")>
						   Protected Shared Function waveOutClose

							<DllImport("coredll.dll")>
						   Protected Shared Function waveOutReset

							<DllImport("coredll.dll")>
						   Protected Shared Function waveOutPause

							<DllImport("coredll.dll")>
						   Protected Shared Function waveOutRestart

							Protected Class MMTIME

							 <DllImport("coredll.dll")>
							Protected Shared Function waveOutGetPosition

							 Protected Class WAVEOUTCAPS

							  <DllImport("coredll.dll")>
							 Protected Shared Function waveOutGetDevCaps

Wave In

C#

					   [DllImport ("coredll.dll")]
						 protected static extern int waveInGetNumDevs();

						  [DllImport ("coredll.dll")]
							 private static extern Wave.MMSYSERR waveInOpen

							  [DllImport ("coredll.dll")]
							 private static extern Wave.MMSYSERR waveInPrepareHeader

							  [DllImport ("coredll.dll")]
							 private static extern Wave.MMSYSERR waveInUnprepareHeader

							  [DllImport ("coredll.dll")]
							 protected static extern Wave.MMSYSERR waveInClose

							  [DllImport ("coredll.dll")]
							 protected static extern Wave.MMSYSERR waveInReset

							  [DllImport ("coredll.dll")]
							 protected static extern Wave.MMSYSERR waveInStart

							  [DllImport ("coredll.dll")]
							 protected static extern Wave.MMSYSERR waveInStop

							  [DllImport ("coredll.dll")]
							 private static extern Wave.MMSYSERR waveInAddBuffer

							 protected class WAVEINCAPS

							 [DllImport ("coredll.dll")]
							protected static extern Wave.MMSYSERR waveInGetDevCaps

VB

					  <DllImport("coredll.dll")>
						Protected Shared Function waveInGetNumDevs() As Integer

							 <DllImport("coredll.dll")>
							Private Shared Function waveInOpen

							 <DllImport("coredll.dll")>
							Private Shared Function waveInPrepareHeader

							 <DllImport("coredll.dll")>
							Private Shared Function waveInUnprepareHeader

							 <DllImport("coredll.dll")>
							Protected Shared Function waveInClose

							 <DllImport("coredll.dll")>
							Protected Shared Function waveInReset

							 <DllImport("coredll.dll")>
							Protected Shared Function waveInStart

							 <DllImport("coredll.dll")>
							Protected Shared Function waveInStop

						 <DllImport("coredll.dll")>
						Private Shared Function waveInAddBuffer

						Protected Class WAVEINCAPS

						<DllImport("coredll.dll")>
					   Protected Shared Function waveInGetDevCaps

نظام التشغيل

C#

		 
						 [DllImport("coredll.dll")]
							public static extern IntPtr GetCapture();

							 [DllImport("CoreDll")]
							public static extern IntPtr FindWindow

							 [DllImport("CoreDll")]
							public static extern bool ShowWindow

VB

					  <DllImport("coredll.dll")>
						Public Shared Function GetCapture() As IntPtr

							 <DllImport("CoreDll")>
							Public Shared Function FindWindow

						 <DllImport("CoreDll")>
							Public Shared Function ShowWindow

Registry

C#

						[DllImport("coredll.dll", SetLastError=true)]
							  public static extern int RegCreateKeyEx

							   [DllImport("coredll.dll", SetLastError=true)]
							  public static extern int RegDeleteKey

							[DllImport("coredll.dll", SetLastError=true)]
							   public static extern int RegOpenKeyEx

							[DllImport("coredll.dll", SetLastError=true)]
							   public static extern int RegQueryValueEx

							[DllImport("coredll.dll", SetLastError=true)]
							   public static extern int RegSetValueEx

							[DllImport("coredll.dll", SetLastError=true)]
							   public static extern int RegDeleteValue

							[DllImport("coredll.dll", SetLastError=true)]
							   public static extern int RegCloseKey

VB

						 <DllImport("coredll.dll", SetLastError:=True)> _
							   Public Shared Function RegCreateKeyEx

							<DllImport("coredll.dll", SetLastError:=True)> _
							   Public Shared Function RegDeleteKey

							 <DllImport("coredll.dll", SetLastError:=True)> _
							   Public Shared Function RegOpenKeyEx

								 <DllImport("coredll.dll", SetLastError:=True)> _
							   Public Shared Function RegQueryValueEx

								 <DllImport("coredll.dll", SetLastError:=True)> _
							   Public Shared Function RegSetValueEx

								<DllImport("coredll.dll", SetLastError:=True)> _
							   Public Shared Function RegDeleteValue

							   <DllImport("coredll.dll", SetLastError:=True)> _
						  Public Shared Function RegCloseKey

الهاتف

C#


private static extern int PhoneMakeCall

[DllImport("Phone.dll")]
private static extern void PhoneOpenCallLog

[DllImport("Phone.dll")]
private static extern void PhoneCloseCallLog

[DllImport("Phone.dll")]
private static extern void PhoneGetCallLogEntry

[DllImport("Phone.dll")]
private static extern void PhoneSeekCallLog
	   [DllImport("Phone.dll")]

VB

					  <DllImport("Phone.dll")> _
							 Private Shared Function PhoneMakeCall

						  <DllImport("Phone.dll")> _
							 Private Shared Sub PhoneOpenCallLog

						  <DllImport("Phone.dll")> _
							 Private Shared Sub PhoneCloseCallLog

						  <DllImport("Phone.dll")> _
							 Private Shared Sub PhoneGetCallLogEntry

						  <DllImport("Phone.dll")> _
							 Private Shared Sub PhoneSeekCallLog

المجلدات

C#

 
						  [DllImport("Coredll.dll")]
							 static extern int SHGetSpecialFolderPath

						   [DllImport("coredll.dll")]
							 public static extern bool GetDiskFreeSpaceEx

VB

					   <DllImport("Coredll.dll")> _
							 Shared Function SHGetSpecialFolderPath

						  <DllImport("coredll.dll")> _
							 Public Shared Function GetDiskFreeSpaceEx

لوحة المفاتيح

C#

					   [DllImport("Coredll.dll")]
							 static extern uint GetKeyboardStatus

'VB

					  <DllImport("Coredll.dll")> _
							Shared Function GetKeyboardStatus

الموضوع الأصلي متوفر في هذا

الرابط

CS.rar

VB.rar

تم تعديل هذه المشاركة بواسطة Ben_Laiid في 19 أغسطس 2007 في 17:20

هذا الموضوع مغلق.

مواضيع مشابهة