Here is the relevant part of my structure...
[StructLayout(La youtKind.Sequen tial)]
public unsafe struct PPF_FILTER_DESC RIPTOR
{
public int* SrcAddr;
public int* SrcMask;
public int* DstAddr;
public int* DstMask;
}
private PPF_FILTER_DESC RIPTOR filter;
I'm trying to fill the field, SrcAddr -
an int* PPF_FILTER_DESC RIPTOR.SrcAddr
as filter.SrcAddr
I can't seem to do this w/o errors...
Obviously, this is a hobby project.
Here's what I've been trying
IPAddress sip = IPAddress.Parse ("10.1.1.1") ;
Unsafe {
src = BitConverter.To Int32(sip.GetAd dressBytes(), 0);
filter.SrcAddr = &src;
}
This errors w/: You can only take the address of an unfixed expression
inside of a fixed statement initializer
I've tried:
fixed(filter.Sr cAddr = &src;)
This errors w/: Type or namespace name expected, but fieldname found.
Not sure what to try next. Any suggestions?
Thanks
Comment