pointer to array

  • Thread starter Thread starter ORC
  • Start date Start date
O

ORC

I have a rather large byte array that must be passed to an API function
(readfile(...)). But instead of passing the full buffer (Buffer) I would
like to pass from e.g. index 2 (like &Buffer[2])- are there any easy way to
do that ? It must be able to work in both Compact and Full Framework.

Best regards
Ole
 
ORC,

You have two choices in 1.1. You can copy the section out to another
array, and pass that to the API function.

The other option is to make the declaration unsafe, and then in your
code, when you call it, get the pointer to the array, and offset it to the
position you want to read into.

Hope this helps.
 
Back
Top