Good day. I've been looking at several example programs for LED, PWM, etc. .. but within these programs there are some lines of code I do not understand its operation, someone could help me with this .. lines of code are: * Hport = CreateFile ("LED1", GENERIC_READ Or GENERIC_WRITE, 0, IntPtr.Zero, OPEN_EXISTING, 0, IntPtr.Zero) * DeviceIoControl (hport, LED_All_ON, Nothing, 0, Nothing, 0, 0, IntPtr.Zero) * Hport = CreateFile ("PWM1:", GENERIC_READ Or GENERIC_WRITE, 0, IntPtr.Zero, OPEN_EXISTING, 0, IntPtr.Zero) * If (hport = INVALID_HANDLE_VALUE) Then MsgBox ("LED1 Driver Open Fail") End If What does each line of code? thank you very much
explanation of some statements in Windows CE
Hello, Drivers like LED or PWM are stream drivers. A stream driver is accessed with the CreateFile function that returns a handle to the driver. With this handle, you can send IOCTL commands to the driver with the DeviceIoControl function. domodom