⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sopen.c

📁 vc library 韩国语版 希望对大家又帮助
💻 C
字号:
 #include <io.h>
 #include <fcntl.h>
 #include <sys\stat.h>
 #include <process.h>
 #include <share.h>
 #include <stdio.h>

 int main(void)
 {
    int handle;
    int status;

    handle = sopen("c:\\autoexec.bat", O_RDONLY, SH_DENYNO, 
S_IREAD);

    if (!handle)
    {
       printf("sopen failed\n");
       exit(1);
    }

    status = access("c:\\autoexec.bat", 6);
    if (status == 0)
       printf("read/write access allowed\n");
    else
       printf("read/write access not allowed\n");

    close(handle);
    return 0;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -