Stripping Variable Names From Assemblies

Mar 29, 2010

I'm trying to reduce as much as I can my VB.Net assembly side, and I just figured out that all variable names were kept unchanged in the actual assembly. Since I tend to use pretty long var names, it adds up and, by running dotfuscator on my assembly, I could shrink it by as much as 10%.

[Code]...

View 2 Replies


ADVERTISEMENT

C# - Decompiling .Net Assembly Produces Code With Invalid Member Variable Names; Names Starting With $STATIC$?

Sep 5, 2011

I am doing work for a client who has lost the source code for one of their VB.Net WinForms applications. The assembly they have is not obfuscated at all. I am trying to recover as much of the source as I can as C# source and have tried several tools for decompiling assemblies, including Reflector, ILSpy and JustDecompile (all the latest versions), but they all produce code with a huge number of errors in them. Because of the large number of errors in the generated code, I am going to ask about the specific errors (in different questions), get more directed answers and in this way try shed some light on why all the tools are having difficulty decompiling this assembly. This question pertains to the fact that the code generated by all these tools always have a large number of invalid member variables (fields) such as the following:

private short $STATIC$Report_Print$20211C1280B1$nHeight;
private ArrayList $STATIC$Report_Print$20211C1280B1$oColumnLefts;
private StaticLocalInitFlag $STATIC$Report_Print$20211C1280B1$oColumnLefts$Init;

why the generated code has these invalid member variables?

View 3 Replies

Set Variable Names With Variables

Apr 29, 2009

I am looping through a collection of items. Within that loop I need to set variables but they need to be a variable. I tried using lists but for some reason they don't get set properly. Heres what I have so far...

[Code]...

View 1 Replies

Asp.net - Update Linq To Sql With Variable Names?

Apr 15, 2012

im pretty much a beginner to using ASP.net and linq to sql but what im trying to do is update a column of a table based on a variable. at the momment i have

Dim db As New sqldcDataContext Dim update As tableName = (From i in db.tableNames _ Select i)

i think this selects everything, how could i have two variables, one to store what table to update and the other what column. is this possible?edit: sorry for being unclear im trying to make this as dynamic as possible so i dont have to type in the exact table/col names. something like this but in the linq to sql syntax.

