Wrong pointer error when trying to change file variable (EPDM Add-in)

I'm a newbie here with just a basic grasp of vb.net. I'm attempting to create an add-in that changes properties in a variable. I get an error that says "An invalid pointer was supplied to the method." Based on implementation in the examples, I can't understand why it's an issue. Any ideas?

The error:

My Code:

<p> Dim value As String = "Check"</p><p>            varEnum.SetVar(strVarName, "@", value) <span style="color: #e23d39;">'<strong style="text-decoration: underline;">invalid pointer error here</strong></span></p><p>            varEnum.Flush()</p><p></p>
SolidworksSolidworks Pdm enterprise Pdm