Interop Marshalling Overhead - Newbie qn



Despite the suggestions I read in newsgroups and other places I get the
feeling that Interop marshalling does not actually carry that much overhead
(we'll at least for simple marshalls).

I'd like some feedback from someone in the know about which types carry
expensive marshalling penalties. No I'm not interested in COM et al. Just
simple C style calls.

I measured the performance of a typical C call natively (Win32) and with
interop using QueryPerformanceCounter, and I couldn't see any differences in
the call latency.

The C call was something like

int GetDataFromXYZ(unsigned char *Data, int *pBytesToRead);

///////////////////////
//
// Here's the question

Under what circumstances should I NOT use Interop marshalling to achieve my
end?

Cheers

Steve
.


Loading