Unhandled Exception Error

I am resurrecting old code from a few years ago, and I unfortunately have little documentation as to how it was compiled and what environment it was built in. At this point, I have successfully gotten it to build, but there are errors at execution, specifically an unhandled exception error on a memory access. The error text is:

Specifically, it's the call to timeGetDevCaps that is where the error occurs. I don't pretend to know all the intricacies of how pointers work - I am a mechanical engineer who has picked up some programming. However, that's the only thing that I can think of because of the association with an address. Any suggestions?

But the execution address and the read address being the same seems kinda odd to me.

If that really is the case, then the code took a flying jump off a cliff (typically, following an uninitialised function pointer). The "stack" at that point is pretty much meaningless, so I wouldn't put too much store in that.

Putting a breakpoint at the call, then trying "step over" would give more concrete information as to whether this was the cause, or merely the last bit of salvageable stack from the disaster which follows.

Sorry, you lost me on the execution address and the read address being the same. The attempted read address is repeated twice, if that's what you are referring to, but that's what happened everywhere else I saw the error.

Salem is correct - the timeGetDevCaps function is a part of the winmm.lib file, which means that I can't see the code and don't know how the constructor initializes everything.

Well I tried putting your stuff in a standalone program and it works without any difficulties.

It is possible that you have code elsewhere which is corrupting your stack, and the problem shows up when you call timeGetDevCaps. Have you considered running your code through a memory checking tool ?