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:

Dim value As String = "Check"

            varEnum.SetVar(strVarName, "@", value) 'invalid pointer error here

            varEnum.Flush()

SolidworksSolidworks Pdm enterprise Pdm