T
Tina
I am trying to write the C# equivalent for the following bit of C++
code. What is the C# equivalent to the following line:
unsigned short* p16bitComponents = reinterpret_cast<unsigned
short*>( pLineIn );
Since we cannot downcast from uint to short in C#, how can I access
the first 16 bits of my 32 bit data line?
void DoSomething(unsigned int* pLineIn, unsigned short * pLineOut, int
lineLength)
{
unsigned short he;
unsigned short le;
unsigned short* p16bitComponents = reinterpret_cast<unsigned short
*>( pLineIn );
for (S32 i = 0; i < lineLength; i++)
{
le = *p16bitComponents++;
he = *p16bitComponents++;
// do something with le and he
}
}
code. What is the C# equivalent to the following line:
unsigned short* p16bitComponents = reinterpret_cast<unsigned
short*>( pLineIn );
Since we cannot downcast from uint to short in C#, how can I access
the first 16 bits of my 32 bit data line?
void DoSomething(unsigned int* pLineIn, unsigned short * pLineOut, int
lineLength)
{
unsigned short he;
unsigned short le;
unsigned short* p16bitComponents = reinterpret_cast<unsigned short
*>( pLineIn );
for (S32 i = 0; i < lineLength; i++)
{
le = *p16bitComponents++;
he = *p16bitComponents++;
// do something with le and he
}
}