Quote Originally Posted by ill_comms View Post
This is something else I haven't tried yet. Passing a buffer through by reference.
Don't do it.

A "reference" is a C++ thing, and it is a compiler specific thing. There is no concrete knowledge of how a reference is implemented internally, therefore it cannot be safely shared.

If you read the C++ specification on what a reference is, the specification only gives you information on how a reference is to behave. The underlying mechanics of a reference type is implementation-defined.

Unless that DLL is going to be used by applications built with the same compiler, compiler version, and same compiler options, there is no guarantee that the reference will be the same thing between app and DLL.

Regards,

Paul McKenzie