funtc210b.dat
来自「指令字典2005里面可以方便的查找一些函数」· DAT 代码 · 共 34 行
DAT
34 行
#include <io.h>
#include <fcntl.h>
#include <sys\stat.h>
#include <process.h>
#include <share.h>
#include <stdio.h>
int main(void)
{
int handle, status;
long length;
handle = sopen("c:\autoexec.bat",O_RDONLY,SH_DENYNO,S_IREAD);
if (handle < 0)
{
printf("sopen failed");
exit(1);
}
length = filelength(handle);
status = lock(handle,0L,length/2);
if (status == 0)
printf("lock succeeded");
else
printf("lock failed");
status = unlock(handle,0L,length/2);
if (status == 0)
printf("unlock succeeded");
else
printf("unlock failed");
close(handle);
return 0;}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?