mysql_query("SELECT * FROM ". $table ." WHERE `" . $column . "` = "" . $data ."");

View 2 Replies

C# - Nested Excpetion Variable Names

Aug 13, 2010

Given the following code:

try
// code1
try

[Code]....

Are there any side effects to naming the two exception variables the same or should they have different names?

View 2 Replies

Creating Variable Names From Other Variables?

May 20, 2010

how do I DIM a variable's name using previously declared string varialbes? I have been using PERL for processing data stored in text files but I now have a business need to use VB2008. I would like to do something like this:

dim name1 as string = "ABCD"
dim name2 as string = "123"

'here is the part that I don't know how to do - create a 3rd variable name concatenated from name1 and name2:

dim string.concat({name1,name2}), or maybe use a counter in a line like 'dim namex as string' with x being a counter value.

Essentially I want to dim variables using text strings extracted from a file. In PERL I have declared literals and arrays, such as 'my @$name1', which creates an array named with the contents of $name1. In VB2008 I am not sure how to make this work with the DIM statement.

View 5 Replies

Access Private Class Variable Names?

Jan 9, 2009

Trying to understand the best way to do this and I'm can't get it figured. Here's basically what I have:

Public Class CardParsingClass
Private iAcctIDStart as integer
Private iAcctIDLength as integer

[code]....

I've only included 2 of the class level fields here but there are actually 30, so that's why I was hoping to be able to send the name of the field to set and the value to set it at in the SetValue function. So in some other routine in the program I'd like to be able to issue the following call:

SetValue("iAcctIDStart", "3")

But then when I get into the SetValue routine, I'm not sure how to proceed. I thought about a case statement that would basically be this:

select Case strFieldToSet
case "iAcctIDStart"
iAcctIDStart = cint(strValue)

[code]....

View 5 Replies

Parse Variable Names And Operate From String?

Jun 10, 2011

I'm using a Microsoft Word form template to create objects in a form programatically, so depending on the information read by the program from the template.

So, I've got some fields where I store formula data for the form, in which I specify that the value for that field is obtained by multiplying other fields in the template. So I store in the string something like this:

"Text1.Text * Text2.Text"

So I need to convert these string values into variable calls to actually operate these values.

View 2 Replies

VS 2005 Declare Dynamic Variable (names)?

Dec 7, 2010

I'm looking to create multiple variables based on a counter object. For example if a counter object is 6 I want to create 6 instances of the variable mText

Something like:
Dim i as integer
Dim Count as integer = 6

[code].....

View 1 Replies

VS 2010 Accessing Variable Names At Runtime?

Sep 30, 2010

Is there any way to access your variable names at runtime? Is there any kind of collection you can loop through?

View 2 Replies

Repetition For List Of Settings With Unique Variable Names

Aug 12, 2011

this website seems great and this is my first post. Sorry if this has already been answered but I have been searching for a long time. I have a program with a list view in details mode. I have it load column settings (visibility, display index, width, etc.) when the form is opened and save them when closed. There are many columns...about ten so far...like folder, file, size, etc. Is there a way to access variable names from the values of other variables?

[Code]...

View 3 Replies

.net - Populating A List Box With Variable Names From LINQ Generated Class?

Nov 17, 2009

I'm quite new to Visual Basic - using Visual Studio 2008 and can't seem to find a way to do the following:

I have a few tables in a SQL Server database and have used LINQ to SQL to create classes of those tables.

Here's a cut down example of what I'd like:listbox1 filled with table names - APS, SMPS, WCPC, CFLAPS
Then from the SelectedIndexChanged event, listbox2 should populate column headers of the selected table.

I have no issues getting data from the database, and can access all of these headers through the anonymous type objects created from a LINQ query (eg APS.ID, APS.count etc), but populating a listbox with these variable names rather than the data inside them seems rather elusive.

This is probably a cross platform coding question rather than VB specific, so if you have a solution in C# or whatever I'd be happy if you could let me know.

View 2 Replies

Reflection - How To Get Variable Names Types / Values In Current Class

Feb 1, 2011

I am working on a project where my class has to execute VB code provided by the user, to make it simple I am trying to recreate my own eval function, I am using the following code I found on the web to do this task.

Imports Microsoft.VisualBasic
Imports System
Imports System.Text
Imports System.CodeDom.Compiler
Imports System.Reflection
[Code] .....

The problem with code is that it can't access any variables or there values, so I have decided to get the variable names, there values types and there types dynamically and recreate them in the class that is being created dynamically. Any way to get the variable names there types and values in the current class or method, so that I can recreate them, and execute the user passed code, the user knows what variables are in the current class or method and there datatypes but he don't know there values as they may have changed, so he can't initialize them. Is there a way to do this, this code will be called in an asp.net page on page_load event, the code passed by the user is stored in the variable vbCode that is passed as a parameter.

View 2 Replies

Visual Studio Upgrade Wizard Hates Some Of Variable Names

Aug 13, 2009

I am upgrading a VB6 to VB.NET project using the upgrade wizard.I know this is going to give me a lot of grief, but I am trying to make the old application useable. I'd rewrite it if I had time but am currently finishing up a summer internship and would like to get something working.One thing the wizard is doing that I can find no justification for is renaming of random variables. [code] For the life of me I don't understand why this is changing left. It isn't a reserved name as far as I can tell, there is no other variable named left that I can find in scope, and renaming it does not create a compiler error. [code] It does this to seemingly random variables throughout my project. Anyone have ideas as to why it doesn't like some of my variable names?

View 3 Replies

Asp.net - Stripping Domain Name From LoggedInTemplate?

Feb 17, 2011

I have a .Net 4 web app that uses Windows authentication and all works well however there is one trivial bug that is driving me nuts!

Visual Studio puts together the following for displaying who is logged in

<LoggedInTemplate>
Welcome <span class="bold"><asp:LoginName ID="HeadLoginName" runat="server" /></span>!

[Code]....

The problem is though that this is displaying as <domain>/user rather than just the username which I am assuming it is pulling this value from

System.Threading.Thread.CurrentPrincipal.Identity.Name

However I can't see anyway programtically to amend this?

View 2 Replies

Stripping Away Additional Characters?

Sep 9, 2009

So, I'm currently working on sending and receiving data via a serial port. In order to use readline, I need to send vbCrLf, which is fine. I'm trying to get it to display just the characters sent and not the additional characters like Cr and Lf. Here's the most basic part of my

SerialPort1.Write(HexSendBox.Text & vbCrLf)
ReceiveBox.Items.Add("Received: " & SerialPort1.ReadLine())
The data I will receive in the ReceiveBox if I seng 'GG' is:

[code].....

View 6 Replies

Stripping XML And Writing To ListBox

Aug 12, 2010

I am currently working on a project in where when a Coordinators ID is selected from a combo box, I need to strip an XML file and place the subject code and name in a list box. ("code" - "Name" - "Department number"). The xml file is written as follows. The main problem I am having is the fact the coordinatorsID is after the subect code, I have never dealt with this before.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<start xmlns:xsi="[URL]">
<subject><SubjCode>AV597</SubjCode>
<SubjectName>VEHICLE AERODYNAMICS</SubjectName>
<DeptNum>116</DeptNum>
[Code] .....

View 11 Replies

String Breaking/stripping Using A Mysql Query?

Jun 30, 2011

i have a column that i want to select from a table called style_number

each entry is listed as "something-stylenumber"

is there a way to strip everything from the - and to the left from the string when it is returned from mysql?

SELECT style_number FROM table1

I do not want to have to use vb.net to edit the returned string for each line that is pulled

View 1 Replies

Forms :: WebBrowser Control Stripping Out Query String

Jan 17, 2011

When a WebBrowser controls loads and navigates to a page it strips out everything after the '?'

how to overcome this and pass the query string to the page?

View 4 Replies

LINQ Query Stripping Of Front Chars Then Highest No?

Feb 15, 2012

I need to find next highest no in a field that is a stick ref it has chars at front and 0 padded How so I strip off front chars and 0's to get actual highest no number in the table field?Am using LINQ against entity framework?

View 4 Replies

Stripping Contact Info From DOC File And Inserting Into Outlook

Jun 16, 2011

I'm essentially re-learning VB for the first time in 15 years to try and accomplish this task - I have a project to do for work which involves taking .doc files which contain hundreds and hundreds of names, addresses, e-mail addresses, and amounts they donated to the non-profit I work at, and inserting them into Outlook's contacts. I'm trying to piece together the bit I've figured out about Outlook/VB integration to do so, but unfortunately, most of the information I can find is the other way around - getting info FROM Outlook and inserting it elsewhere.

The doc file is essentially formatted like this:
FirstName LastName
423815 Central Park West
FirstNameLastName@Somthing.com
$3000.00
And repeat.

So for the email addresses, I obviously need to look for the @ and copy from the previous space or line break to the next - that's the theoretically easy part, along with the money donated, since I can similarly look for the $. The part that I forsee stumping me is, how to discern first and last name, and treat them accordingly, entering them into the right fields in Outlook? Same with the address.

View 4 Replies

Stripping HTML Function Within Text Areas Content

Mar 10, 2010

I'm writing a small program that loads a folders contained file names into a list box, you then double click one of the file names listed and it appears within the programs text area where the user may freely edit it. I then have given the users options to export the data contained within the text box to a word template. What I'd like to do is add a button which the user can click in order to strip away all the html within the text areas content. I found a solution but for some reason I can't make it work. There are no errors displaying nor does the program crash out, it simply isn't doing what it should be doing.

The function I'm using is below:
Function stripHTML(ByVal strHTML)
'Strips the HTML tags from strHTML using split and join
'Ensure that strHTML contains something
If len(strHTML) = 0 Then
stripHTML = strHTML
[Code] .....

I've used the below snippet in an attempt to put the function to work in the text box.
Private Sub btnHTMLstrip_click()
' calls function stripHTML, applies to text box
richTxtBox.Text = stripHTML(richTxtBox.Text)
End Sub
So, its not working as it should?

View 1 Replies

Get The Directory Names Of Each Folder Below The "Shows_path" Variable?

Feb 2, 2010

I'm trying to get the directory names of each folder below the "Shows_path" variable. If Shows_path=X:MultimediaTV Shows and X:MultimediaTV Shows contains STTNG, X-Files, and BSG, the following code produces:

X:MultimediaTV Shows
X:MultimediaTV Shows
X:MultimediaTV Shows

[Code]......

View 3 Replies

Variable Class Names - Rename My Class Human To Man

Dec 18, 2009

What i'm trying to do:

I've got a library which includes a class:

Class Human
End Class
and another class which refers to the human class

Class ASD
Private somevar as new Human
End Class

Ok now i've got a problem, i wish to rename my class Human, to Man. i've got to change Human to Man 2 times, which is OK but the problem is that in the real case, its not just 2 times, its like 500 times or more.

Well its something like a PHP on Javascript.

the following shows the solution of what i'm trying to do, but its in another language PHP/Javascript:

note: in php $ sign declares a variable, echo writes the variable out

CODE:

Is there anyway to do that with VB?

View 6 Replies

Set The Column Names To The Same Values As Table Names Yet The Data Is Not Showing In Form Load?

Aug 15, 2011

I have a DataGridView which populates from an SQL query just fine in default mode

using these table names
[firstName] [varchar](20) NOT NULL,
[lastName] [varchar](20) NOT NULL,

[code]....

I have edited the column headers and set the column names to the same values as my table names yet the data is not showing in form load I have set datagridview.AutoGenerateColumns = False I know the data is there if I delete datagridview.AutoGenerateColumns = False then the data is shown with the default headings?

View 3 Replies

Reload Form Again To Read New Texts Names And Mainmenu Items Names From Resx File?

Nov 9, 2005

I made project using VB.Net 2005 with multi languages, the first form is MDIParent form with MainMenu and toolbars also there is some changes in properties as righttoleft and text of forms.In my Mainmenu (Menustrip) there is opetion to change the UI Culture and I have already done but I need to change all texts in the form as mainmenu items anf form properties.My quetion is: how can I reload my form again to read the new texts names and mainmenu items names from resx file?

View 8 Replies

Button Names In Users Language - Get Common Control Names

Oct 31, 2010

Is there any way to get common control names like Save, Copy or Undo Redo in the user's windows language? (I saw this in some programs which weren't made for my windows language. Also the Yes No Massage Boxes will change...)

