This is a mismatch between the way the GCHandle class is defined and the
way C++ implements the -Wp64 warnings.  In short, intptr_t and
System::IntPtr were not recognized as fully compatible.  This will be
fixed in the next release.

-----Original Message-----
From: Thomas Tomiczek [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, May 30, 2002 4:48 AM
To: [EMAIL PROTECTED]
Subject: [DOTNET] gcroot template with warning C4244?


Hello,

When using the gcroot template to hold a managed object reference in an
unmanaged C++ class, I get the following template error:

C:\<...>gcroot.h(91) : warning C4244: 'argument' : conversion from
'intptr_t' to 'int', possible loss of data

Now, what is THIS? The line in the template reads:

        GCHandle g = GCHandle::op_Explicit(_handle);

Was someone at MS lazy defining this template? How can I turn this
warning off?

Regards

Thomas Tomiczek
THONA Consulting Ltd.
(Microsoft MVP C#/.NET)

You can read messages from the DOTNET archive, unsubscribe from DOTNET,
or subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to