Overlapped I/O operation is in progress

M

man-ab

Hello

In a W2000 server, we have the message:

"Overlapped I/O operation is in progress. (997)"

We are using SLNet telnet server, with PIPE. The application is VC++.
The code to inicialize the PIPE is:

char PipeName[256];
char *EnvPipeName;
char Temp[256];
int PipeHandle;
int BytesRead;
FILE *f;

void IM_IniciaTerminal()
{
char Msg[50];
char FileName[256];

EnvPipeName = getenv ("PIPENAME");
if (EnvPipeName){
sprintf (PipeName, "\\\\.\\PIPE\\%s", EnvPipeName);
PipeHandle = open (PipeName, _O_WRONLY);
if (PipeHandle == -1) {
printf("Cannot open pipe");
exit (-1);
}
}
else {
printf("Environment variable error");
exit(-1);
}
sprintf(FileName,"LOGTANT.DAT");
f=fopen(FileName,"w");
sprintf(Msg,"PipeName %s",PipeName);
IM_Debug(Msg);

// Standard Handles i/o
hIn=GetStdHandle(STD_INPUT_HANDLE);
hOut=GetStdHandle(STD_OUTPUT_HANDLE);
// Cleans events of keyboard
while (KbHit())
GetKey();
}

void IM_Debug(char *Str)
{
fprintf(f,"%s\n",Str);
fflush(f);
}

My english is very limited, but if you need something more ...

Thank you very much
 
W

William DePalo [MVP VC++]

man-ab said:
In a W2000 server, we have the message:

"Overlapped I/O operation is in progress. (997)"

I see some code but I don't see the place where I expected to see the
thread's error code returned with GetLastError(). So, where does the error
occur?

Regards,
Will
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top