ReadFille error caused by USB sniffer

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



I had a ReadFile call for a USB device that worked fine until I
installed a USB sniffer. Then I started getting 1784 error
ERROR_INVALID_USER_BUFFER. The sniffer was not running only installed.
I uninstalled the sniffer and the problem left. The buffer was
declared in the function where ReadFile is called. Perhaps the problem
would have cleared if I had a global or class level variable. Will try
it when components are available again.

I suspect that there is some code substitution going on but don't
think they would substitute the .lib or .dll. Perhaps a macro
substitution in a header file is used? What are the common methods of
doing this and how can I check? I have written to the vendor but have
not received a reply.

I should have started by asking a more basic question as I come from a
Unix background. On one of the MSDN library page for ReadFile,
http://msdn2.microsoft.com/en-us/library/aa365467.aspx , it says lib
Kernel32.lib is needed as well as Kernel32.dll. Why are both needed?

Thanks,

jh

.



Relevant Pages

  • ReadFile Error related to USB sniffer
    ... I had a ReadFile call for a USB device that worked fine until I ... The sniffer was not running only installed. ... I suspect that there is some code substitution going on but don't ...
    (microsoft.public.windows.server.general)
  • ReadFille error caused by USB sniffer
    ... I had a ReadFile call for a USB device that worked fine until I ... The sniffer was not running only installed. ... I suspect that there is some code substitution going on but don't ...
    (microsoft.public.vc.language)
  • ReadFile API
    ... I had a ReadFile call for a USB device that worked fine until I ... The sniffer was not running only installed. ... I suspect that there is some code substitution going on but don't ...
    (microsoft.public.windowsxp.general)
  • Writing To/Reading From a USB device Directly
    ... writefileand readfile() to communicate with a usb device. ... I am experiencing difficulties reading directly from the port. ... DO WHILE lncounter < 50 ...
    (microsoft.public.vb.winapi)