N
Neil W.
I need to call some standard Windows APIs from C#, some of which require
structures and stuff. However, C# does not seem to include the concept of
clearing buffers or even of fixed sized buffers.
For example, how would I do something like this, which is very simple in
C/C++?
Thanks.
struct MYSTRUCT
{
unsigned char mychar;
char mystring[32];
int myint;
} mybuf;
memset(&mybuf,0,sizeof(MYSTRUCT));
mybuf.mychar = 0x12;
strcpy(mybuf.mystring,"abcdefghij");
mybuf.myint = 0x3456;
result = myapi(&mybuf);
structures and stuff. However, C# does not seem to include the concept of
clearing buffers or even of fixed sized buffers.
For example, how would I do something like this, which is very simple in
C/C++?
Thanks.
struct MYSTRUCT
{
unsigned char mychar;
char mystring[32];
int myint;
} mybuf;
memset(&mybuf,0,sizeof(MYSTRUCT));
mybuf.mychar = 0x12;
strcpy(mybuf.mystring,"abcdefghij");
mybuf.myint = 0x3456;
result = myapi(&mybuf);