|
-
April 3rd, 2009, 03:51 AM
#16
Re: Return non-unicode string from dll
 Originally Posted by ill_comms
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|