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
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