using anonymous pipes for local interprocess communication on OF 0.7.4 vs 2010

Hello,

I try to develop anonymous pipes for local interprocess communication, referring this article… http://msdn.microsoft.com/en-us/library/bb546102.aspx

I put this two lines in testApp.cpp

#using <System.dll>
#using <System.Core.dll>

using namespace System;
using namespace System::IO;
using namespace System::IO::Pipes;
using namespace System::Diagnostics;

void testApp::setup() {

}

void testApp:update() {

}

void testApp:draw() {

Process^ pipeClient = gcnew Process();

pipeClient->StartInfo->FileName = “pipeClient.exe”;

AnonymousPipeServerStream^ pipeServer =
gcnew AnonymousPipeServerStream(PipeDirection::Out,
HandleInheritability::Inheritable);
// Show that anonymous pipes do not support Message mode.
try
{
Console::WriteLine("[SERVER] Setting ReadMode to “Message”.");
pipeServer->ReadMode = PipeTransmissionMode::Message;
}
catch (NotSupportedException^ e)
{
Console::WriteLine("[SERVER] Exception:\n {0}", e->Message);
}

Console::WriteLine("[SERVER] Current TransmissionMode: {0}.",
pipeServer->TransmissionMode);

}

and they showed

“Error:”#using" requires C++/CLI to be enabled

at the #using <System.dll>, so, on Project Properties->Configuration Properties->General->Common Language Runtime Support, I changed this from “No common Language Runtime Support” to “Common Language Runtime Support (/clr)”.

Then I tried rebuild and got another error which is

Command line error D8016: ‘/ZI’ and ‘/clr’ command-line options are incompatible…

Now I completely lost…

Does anyone have a solution of how to build anonymous pipe on of 0.7.4??

Thanks in advance.

Tomoya

OpenFrameworks 0.7.4 / Visual Studio 2010 / compiler v100

you are mixing c# and C++; that won’t work :slight_smile:

I did something similar (pipe images from c# to OF), you can find info here:
http://forum.openframeworks.cc/t/sharing-300mbits-of-imagesamp;data-between-c-apps-and-of-on-local-computer/11730/0

also, at the bottom, a link to a project using the code, examples in both in c++ and c#

you could easily extend this from images to regular text.