all groups > vb.net upgrade > december 2006 >
You're in the

vb.net upgrade

group:

VarPtr is Not Supported


VarPtr is Not Supported jarrod_kovarik NO[at]SPAM hotmail.com
12/19/2006 9:17:01 PM
vb.net upgrade:
I have tried to convert some code using Visual Studio and I get the error message: VarPtr function is not supported.

Below is a part of the code where the message is coming up. There are a few more entries with this in it so I can post them too if they will help.

RTF.SelectionColor = System.Drawing.ColorTranslator.FromOle(color(colorX.normal))
charf.crBackColor = System.Drawing.ColorTranslator.ToOle(RTF.BackColor)
'UPGRADE_ISSUE: VarPtr function is not supported. Click for more: 'ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?keyword="367764E5-F3F8-4E43-AC3E-7FE0B5E074E2"'
ret = SendMessageLong(RTF.Handle.ToInt32, EM_SETCHARFORMAT, SCF_SELECTION, VarPtr(charf))
RTF.Font = VB6.FontChangeBold(RTF.SelectionFont, False)
RTF.SelectionFont = VB6.FontChangeUnderline(RTF.SelectionFont, False)
RTF.SelectedText = strData
Re: VarPtr is Not Supported Mattias Sjögren
12/20/2006 12:00:00 AM
[quoted text, click to view]

Change your SendMessage declaration (or add a new one - take advantage
of overloading) so the parameter types are strongly typed. Then you
don't need VarPtr, just a simple ByRef parameter.


Mattias

--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
AddThis Social Bookmark Button