vb.net - Error while Obfuscation -
we have developed project using vb.net our internal purposes , obfuscated it. throwing error mentioned below.
“public member ‘var1’ on type ‘e’ not found.”
code:
public sub get_constants_from_dblist(byref frm object, byref sdbname string) each row datarow in commonobj.dscommonproc.tables("dblist").rows if strcomp(row("dbname").tostring, sdbname, comparemethod.text) = 0 prg_id = row("prgid").tostring frm.var1= row("changesdbname").tostring frm.var2 = row("loadtablename").tostring frm.var3 = row("servername").tostring exit sub end if next end sub
a form (named frmmain) passed parameter ‘frm’ calling procedure sub-routine. var1, etc public variables in form.
obfuscation tools tried –
smartassembly 6
preemptive dotfuscator , analytics ce (which has come visual studio 2012)
without obfuscation exe working fine.
error thrown while assigning variable ‘var1’ in sub-routine. if code line modified below obfuscated exe work fine.
frmmain.var1= row("changesdbname").tostring
we thought obfuscation missing late binding & tried similar type of code in small sample project. didn’t have error. have attached small code. due magnitude can’t upload original project.
how can trace error?
you can find source code of sample application here
don't use obfuscation reflection/late binding/dynamic. troubles this.
the obfuscator obfuscate private & internal identifiers can't know binding them name @ run-time.
turn on option strict
, resolve errors (i.e. change type of argument frm real type)
Comments
Post a Comment