How Fast Is .net Compared To Native Code For Arithmetic
Mar 4, 2010
I need to write software that will do a lot of math. Mostly it will be matrix multiplication with integers to compute DCT. How much faster should I expect the code to run in native c as compared to VB .Net? Factor of 2, factor of 10, factor of 1000...?
View 3 Replies
ADVERTISEMENT
May 4, 2010
Following is the OnCallBack (async communications handler method) in C# and translated to VB.NET.The c# one works fine, but the VB.NET one gives a compilation error: "Property access must assign to the property or use its value." The error happens on the following line:
state.CallBack(Me,
New
ClientEventArgs()
With
[Code]...
View 10 Replies
Jun 28, 2009
I want to know how can I compile my native code programs to IL codeto save my**Edit**I mean that visual basic save the code in files such as (form1.vb) so that i want to save this file in(form1.dll)
View 3 Replies
Oct 17, 2010
I have a function that is exported by a C library with the following signature:
extern "C" BOOL Func()
The function is declared in VB.NET code like this:
<DllImport("mylib.dll", CallingConvention:=CallingConvention.Cdecl)>
Private Shared Function Func() As Boolean
End Function
The problem is that I get an ExecutionEngineException when I call the function from .NET code.
Given that BOOL is typedef'd as int in this C code, should the declaration be different? If so, how should I be declaring this? As Short or Int32? Do I need to marshal the return value?
View 1 Replies
Aug 14, 2009
We are working with an existing native application (most likely written in VB) that loads assemblies and calls methods with "Late Binding." We do NOT have access to its source code. We want to implement this interface in C#, and have the native application call our C# assembly. Is this anything we have to do beyond matching the method names and method signatures to make it work?
View 2 Replies
Jul 25, 2010
is there any native net code to convert BMP/JPG/GIF/PNG to JPG and adjust quality(if JPG),cropping and get output size?the code below just convert BMP to X, and no quality or cropping option(this code from freevbcode).
Public Function ConvertBMP(ByVal BMPFullPath As String, _
ByVal imgFormat As ImageFormat) As Boolean
Dim bAns As Boolean
Dim sNewFile As String
[code].....
View 3 Replies
Aug 23, 2011
When you click a button on my form, it opens a folder dialog box & gets the selected path, then changes a label's text to state that it's starting to process the directory then it goes ahead & opens a new streamwriter & continues on into my other sub for listing directories..roblem is the label isn't changing before it does it's processing, I figure that is because it's processing to fast to actually display the text. Even if processing the directory takes a minute or more the label won't ever change, which should have happened before it started processing the directory.
View 5 Replies
Feb 5, 2010
I must convert string data from a CNC that is arithmetic expression to a number that I can use in a VB application that I wrote. The following is what I get out of the cnc. [18722*65536+19377]/67108864. I need to evaluate this expression in my VB ap. The format of the string is not always the same as what I have illustrated.
View 2 Replies
Feb 19, 2006
I've been trying to mess around with image recognition in C# for some time now. But to do that, I need acces to all the pixels in the bitmap individually. At the moment, I'm using getPixel and setPixel. It works, but it's VERY slow. Is there any faster way to acces pixels in a bitmap? Unsafe code maybe?
View 6 Replies
Jun 6, 2010
In VB.NET projects, errors are highlighted immediately after cursor leaves the line. In C#, I have to wait several seconds for IntelliSense to highlight it. Also, the C# version doesn't show all project errors in "Errors List", unless you start to build it. Actually, it seems to work differently in every way. Is it possible to adjust that behavior?
I am using both Visual Studio 2008 and Visual Studio 2010.
View 2 Replies
Apr 15, 2011
Yesterday I was at an interview where my interviewer (who admittedly didn't claim to be an expert on the subject) stated that "VB.NET is more weakly typed then C#" - (At the same time he couldn't recall an example). This statement seemed incorrect to me (particularly given that both languages use the same framework libraries for their types) and I advised as such and that perhaps he was confused with the option to turn Option Strict or Option Infer on/off.
At the same time I know that VB.NET has situations where it will do type coercion - leading to occasionally unexpected results (although I also cant recall under what conditions) - (Actually I think I just remembered that it was mainly when performing arithmetic operations with different types - whereas other languages will force you to be explicit (?) ).
View 4 Replies
May 1, 2012
I have an interesting issue I've run into where I can easily tap into python code from VB in an excel instance, as described here: Calling python script from excel/vba.However, when I mimic the exact same code structure in visual studio in a form, the pyscript.language = "python" line fails. Does anyone know if MSScriptControl.ScriptControl can be used in VB .Net to control python like you can in excel? This would be a lot easier than setting up a com object for my python scripts.
Example code (need to add microsoft script control 1.0 and excel object library):
[code]...
View 1 Replies
Jan 15, 2012
I have 2 arrays one is a and second is b. how do i compare each of them and insert to new array c?[code]...
View 10 Replies
Mar 23, 2010
I've been developing databases for research using ms access for the last few years. The application is used on accross a hospital network and while it was slow initially, itstarting to come to a grinding halt as numerous users are accessing it at once. I've been debating whether to try and develop the front end using vb.net in hopes of making the application faster.Does anyone know if this would be the case?
View 1 Replies
Jul 4, 2009
However, for several years now, I have been working primarily in the .Net space. Initially, my transition into the .Net world consisted of writing and maintaining VB.Net code. VS provided almost all of the nice intellisense support I came to expect after years of working with the Eclipse/Java combo. Eventually my employer decided to do new development in C#. My initial impression of the intellisense support for C# was less than stellar. At times it seems as if VS has no background compiler for C#, but occasionally it does something smart, indicating there is some background processing there, but not quite enough to really boost productivity in meaningful ways. Is there any sane technical reason for this discrepancy regarding intellisense support between the two languages?
View 4 Replies
Mar 15, 2011
I have been doing this project for couple of weeks and i get stuck and cant find a way to do it. I need to compare this 2 txt files. So if the data in FILE A matched data in FILE B, the quantity in FILE B need to deduct the one customer bought and replace the new quantity. For example:
[Code]...
View 8 Replies
May 31, 2012
I am working on a large project with hundreds of dll's being used on the same machine, on the real large windows there is latency issues that I would love to address. The VB6 project was quick and effective but dotnet is bulky and slow compared to vb6 version, what changes from vb6 to dotnet would increase performance and reduce latency in the larger windows?
Working with VB08 3.5 Framework so parallel isn't going to work sadly, what other methods are there from a code standpoint could I use? DUring the conversion process could it be using parts of code that bog the system down?
View 1 Replies
Jan 13, 2012
Is it possible to create a class in VB.NET that can be compared to a string in a switch statement? For example, let's say I have a class Foo:
Public Class Foo
Public Bar As String = "test"
End Class
Is it possible to implement some interface or override some equality operator so that I could use Foo like so?
Dim foo As New Foo()
Select Case "test"
Case foo
' It worked!
End Select
View 2 Replies
Aug 9, 2010
Im having odd problems with how my form is displaying at runtime...if you look at the 2 attachments you can see at runtime the labels disappear under the check box's, but at design time they are positioned perfectly.
View 5 Replies
Dec 12, 2010
I am using VB.NET and I can't compare the radio button lists selectedItem.Value to a string, it doesn't work...here is the code: (I have also tried selectedValue it does not work either)
[Code]...
Why won't it evaluate that rblOne.SelectedItem.Value = "No" !?!?!? I tried rblOne.SelectedValue, that doesn't work, AND I added .ToString to both, which did not help, I even tried it w/ "No".ToString...this doesn't make any sense.
View 1 Replies
Sep 1, 2010
I have a program that someone else designed the form on and sent to me to populate the code. I am not sure what could have been done to cause this problem, hoping for a quick oversight on my part. There are several fields of textboxes that the user enters numbers in. Normal behavior for textboxes is when you tab to them the current contents are highlighted. On one of these textbox fields, and only that one set of textboxes, the contents are highlighted like normal at first, but after the user edits the content of the textbox, if you tab to it again it will go directly into edit mode instead of highlighting the contents. Each textbox in the field does this individually, so if you just edit one, all the rest will continue to highlight contents until you edit them as well. It appears you don't actually have to change the value of the textbox, just entering edit mode and getting a blinking cursor is enough. I cannot find a difference in the properties of these textboxes compared to the rest.
View 4 Replies
May 3, 2010
What's the advantages of the above types of dll? Is there any other type?
View 1 Replies
May 3, 2010
What's native code? And native dll?
Can i create a native dll using vb.net?
View 2 Replies
Nov 9, 2011
I have an external database that is feeding information to me. One saves their data as native GUID format and my other data source supplies standard .NET GUID format string. Is there a tidy way to convert from Native GUID to GUID Structure? Also is there any validation bit to determine if a provided value is a Native GUID or not? I can't seem to find any if there is one. The difference is as follows:
typedef struct _GUID
{
DWORD Data1;
WORD Data2;
WORD Data3;
BYTE Data4[8];
} GUID;
Data1, Data2 and Data3 get their byte order reversed but Data4 remains the same, see [url] for more info.
View 2 Replies
Jan 12, 2012
I have a vb6 project in which I use a dll library to do some tasks. For that, I add a module which declares all functions of that library such as:Declare Function myFunction Lib "abcdapi.dll" (ByVal hVar1 As Long, ByVal hVar2 As Long) As Long When I call this function (and many other similar) I'm able to do the work and correct Long pointer is returned. But when I try to do the same thing by VB.net (by importing the same library using dllimport and calling the same function), I get no result. although it does return some pointer but that doesn't produce correct result.
[Code]...
View 1 Replies
Aug 20, 2009
I need to convert a windows service written in .NET into native code, independent of the .NET framework. I've looked into using NGen to do this, but couldn't figure out how to use it. Essentially, I would like to take my windows service, run it through *insert app here* and have it bundle together all of the dependent dlls from the framework into their native code equivalents, so the service is installable without the framework.
View 13 Replies
Mar 5, 2009
I'm using VB.Net 2008, and I'm having difficulty finding information on how to detect the presence of the SQL Native Client components. I would like to detect their presence on a computer, and then find the version of the components.Does anyone have any information?
View 4 Replies
Jul 20, 2010
i want to use some api's in my software . Other than api there is no other way .
I want to learn more about win32 api . Can some one tell me
And what is the difference between Native api and normal api
View 12 Replies
Nov 1, 2010
I'm looking at a small remoting project in VB.NET. Initial research turns up references to msrdp.ocx which my Windows 7 Ult system doesn't have; a filesystem search on the same platform turns up MsRdpWebAccess.dll which doesn't appear to be well documented; finally hunting through COM references in Visual Studio turns up rdpencom.dll labeled "rdpcomapi 1.0 Type Library" which seems to be best documented via personal developer blogs (which isn't encouraging but is a lot better than other options).
My goal is a lightweight remoting application I can deploy to Windows 2000 Client/Server, WinXP x86/x64, Win2k3 Server, Vista x86/64, and Win2k8 Server.Is there anything DotNET Native I can use instead of one of these COM libraries? Is one of these COM libraries better for the job overall than others; and then am I going to have platform-specific compatibility issues if I don't provide support for more than 1 of them in my app?
View 5 Replies
Apr 19, 2012
I've never seen this error before; and apparently (According to DIC) the number would have be bigger than -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807, to this this exception (I'm using an Integer, but I've tried Int64, and the same thing happens).
This is where the exception is being thrown:
Dim localPort As Integer = (tcpRow__1.localPort1 << 8) + (tcpRow__1.localPort2) + (tcpRow__1.localPort3 << 24) + (tcpRow__1.localPort4 << 16)
Full Code (Method)
[CODE]...
I highly doubt that that the integer that is being parsed back is greater than, either of those numbers listed above. I've tried using Int64, and even removing the << operator, but it's still throwing this exception.
View 1 Replies