http://www.newton-inc.com/dev/techinfo/qa/qa.htmCDPipeInit, it returns a -28102 error (Communication tool not found). I've checked that the tool is installed properly, and the DIL sample application works fine. What's wrong?CSTR.rsrc" to your project and see if that fixes things.SetupPortMenu function in SoupDrink.c for an example.FDget function return error -28801 (Out of heap memory) or -28706 (Invalid parameter)? I don't think I'm out of memory, and I don't always get this error code so my parameters must be right. What is wrong?A:={first: {left:3, right: 30, top:10, bottom:90}};
A.second := A.first; // triggers the problem
B:={first: {left:3, right: 30, top:10, bottom:90}};
B.second := clone(B.first); // cloning avoids the problem
C:={first: {left:3, right: 30, top:10, bottom:90, foo: nil}};
C.second := C.first; // no problem since C.foo exists
D:={first: {left:3, right: 30, top:10, bottom:1000}};
D.second := D.first; // no problem since D.bottom is >255
CDPipeListen, but it never seems to be called. What is going wrong?CDPipeListen, the callback function never gets called in Windows applications. You will have to use a synchronous listen, then wait for the state of the DIL pipe to change before accepting the connection. The following code shows how to properly accept a connection.
anErr = CDPipeListen( gOurPipe, kDefaultTimeout, NULL, 0 );
if (!anErr)
{
// This code doesn't need to be executed on MacOS, but
// is currently required for Windows. We need to loop,
// waiting for the connection state to change to
// kCDIL_ConnectPending.
endTime = (GetTickCount()/1000) + 30; // to timeout in 30 seconds
while ((GetTickCount()/1000) < endTime )
{
if (CDGetPipeState( gOurPipe ) == kCDIL_ConnectPending) {
anErr = CDPipeAccept( gOurPipe );
break;
} else
CDIdle( gOurPipe );
}
}