> The delphi equivalent does not work, it says
> 'Operator not applicable to this operand type'
> Could there be another one equivalent to the C/C++ version??.

> The lpMidiBuffer is a dword

It *says* that, but my guess is it's really a pointer, and therein lies your
problem. The C++ statement
  lpMidiBuffer + eventCount
is equivalent to
  &(lpMidiBuffer[eventCount])

i.e. "the address of the eventCount'th element of lpMidiBuffer".

The thing is it looks a lot nicer... Basically, pointer arithmetic works as
follows.
Adding x to a pointer actually adds (x * b) to the pointer's address, where
b is the size in bytes of the object that the pointer points to.

OK, that made no sense at all. But as far as I can tell, there's no
equivalent operation in Pascal. You'll prolly have to cast lpMidiBuffer to a
dword and add (eventCount * b) to it or something, where b is the size of
the thing being counted (an event?)

I don't know. I'm still a C programmer at heart... Pointers are sooo
yummy...

If this still makes no sense, it would help if I had more code :) Mail me
back off-list and I'll take a look.

- Matt



---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"

Reply via email to