想用命名管道实现c#和c++进程间通信,在c#中使用时好像要用到SecurityAttributes类,请问包含它的名字空间是什么
重载代码: [DllImport("kernel32.dll", SetLastError = true)] public static extern IntPtr CreateFile (
String lpFileName, // file name
uint dwDesiredAccess, // access mode
uint dwShareMode, // share mode
SecurityAttributes attr, // SD
uint dwCreationDisposition, // how to create
uint dwFlagsAndAttributes, // file attributes
uint hTemplateFile // handle to template file
);
重载代码: [DllImport("kernel32.dll", SetLastError = true)] public static extern IntPtr CreateFile (
String lpFileName, // file name
uint dwDesiredAccess, // access mode
uint dwShareMode, // share mode
SecurityAttributes attr, // SD
uint dwCreationDisposition, // how to create
uint dwFlagsAndAttributes, // file attributes
uint hTemplateFile // handle to template file
);
解决方案 »
- c#抓取网页代码,无法提取代码中Type=TEXT属性文本,
- 一个简单的问题
- DataGridview不能横向移动了,请问这是哪个属性控制的啊!分少别见怪!
- 如何在A4纸上正确打印出图像
- C#插入图片后再插入文字后图片会被覆盖
- 关于保存参数大家怎么处理?
- 关于窗口激活的问题
- 请问DataView中的FIND方法,为什么不能反回对应的行。
- dropdownlist
- www.codeproject.com上面的ASP.NET源码为何打不开?
- MSDN Library 不能显示怎么办呀,急呀!!!!!!!!!!!!!!!!!!!!!!!!!!!
- 用WinForm生成了一个带SQL文件的程序,能在未装SQL的机器上运行吗?
我收藏了这个 看看有没有帮助
http://p58.net/?tag=/c%23&page=2
在封装类的下面加上以下代码:[StructLayout(LayoutKind.Sequential)]
public class Overlapped
{
}[StructLayout(LayoutKind.Sequential)]
public class SecurityAttributes
{
}
谢谢大家!