Tag: kernel32

Excel VBA:通过命名pipe道进行通信

我试图通过VBA中的named pipe设置通信不幸的是,由于某种原因,它永远不会到达Debug.Print "Connected在服务器Debug.Print "Connected ,也没有客户端连接。似乎是一个简单的情况,但一直试图让这个去小时。 服务器 Public Sub Server() Const szPipeName = "\\.\pipe\bigtest" Dim hPipe As Long, readVal As Long, readBytes As Long, sendVal As Long, sentBytes As Long Dim sa As SECURITY_ATTRIBUTES 'Create the NULL security token for the pipe pSD = GlobalAlloc(GPTR, SECURITY_DESCRIPTOR_MIN_LENGTH) res = InitializeSecurityDescriptor(pSD, SECURITY_DESCRIPTOR_REVISION) res = SetSecurityDescriptorDacl(pSD, -1, 0, 0) […]