G
Guest
I am trying to call VerQueryValue from a C# program. VerQueryValue takes as
one of its parameters a pointer to a pointer to an array of bytes, which it
uses to return a pointer to the required array. Now, I can call it like this:
byte* lpBuffer;
int length;
string subBlock = @"\StringFileInfo\" + langCodePage +
@"\FileDescription";
result = VerQueryValue(buffer, subBlock, &lpBuffer, &length);
but then I don't have a byte[] to pass to an ASCIEncoding object to decode.
What I really want to do is declare
byte[]* lplpBuffer
and then pass that to VerQueryValue, but C# apparently won't allow that.
(Oddly enough if I declare
byte[] lpBuffer;
I get an error "cannot convert from byte[]* to byte**", which is peculiar if
it doesn't recognise byte[]* as a type anyway)
Can anyone shed any light?
one of its parameters a pointer to a pointer to an array of bytes, which it
uses to return a pointer to the required array. Now, I can call it like this:
byte* lpBuffer;
int length;
string subBlock = @"\StringFileInfo\" + langCodePage +
@"\FileDescription";
result = VerQueryValue(buffer, subBlock, &lpBuffer, &length);
but then I don't have a byte[] to pass to an ASCIEncoding object to decode.
What I really want to do is declare
byte[]* lplpBuffer
and then pass that to VerQueryValue, but C# apparently won't allow that.
(Oddly enough if I declare
byte[] lpBuffer;
I get an error "cannot convert from byte[]* to byte**", which is peculiar if
it doesn't recognise byte[]* as a type anyway)
Can anyone shed any light?