Commit 6e5bc73b authored by Alexandre Julliard's avatar Alexandre Julliard

mscoree: Implement a number of interop helpers.

parent a40185f1
......@@ -72,6 +72,16 @@
@ stdcall LoadStringRCEx(long long ptr long long ptr)
@ stub LockClrVersion
@ stub MetaDataGetDispenser
@ stdcall ND_CopyObjDst(ptr ptr long long)
@ stdcall ND_CopyObjSrc(ptr long ptr long)
@ stdcall ND_RI2(ptr long)
@ stdcall ND_RI4(ptr long)
@ stdcall -ret64 ND_RI8(ptr long)
@ stdcall ND_RU1(ptr long)
@ stdcall ND_WI2(ptr long long)
@ stdcall ND_WI4(ptr long long)
@ stdcall ND_WI8(ptr long long long)
@ stdcall ND_WU1(ptr long long)
@ stub OpenCtrs
@ stub ReOpenMetaDataWithMemoryEx
@ stub RunDll@ShimW
......
......@@ -320,3 +320,53 @@ HRESULT WINAPI DllCanUnloadNow(VOID)
FIXME("stub\n");
return S_OK;
}
INT WINAPI ND_RU1( const void *ptr, INT offset )
{
return *((const BYTE *)ptr + offset);
}
INT WINAPI ND_RI2( const void *ptr, INT offset )
{
return *(const SHORT *)((const BYTE *)ptr + offset);
}
INT WINAPI ND_RI4( const void *ptr, INT offset )
{
return *(const INT *)((const BYTE *)ptr + offset);
}
INT64 WINAPI ND_RI8( const void *ptr, INT offset )
{
return *(const INT64 *)((const BYTE *)ptr + offset);
}
void WINAPI ND_WU1( void *ptr, INT offset, BYTE val )
{
*((BYTE *)ptr + offset) = val;
}
void WINAPI ND_WI2( void *ptr, INT offset, SHORT val )
{
*(SHORT *)((BYTE *)ptr + offset) = val;
}
void WINAPI ND_WI4( void *ptr, INT offset, INT val )
{
*(INT *)((BYTE *)ptr + offset) = val;
}
void WINAPI ND_WI8( void *ptr, INT offset, INT64 val )
{
*(INT64 *)((BYTE *)ptr + offset) = val;
}
void WINAPI ND_CopyObjDst( const void *src, void *dst, INT offset, INT size )
{
memcpy( (BYTE *)dst + offset, src, size );
}
void WINAPI ND_CopyObjSrc( const void *src, INT offset, void *dst, INT size )
{
memcpy( dst, (const BYTE *)src + offset, size );
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment