📄 io.cpp
字号:
#include "io.h"PORTOUT PortOut;PORTWORDOUT PortWordOut;PORTDWORDOUT PortDWordOut;PORTIN PortIn;PORTWORDIN PortWordIn;PORTDWORDIN PortDWordIn;SETPORTBIT SetPortBit;CLRPORTBIT ClrPortBit;NOTPORTBIT NotPortBit;GETPORTBIT GetPortBit;RIGHTPORTSHIFT RightPortShift;LEFTPORTSHIFT LeftPortShift;ISDRIVERINSTALLED IsDriverInstalled;HMODULE hio = NULL;void UnloadIODLL() { FreeLibrary(hio);}int LoadIODLL(){ if (hio != NULL) return 0; hio = LoadLibrary("io.dll"); if (hio == NULL) return 1; PortOut = (PORTOUT)GetProcAddress(hio, "PortOut"); PortWordOut = (PORTWORDOUT)GetProcAddress(hio, "PortWordOut"); PortDWordOut = (PORTDWORDOUT)GetProcAddress(hio, "PortDWordOut"); PortIn = (PORTIN)GetProcAddress(hio, "PortIn"); PortWordIn = (PORTWORDIN)GetProcAddress(hio, "PortWordIn"); PortDWordIn = (PORTDWORDIN)GetProcAddress(hio, "PortDWordIn"); SetPortBit = (SETPORTBIT)GetProcAddress(hio, "SetPortBit"); ClrPortBit = (CLRPORTBIT)GetProcAddress(hio, "ClrPortBit"); NotPortBit = (NOTPORTBIT)GetProcAddress(hio, "NotPortBit"); GetPortBit = (GETPORTBIT)GetProcAddress(hio, "GetPortBit"); RightPortShift = (RIGHTPORTSHIFT)GetProcAddress(hio, "RightPortShift"); LeftPortShift = (LEFTPORTSHIFT)GetProcAddress(hio, "LeftPortShift"); IsDriverInstalled = (ISDRIVERINSTALLED)GetProcAddress(hio, "IsDriverInstalled"); atexit(UnloadIODLL); return 0;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -