I would like to instantiate memory for a boolean array in C# and pass this to a C library function using interop. Then the C function should fill up the array ...
BOOL bMyarray[1000]; memset(bMyArray , 0xFF, sizeof(BOOL) * 1000); clean & quick until someone else's code found I was returning -1 to mean true Because my BOOL is 4 bytes long, TRUE in memory works out as 01 00 00 00 which is a right pain. Doing it in a for loop is 10 x slower btw. Bit of a numpty question ...