View 1 Replies

How To Assemble Assemblies

Jun 13, 2011

In my .aspx file I have:

<%@ assembly src="extensions.vb" %>
<%@ assembly src="debug.vb" %>

[code].....

View 2 Replies

.net - Stop Asp.net Looking For Assemblies In GAC?

Sep 20, 2011

I have started working on a legacy project (ASP.NET 1.1) which was done in an old machine (which I dont have access to). And I am unaware of the development environment settings used for building this project.

Nonetheless, I am able to build the project and deploy it all well from my machine (I created the full development enviroment locally). In my machine everything works great.But some screens where one of the assembly dlls (third party dlls) are used do crash on any machine other than mine! They probably do net get the proper assembly (with matching version or something), even though when I have put all the assemblies in bin (and used the same files while adding references to the project). .NET runtime probably tries to find them in the GAC of the other computers? Or probably in my system itself it loads from GAC and not from the bin? How could I know all this? The question is it runs perfectly fine on my machine, where the assemblies are at both places - in bin and in GAC.

I am lost what I should do to so that no matter which machine I deploy the project, it should always look in bin only! Also, I dont want to change the code in any way because its a legacy code and has been working all right since ages! Just some settings e.g. maching.config or soemthing?

View 1 Replies

C# - Get Assemblies Without Instantiating Them?

Mar 30, 2012

I am trying to get all assemblies in CurrentDomain using AppDomain.CurrentDomain.GetAssemblies() to write their FullName into a DropDownList, however if I don't instantiate them, they are not seen in returned array from GetAssemblies() in CurrentDomain.They are all added as Reference and in Reference folder of the solution. Only time I can get them from the GetAssemblies() is when I first instantiate them.How to overcome this problem with an easy and more generic way instead of instantiate them everytime when I add new Assembly, etc.Due to company policy, I have to obfuscate some parts of the images: All the assembilies are referenced in Reference folder:

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved