Compiling Stub & Determining Variables?

Sep 12, 2009

I have a program which builds a child program during runtime, it all runs fine but I want I way of determining which computer it came from. It is private and when I give it to someone I get their volume serial number and I can identify who it is from that. Once they build their program which can be public so the same method won't work I want it to know it came from person.. pseudo code ex

BEGIN
Determine Person
Build Program
END

[Code]....

View 1 Replies


ADVERTISEMENT

Regex Improving Performance With Compiling And Shared Variables

Sep 30, 2011

I am writing some code that uses fixed regexs to search strings and pattern match. Its simple stuff, but I want to improve regex performance with compiling (its a high traffic website). I was thinking of compiling the regex and putting it in a Shared (static) variable inside a class. Something like this:

[Code]...

View 1 Replies

Compiling Error 'The Value "Ctrl" Can't Be Found' While Compiling VB2008 Imported Project

Feb 15, 2010

In one of my forms witch I imported from VB2008 there are all properties saved in the *.resx file. One Property, of the Type System.Windows.Forms.Keys, can contain the Value 'Ctrl+F1' witch compiles fine in VB2008, but not in VB2010. To reproduce, simply add the following to any resx file:

<data name="cmdFenster.ShortcutKeys" type="System.Windows.Forms.Keys, System.Windows.Forms">
<value>Ctrl+F1</value>
</data>

It will compile fine with VB2008, but not with VB2010. Notice: The VB2010 also generates this Code in the resx file

View 2 Replies

.Net Equivalent Of A C++ Stub Lib?

Jul 17, 2011

I've got a large codebase which I'd like to expose to plugin authors to allow them to use VB.Net Express to code plugins for a server app, which is not available to them. My problem is that even with obfuscation, I'd rather not distribute the complete app and/or dlls, as even with obfuscation peeling apart a .NET assembly and puzzling out code is relatively easy to do. I'm interested in this because the licensor I obtain the code from requires me to protect IP and assets and while distributing .NET apps opens up the app to disassembly, keeping the server app private and allowing users to utilize a skeleton dll to code against is a happy medium.

What I'm looking for is some way or a utility to go through my server app source code and create a codeless version of the app which only contains method and property signatures.The intent is to provide a stub .NET dll for them to add as a reference and code against as if they were directly interacting with the server, without actually providing the server code to them, compiled or not. I can of course do this by hand but there are over 90 classes and hundreds of thousands of lines of code I'd rather not spend a week hand tweaking. Also, this presents a problem whenever new methods or code are added to the project. Finally, two separate projects is an even worse scenario.Because people will post suggestions that have little or nothing to do with the question, here's a short, clear example. I want to turn this class:

Public Class MyServer
Public ReadOnly Property Name() As String
Get
Return "Whatever"

[code].....

View 2 Replies

Build , Stub And Send Listbox To Another App?

Feb 27, 2010

i made a build and stub program that works awsome with building text and that stuff but i done know how to send list box items heres code so far:

FileOpen(1, Application.StartupPath & "" & "stub2.exe", OpenMode.Binary, OpenAccess.Read, OpenShare.Default)
stub = Space(LOF(1))
FileGet(1, stub)[code]....

i dont know here...something here...lisitbox = options(2)?how to send listbox items?

View 1 Replies

Moving Large Instance Method To Shared And Creating Stub?

Jun 5, 2011

If I have a very large function/sub in a class that is an instance method (i.e., not Shared), do I gain or lose anything by moving that to a shared method and then declaring a small stub method for the instance use?

I.e., I go from this:
Public Sub MyBigMethod(ByVal Foobar As String)
If String.IsNullOrWhitespace(Foobar) Then
Throw New ArgumentNullException("Foobar")
End If
[Code] .....

My thinking is I save on memory size per each instance of the object. Because each instance only has to lug around the stub method which handles calling the shared version and passing an instance of itself to the shared method so that it can do whatever it needs to do. But I'll wager that I sacrifice a very teensy amount of speed because of the added function call overhead.

View 1 Replies

Double-clicking An User Control Generates Corrupted Default Event Stub?

Feb 24, 2012

After inserting an user control and double clicking on it, a stub with the default event should appear.

If I don't define what the default event is and I don't assign any attributes to any events or properties, it works, and it generates the stub for the UserControl.Load event (the default default event).

But if I set some attributes for the properties and events and/or I define the default event, the stub generated is corrupted. Here is an example of what I should get:

Private Sub FaceSelector_OnSelect(SelectedObjects As System.Collections.ObjectModel.Collection(Of Object)) Handles FaceSelector.OnSelect
End Sub

And this is what I actually get: Private Sub SketchSelector_OnSelect( SelectedObjects As System.Collections.ObjectModel.Collection`1)
End Sub
Private Sub FaceSelector_OnSelect( SelectedObjects As System.Collections.ObjectModel.Collection`1)
End Sub

In this case I had 5 user controls, I double clicked on one of them, and I got 2 corrupted stubs.

Sometimes the corrupted stubs are generated when I change some properties of other controls in the form, or the form itself. For example I resize the form, the error window doesn't show any errors, hit F5 to compile and run, and get a syntax error.

I tried to track the problem down by removing each event/property attribute/xml description, one by one, many times I thought I found the culprit, but after 10 minutes the problem popped up again.

View 10 Replies

Determining OS And SP?

Jul 24, 2009

I am writing a simple program to perform a task at work. It is an update application that will allow end users to update software themselves.I have come up against a problem though. In order to fully complete the installation, the latest service packs have to be installed. The machines are either running XP or 2000 and need updating to the latest service packs.The problem is I cannot find any code that will let me determine the service pack, all I have is:

HTML
MsgBox("Computer's operating system version: " & _
My.Computer.Info.OSVersion)

This finds the OS version, but I don't seem to be able to determine the SP from it. What I need to do is make a piece of code that will find the OS and SP, and then download the latest SP.The service packs are as follows: 2000 needs SP4 and Rollup 1 and XP needs SP3. I value will need to be returned and then stored to create and IF statemenet, but I am stumped on how to find the SP.

View 3 Replies

Asp.net - Best Way Of Determining That Website Is Being Run ?

Dec 4, 2009

In my code behind I'd like to be able to tell that I'm running my web site project in Visual Studio (either Debug or Release).I was considering testing for "localhost" but that's not perfect because we could be testing it locally on the server.

View 3 Replies

VS 2008 - Take A String Of Variables With A Common Delimiter And Break It All Back Out Into Separate Variables

Dec 11, 2011

Last year (2010) I came across a FANTASTIC command that allowed me to take a string of variables with a common delimiter and break it all back out into separate variables (possibly an array) with one statement.

[Code]...

As long as the delimiter was a unique specifiable character, this one-statement command could break it out into elements. my memory and point me in the right direction.

View 2 Replies

Passing Multiple Byref Variables / Variables Fail To Change Calling Funct W/ Invoke

Sep 27, 2010

I have code, shown below, that works all except for 1 thing: The variables being passed byRef get passed, but once modified in the else section of the "if me.invokerequired" code of RecordData, the variables are never updated in the calling function. To reiterate, the calling function does not receive the updated data that is in the variables custid and amt.When debugging, I see the data change in the else section of "if me.invokerequired", but once it returns from the callback the data is missing.[code]

View 15 Replies

Define Some Global Variables Of A Class - Variables Occupy Memory?

Mar 23, 2012

I define some global variables of a class as follows:

Private Class MyClass
Private var1 as Decimal
Private list1 as List(Of string)[code].....

But I found that after this form is closed, all above variables, var1, list1, list2 still exist in memory. I thought they should be collected by gc since the form is already disposed as I confirmed.

Add: I have monitored half an hour after the form is closed. But these variables are not collected by gc. I have an automatic update procedure on the form which uses above variables.Since the above variables still hold values, the automatic update procedure is always called which causes exception. (One quick fix is to check if form.isDisposed in update procedure. But I do not think this is elegeant. Besides, these variables occupy memory.)

View 2 Replies

Communications :: Determining IP Address

Aug 5, 2009

Is there any easy way to determine the IP address for the computer that an app is running on. I looked through the System.Net namespace and didn't see anything of the sort.

Basically, I want to display the IP address to the user, instead of walking them through how to do an "ipconfig". They then can put that IP address into another app, so the one app can talk to the other via UDP.

View 2 Replies

Determining Changes Made To A Dataset?

Jun 2, 2011

I have a dataset that is filled by a tableadapter and what I'm trying to do is to figure out how to loop through all of the rows in my dataset and determine when someone hasedited/changed the row and then

View 2 Replies

Determining Country Or Language Using Url?

Sep 3, 2010

I have written simple code to determine country location using the suffix on the url eg..cn, .se, .br etc. even if its possible to determine country or location using urls that end in .com or .net? I was just reading up on something and found online apps that can determine location/country from the ip so how would I determine the ip or look it up using the url? can I do this in .net?

OK

So I have the following code and I get an exception when the url is invalid or faulty, can anyone help me to catch the error and add the url to another list and continue with my loop.

Public Sub getIpAddress(ByVal querylist As ArrayList)
Dim IPList As New ArrayList
Dim badList As New ArrayList[code].....

View 4 Replies

Determining Double_Click Event?

Sep 29, 2011

My current situation is a brain teaser for me, and I wish I could provide code that I have tried but quite frankly - i have no idea how to even start. So this is my situation; I have a tab control, this tab control holds the names of Departments for a Lay-Away manager. The user has the option to click a static tab, "New.." and add a new department. When that happens, the new tab controls name is added to the settings, and a new list-view is created, and named "lst & DepartmentName". The problem is, I have no way of knowing when the Double_Click event of the this list that may, or may not exist happens. I have a method of determining which list is currently active, working with a timer to set a certain value the name of the list, sort of like

Dim lst = GetAllList(TabControl1.SelectedTab)
cList = lst.Item(0)

Considering there is only one listview per tab, it will always be 0. So, question is - How could I determine when that particular listviews Double_Click event happens ? Then I will use it to call a certain Button_Click event?

View 5 Replies

Determining If USB Files Is Compromised?

Mar 2, 2012

Through ACL I could restrict access to a directory in an NTFS-Formatted USB, what I want to do now is to be able to check if any virus/malware tried to infect my folder so I will know if it is safe to unlock the folder in that machine, is there any way in .Net that I can do this?

View 1 Replies

Determining Point Chosen?

Sep 8, 2010

How can I determine which box a user has chosen from the points array I stored it in? EX:

Points.add(box1)

Points.add(box2)

Points.add(box3)

User selects box2

How can I determine from the points array(x) which box he chose?

View 19 Replies

Determining The Active Window Name Or Id

May 1, 2011

im using VB 2008 is it possible to get active window name or id? for example i have active notepad window, now how i can get it's process name or process ?id(better is process id)

View 1 Replies

Determining The Disk Space?

Sep 5, 2009

Im creating a program that auto starts with my computer. On this program im adding a section that states how much space i have left on the C: drive. So far i have 2 labels and a progress bar. in the top level i have the name of what the progress bar is, and the second below the progress bar states the amount such as this "430GB/740GB". i also want the progress bar to state the percent of how full this drive is. how can i do the following:

Determine the amount of drive space on C:
Determine the amount of free space on C:
Make free space a percent of all space. such as "30% full"

View 4 Replies

Determining Variable Types?

Aug 18, 2009

I'm converted a VB6 project to vb.net using the convert tool.Now i have a few declares that included passing variables as "as any" which vb.net doesn't like and it seems you have to declare them as there correct type so i have the following,So i suppose , Long and Long

Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory"(ByRef Destination As Any, ByRef Source As Any, ByVal Length As Integer)
and

Long again?

Private Declare Function CallNextHookEx Lib "user32" (ByVal hHook As Integer, ByVal nCode As Integer, ByVal wParam As Integer, ByRef lParam As Any) As Integer

View 8 Replies

Determining What Type Of .NET Application?

Jan 17, 2012

I'm just asking for suggestions for a secure way of determining what type of application my VB.NET application will load as. For example, I intend to distribute my application to internal and external customers. There are differences in features etc. for internal and external customers. What secure way can I tell the application to load as 'internal' or 'external'? I want to avoid the command line (passing in an argument) or the application settings.

View 3 Replies

Determining Whether A String Is A Word Or Not?

Apr 1, 2009

I've got this problem where I'm supposed to be determining whether a string is a word or not. not exactly.Its supposed to just make sure each string has at least 1 vowel, and each vowel is surrounded by consonants. If it meets those requirements it'll be accepted, if not it'll be rejected, but I've already got that part figured out. I think I know a horrible way to do it, that would take a very long time, but I'm thinking there has to be a much easier way..

[Code]...

View 11 Replies

VS 2008 Determining Architecture Of OS (x86 Or X64)?

Nov 1, 2009

When trying to determine the Architecture of an OS, I ran across IntPtr.From reading the documentation, I saw this: Quote:The IntPtr type is designed to be an integer whose size is platform-specific. That is, an instance of this type is expected to be 32-bits on 32-bit hardware and operating systems, and 64-bits on 64-bit hardware and operating systems.

Since the size of IntPtr is intended to be the size of the architecture, would it be feasible to test the size and determine the OS by that? Or is there a better way?

I was thinking there might also be a way via WMI, but I don't want to use that for compatibility reason.

View 23 Replies

[2008]Determining Age From DOB And Date.Now

Jan 6, 2009

I am looking for a method to determine an applicants age from a masked text box(date). Below is what I am using but I wnat to utilize vb.net code instead of inherited datediff from VB6, also this method rounds off the age e.g 44.9 to 45 which is not acceptable.

Below is what I am currently using, looking for a better way.

Private _age As Int32
Private _SixQvar As Int32
'This determines the age of the client and sets the value of _SixQvar

[Code]....

View 14 Replies

Memory Used In Declaring Variables Are Reclaimed By The OS When These Variables Go Out Of Scope?

Jan 7, 2010

Does the memory used in declaring variables are reclaimed by the OS when these variables go out of scope?Does the memory used be released by setting thier value to nothing? if not, then how can I force the garbage collector to run or excecute at a certain/desired time..How about in Windows Forms..How can we make sure that the memory used in initializing and showing forms be released if those forms were closed?

View 13 Replies

Multithreading: Reading/setting Variables, And Passing Variables?

Mar 8, 2011

Question 1: What is the difference between "Background Worker" and "Worker Pool" as indicated within the MSDN samples provided.

Question 2: I noticed while using, AddressOf _Function_, variables cannot be passed; what would be an efficient solution to this?

Question 3: While using multithreading is it required to invoke before setting variables, or only form properties?

Question 4: While using System.Net.Sockets is it safe/efficient to use Application.DoEvents while waiting for new data; or would be using a Do While loop be fine without DoEvents since the action would be multithreaded? Note: there can be up to 2000-3000 sockets in use at a time.

View 10 Replies

Use Variables Or Properties, And Global Or Static Variables In A Class?

Jun 9, 2012

I'm new in .NET programming.I have a class Form1 that includes Button1_Click event.Button1_Click creates a multiple Text Boxies at run time)Here is the class:

Public Class Form1
Dim shiftDown As Integer
Dim counter As Integer

[code].....

View 3 Replies

Compiling DLL On XP?

Dec 21, 2011

I'm trying to compile old Visual Basic dll code on XP, and it gives me error message "Error in loading DLL". I don't know exacty which dll is it, but the project references external dll created in visual studio 2008.

View 2 Replies

Compiling Exe(s) Into MSI?

Jun 21, 2010

I am using VB .NET 2010 express, thought I don't know how much that matters. I was wanted to create an MSI installation of a bunch of EXE patches. How can I do this?

I already have a program made that downloads all the patches and places them in a folder. I just need something to takes all those and make them into 1 .msi file.

View 8 Replies







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