Windows error 0x00000302, 770

Detailed Error Information

CANTFETCHBACKWARDS[1]

MessageThe data provider cannot fetch backwards through a result set.
Declared inwinerror.h

This appears to be a raw Win32 error. More information may be available in error 0x80070302.

HRESULT analysis[2]

This is probably not the correct interpretation of this error. The Win32 error above is more likely to indicate the actual problem.
FlagsSeveritySuccess

This code indicates success, rather than an error. This may not be the correct interpretation of this code, or possibly the program is handling errors incorrectly.

Reserved (R)false
OriginMicrosoft
NTSTATUSfalse
Reserved (X)false
FacilityCode0 (0x000)
NameFACILITY_NULL[2][1]
DescriptionThe default facility code.[2][1]
Error Code770 (0x0302)

Possible solutions

11

How to read a value of an hard coded address in C++?

c++
pc104

In order to access physical memory directly under Windows, you need to develop a driver. I suggest you read up on Virtual Address Space to see why. The short story: The memory addresses you see from a usermode process has no relation to physical memory addresses, and the addresses where hardware lives are protected by the OS to prevent usermode applications from messing up things.

answered on Stack Overflow Mar 1, 2011 by Erik
1

How to read a value of an hard coded address in C++?

c++
pc104

I'm assuming your program is running as a normal user. To prevent you from damaging the OS and crashing the system, modern OSes&CPUs prevent you from accessing memory that doesn't belong to your program.

In order to access such device memory you'll need to run in kernel CPU mode rather than user mode. The usual way to user such devices is to write a low level device driver that runs in kernel mode and use it as the interface to your user mode program.

answered on Stack Overflow Mar 1, 2011 by Mark B
1

How to read a value of an hard coded address in C++?

c++
pc104

You are not allowed to access the hardware directly from a user mode program. You need a device driver for that.

Doesn't the hardware come with some software you should install? Check the software documentation on how to call it.

answered on Stack Overflow Mar 1, 2011 by Bo Persson
1

How to read a value of an hard coded address in C++?

c++
pc104

There are several ready-made drivers to let user-mode applications read and write IO ports; one of the most famous ones is inpout32.dll, other are mentioned here, to find them a good search key is "write parallel port NT" (since they are most often used for this task).

In general they work by loading a kernel-mode driver (action that requires administrative privileges) and then calling it from usermode every time you call the dll function to perform a read/write.

Notice, however, that most of these libraries do not have any form of access control, so by loading their driver you're actually allowing any application that knows how to use it to read/write on IO ports, and this is quite a security risk.

answered on Stack Overflow Mar 1, 2011 by Matteo Italia • edited Mar 1, 2011 by Matteo Italia
1

How to read a value of an hard coded address in C++?

c++
pc104

Of course if you want to go the whole hog you can download Windows Device Driver SDK

answered on Stack Overflow Mar 1, 2011 by Peter M

Comments

Leave a comment

(plain text only)

Sources

  1. winerror.h from Windows SDK 10.0.14393.0
  2. https://msdn.microsoft.com/en-us/library/cc231198.aspx

User contributions licensed under CC BY-SA 3.0