Problem with Language Monitor

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Suman (anonymous_at_discussions.microsoft.com)
Date: 05/17/04


Date: Mon, 17 May 2004 03:21:05 -0700

Dear All

My project is divided into two parts one is client and other is server (which is Language Monitor DLL).
On server side creates NamedPipe using “CreateNamedPipe” and waiting for Client connection using “ConnectNamedPipe” Win32 API’s.

Once the connection is established ReadFile and WriteFile follows.

After three times successfully ReadFile and WriteFile operation server side application terminates when it try to read from Pipe(using ReadFile), with error code 998 which is “Invalid access to memory location.”

I am passing a buffer (which is a structure) to ReadFile, which I have allocated through “new”.

My Observations:

1.

“Spoolsv.exe” calls my Server DLL (which is a Language Monitor DLL) on every system reboot.
If I try to stop “Spoolsv.exe” through Task Manager and again start “Spoolsv.exe” by double clicking, every thing works fine. Problem occurs only when “Spoolsv.exe” calls my dll just after reboot.
 
2.

If I add

BASEDIR C:\DDK
DDKDRIVE C:

into environment setting then my systems works fine.

I have not installed DDK on my system; I am just adding these two entries.

3.

If I am creating my own heap using “HeapCreate” API function and allocating memory through “HeapAlloc” API then every thing working fine.

Development and Test environment:

Visual studio 5.0
XP Service pack 1.
Window XP.
 
Could you tell where I would be going wrong?



Relevant Pages

  • Problem with Language monitor
    ... My project is divided into two parts one is client and other is server (which is Language Monitor DLL). ... On server side creates NamedPipe using “CreateNamedPipe” and waiting for Client connection using “ConnectNamedPipe” Win32 API’s. ... Once the connection is established ReadFile and WriteFile follows. ...
    (microsoft.public.development.device.drivers)
  • Re: A question about Named Pipe?
    ... I have a memory that it will come out of its ReadFile with (or for async, ... the session and it would make no sense to send additional information to the server via ... that pipe. ... >In block mode, once ConnectNamedPipereturns, it means the client called ...
    (microsoft.public.vc.mfc)
  • ReadFile API fails(Error code 998)
    ... On server side I have created NamedPipe using “CreateNamedPipe” and waiting for Client connection using “ConnectNamedPipe” Win32 API’s. ... Once the connection is established ReadFile and WriteFile follows. ... After three-four times ReadFile and WriteFile operation my server side application terminates when it try to read from Pipe, with error code 998 which is “Invalid access to memory location.” ...
    (microsoft.public.vc.language)
  • readfile() problem
    ... I am using readfile() to send files to the browser. ... I had is working on another server before, ... checked so that the file_existand also was able to retrieve filesize() of ... www.lauri.se - personal website ...
    (php.general)
  • Re: Force download WITHOUT readfile?
    ... > users to this other site but can't force a download. ... > from the high-speed server through my webserver and then to the user, ... On the second server you place your download.php that outputs the ... headers and the readfile... ...
    (comp.lang.php)