"Nominal Storage Allocation" In The Context Of Primitive Data Type Allocation Size?

Jul 30, 2011

Looking at this table describing the data types in VB.One of the columns is labeled "Nominal storage allocation". What does this mean? Why is the word "nominal" here?

View 2 Replies


ADVERTISEMENT

VB - Pointers, Memory Allocation And Reading Writing Data?

Aug 15, 2009

I am using these API functions for my project where I am handling 3 unmanaged DLLs of two external apps, basically all it does is to carry data back and forth between these external applications. The project needs a lot of use of pointers, passing pointers and reading/writing to memory so both applications can talk to each other.

Declare Function HeapAlloc Lib "kernel32.dll" _
(ByVal hHeap As Long, ByVal dwFlags As Long, ByVal dwBytes As Long) As Long
Declare Function HeapCreate Lib "kernel32.dll" _

[code]....

set of windows API functions for allocating memory, reading and writing to allocated memory, and other required functions to generate required arguments to pass to these API calls?I am up to where I am allocating memory and getting pointer, but I don't know how to go about reading, writing, passing pointers, finding data lengths and reusing memory.

[code]....

View 6 Replies

Memory Allocation - Analyzing And Debugging

Jan 11, 2011

Any right direction for best practices of memory allocation. (i.e., disposing of forms, setting variables to nothing). I am writing a program and for now, I just monitor it in Task Manager. I notice that the size change isn't very balanced. The amount of memory used when a new form loads isn't as much as when that same form is closed. (either by button or by the 'x'). I want to get a handle on this before I get too deep in the program.

View 3 Replies

VS 2008 Memory Allocation For Program?

Jun 4, 2009

I noticed my program starts out at between 20-25 MB of RAM usage upon launch.It levels out at around 28MB once the two forms that are used are open.Sometimes it will hit 31MB. But that's usually max.It simply consists of an initial form on loadup for the Notification area Icon and then two forms that are loaded when you right or left click on the icon.One they are loaded they are either hidden or shown when you click on the icon.All-in-all, the program isn't doing much; no large calculations, no huge amounts of data being manipulated, etc.

View 5 Replies

C# - Is String A Primitive Type

Oct 19, 2010

I am curious about the string and primitive types. Article like this says string is primitive type. However second article on MSDN does not list string as primitive type. However when I ran the code provided in second article, it displays String is not Primitive type.

View 8 Replies

Create Our Own Primitive Type?

Oct 31, 2009

there anyway that we can create our own primitive type? let's say we call this

Code:dim test = 4 then test will automatically be an integer right but i wanted this

Code:dim test = 4% and i want test not to be an integer, but a percentage_integer, in other words, my own primitive type. is that possible?

View 4 Replies

Generic BitConverter.GetBytes For Primitive Data Types?

Jan 19, 2012

addressing the need for getting the bytes of an object. But I am wondering if there is an approach to calling BitConverter.GetBytes on a generic type where I know the type is a primitive (Int32, UInt16, etc).

Public Sub Foobar(Of T as Structure)()
Dim x as T 'Assume T is declared as Int32
Dim y() as Byte
y = System.BitConverter.GetBytes(x)
End Sub

The above will throw your usual error:

Overload resolution failed because no accessible 'GetBytes' can be called with these arguments:
'Public Shared Function GetBytes(value As Double) As Byte()': Value of type 'T' cannot be converted to 'Double'.
'Public Shared Function GetBytes(value As Single) As Byte()': Value of type 'T' cannot be converted to 'Single'.

[code]....

One solution I think would work is a large Select Case calling GetType(), but that is horrendously slow (because of boxing) and looks ugly. I would think that since I call my higher level class with a primitive data type for T, that the compiler would be smart enough to figure it out, but I assume I am not providing enough information for it to derive what T's underlying value is at compile time for the invoked instances.

View 6 Replies

Reset The Array Size Of An Integer Data Type?

Jan 4, 2010

how can I set the size of my integer array if it is determined at compile time?

Class Modlue
Private thisNumber() as integer
Private Sub Button1_Clicked(byval sender as object, byval e as EventArgs) Handles Button1.Click[code]......

View 4 Replies

Size Of The Length Field For A VB String Data Type?

Feb 10, 2010

A string can contain from 0 to approximately 2 billion (2 ^ 31) Unicode characters. Does this mean the length field for the string is a 4 byte unsigned binary field, or is it a 4 byte signed binary ?

View 4 Replies

Font Size / Type And Size In Paper RDLC + ReportViewver + VB2005

Apr 15, 2009

Whats the font size real meaning? since when i use Arial font size 10 in the report its gonna take different space than the textbox im using (Both using exactly same font type/size/unit) its kinda if i set 10 milimiters to the font size why would the i and M for example have so diferent size.

i wish it was like in the Notepad where all the letters take the same space. what i need its to give a certain texbox(in the report) with auto grow to have always the same lines of height but its not posible to calculate it from vb b4 being inputed to the report.

View 1 Replies

How To Create Dynamic Storage Of Data

Jan 26, 2012

I'm a junior VB programmer and looking for some advice on this subject. I'm trying to create a chunk of code that will create dynamic storage for variables for use later by dynamic custom controls.

For example:
An INI file might have an entry in it that looks something this:
....
[var1] <-- this becomes the Storage name
description=My Variable
type=System.Int32 <-- this could be any valid VB type
last_val=456 <-- Other code would save the last value
....

And I want to access the data using a standard "property set" like so after it's created:
var1_reference.value = 55
I've tried using a generic class which works ok as long as I declare the variables at design time from within the design environment. But when I try to create them from the INI file it gets messy.

Here's the simple generic class i've constructed to test this:
Public Class GenericVar(Of T)
'
' Generic Symbol Class for data storage
'
Private VarName As String
Private VarType As Type
[Code] .....

Also, as each object is created (and they could be different types) I store a reference in an array to make it easier to keep track of, but I'm having a hard time getting access to the objects and their properties, and certainly cant seem to assign an event handler to it once its in an arraylist because the design time code doesn't know what "Type" it is in the arraylist of objects.

View 2 Replies

Program Data Storage Location?

Dec 2, 2011

Where should I store my programs user data so no one will have trouble accessing it?

View 2 Replies

Vista (and Windows 7?) Data Storage

Oct 19, 2009

I have and application written that works great on XP. It is VB.Net 2008, using .net 3.5. I install and Access database to the program file directory. In Vista, I get an error that is permissions related as even admins don't have default write permissions to the Program Files directory and access creates a .ldb file when in use. To solve this, I have had the users give themselves permission to the folder.

Is that the best solution? If not, where should data be stored in Vista and in Windows 7? Also, I have an update feature of my software that will download updates to the program files folder. Is this out, too?

View 20 Replies

Whether Using XML Database For Data Storage Is Safe Enough

Mar 4, 2011

Whether using XML database for data storage is safe enough? because I wanted to branch using an XML database and then she sends the data to the center. and then the data is in process at the center and then incorporated into the database server

View 4 Replies

DB/Reporting - Best Practice For Jagged Data Storage

Jun 10, 2009

say you have a database that you want to store 100 different recipes in. Out of that 100 recipes 20 have 5 ingredients, 30 have 7 ingredients, 30 have 4 ingredients and 20 have 6 ingredients. So what's the best practice for storing an unknown number of items in a database?

Currently what I am doing in these situations is storing them in a single field in a database separated by a comma. Then when I have to retrieve them I split them by the comma into an array. This doesn't seem right to me but I haven't noticed an impact on speed or efficiency, so what would be the best practice to handle this situation?

View 2 Replies

DB/Reporting :: Use DataSet For Local Data Storage?

Mar 22, 2009

I need a simple method for a user to enter as many rows of data as they wish (probably won't exceed 50 in most cases and that's pushing it) and then store that data for retrieving the next time they want to reuse that list. I will also need to read the rows in for manipulating text in a file with those entries.

Would the best method to be to use the DataSet in VB Express 2008 and then use the DataGridView for allowing the display and entry of the data?

View 1 Replies

Dynamic Data Storage Without Seperate Database Program?

Jun 5, 2010

I'm relatively new to the vb.net framework and object oriented programming. After perusing the threads for a few hours I can't quite find an answer so I'm posting this thread. I'm not necessarily looking for code examples. I just want to know if it's possible and where to look next. Basically I'm trying to build a starter application that will help me learn programming. One of the main things I want to do is to be able to dynamically (at run time) create a set of information (data) that can be manipulated via a set of static (and/or dynamic) functions/calculations. The reason I need it to be dynamic is because even though this program is really just for my own fun and perusal on my own machine (and I want it to be able to run without any outside connections (i.e. databases or servers) the data itself is going to be location (i.e.State of residence or even city) specific. Essentially most of the data will be numerical and can be of the integer type. But I'd like to be able to adjust and create new data sets if desired. From everything I've read and researched I haven't found a way to do this (at least now without an excessive amount of coding that is above my expertise). So I want to know if there is a way to do this that is relatively simple.

View 2 Replies

Parameters Data Type - Add Parameter With Same Data Type As Column Data Type

Feb 26, 2012

For each column in data table i want to add parameter with same data type as column data type. But looks it's not that simple.


Dim cmd As New SqlCommand
Dim dType As New System.Data.SqlDbType

For Each cl As DataColumn In DataTable1.Columns

[CODE]...

How can I do this?

View 4 Replies

C# - Add A Service To The Type Descriptor Context Of A Property Grid In .Net?

Apr 13, 2010

I have an app that allows the user to choose an image, at design time, either as a straight image, or from an image list.

All cool so far, except that this is not happening from the visual studio property browser, its happening from a property grid that is a part of a type editor.

My problem is, both the image picker (actually resource picker), and the imagelist type converter rely on some design-time services to get the job done. In the case of imagelist, its the IReferenceService and in the case of the resource picker its a service called _DTE.

In the first instance of an edit from the visual studio property browser, I could get a reference to these services but (1) how can I add them to the type descriptor context of my property grid?

It would be better, for future proofing, if I could just copy a reference to all of the services in the type descriptor context. (2) Where does the property browser get these services from in the first place?

ETA: I still don't know how to do it, but I now know it is possible.

(1) Sub-class control and add a property whose type is an array of buttons.

(2) Add it to a form.

(3) Select the new control on the design service and edit the new property in the property browser.

(4) The collection editor dialog pops-up

(5) Add a button

(6) Edit image and image list - the type editor and type converter, respectively, behave as they should.

ETA2: Ok, I'm getting warm. It looks like you do it through the Site property of the property grid. I can create a new site, and pass it the type descriptor context I have a reference to and then it should have all the service. I'll give it a go ...

View 1 Replies

DB/Reporting :: Searching For More Effective Data Storage For Quick Access?

May 12, 2008

I am quite green to VB .NET and it start occuring to me that I am doing things probably in a very ineffective way.Anyway here is the problem I have datasets, consisting of integers there is set 1 which is of format ID, ID2 - ID here is unique but different ID can refer to same ID2. Before I start reading in the data I have unknown number of these entries (ID and ID2 can be at least as high as 99999999)

Then I have a second data set of format ID2 here is the same as in the set 1 and it can contain several PID entries (all integers). In this set the ID2 is unique and again for one ID2 there can be unknown amount of these PIDs, same PID can occur more than once.

[Code]...

View 17 Replies

Datasource - An Expression Of Non-boolean Type Specified In A Context Where A Condition Is Expected - Near ')'

Jun 24, 2011

I am developing a VB.NET ASPX file and am trying to run a string query in VB.NET, but now I get the above error message. How can I determine the cause? Some of the code in this

[Code]...

View 2 Replies

Data Storage Methods (access/sql Etc) Require The End User To Download Extra Files?

Mar 3, 2012

I'm just getting started with Visual Studio (2005), and my aim is to write a fairly simple application in Visual Basic that will need to store some data to disk.What I really want is to be able to send the application to the end users (xp, vista, win7) and have them just be able to use it without having down download all kinds of extras. For example I'm guessing that if I use an SQL database in my application they will need to download SQl server express or some other sql downloadable?

If so is there a similar downloadable for MS Access?I'm just in the 'seeing how things work' stage at the moment and I don't want to waste time going down the SQL track just to find it won't actually work unless my users all download SQL to their machines (which they won't want to do).

View 4 Replies

Create A Function Which Have Either 1 Parameter With A String As Data Type Or 2 Parameters With Double As Data Type?

Jun 11, 2012

I need to create a function which have either 1 parameter with a string as data type or 2 parameters with double as data type.Something like the substring method.

View 2 Replies

Data Type Mismatch Between Vb Date Datatype And Ms Access Datetime Data Type?

Dec 27, 2010

I'v designed a ms access database table with one field having Datetime datatype. I can Insert data into it from vb.net front end by trns_dt DateTime.Now.DateBut when I fetch records from the tableand assign the dataset datasource as da, it shows datatype mismatch error.

daleDbDataAdapter("SelectDaily_Transactiondtp_from_dt.value dtp_To.value con)
dsDataSet

[code].....

View 2 Replies

Error: The CLR Has Been Unable To Transition From COM Context 0x4cefd8 To COM Context 0x4cf148 For 60 Seconds

Aug 20, 2009

When bulk renaming files (14000 of them) i get this error: The CLR has been unable to transition from COM context 0x4cefd8 to COM context 0x4cf148 for 60 seconds. The thread that owns the destination context/apartment is most likely either doing a non pumping wait or processing a very long running operation without pumping Windows messages. This situation generally has a negative performance impact and may even lead to the application becoming non responsive or memory usage accumulating continually over time. To avoid this problem, all single threaded apartment (STA) threads should use pumping wait primitives (such as CoWaitForMultipleHandles) and routinely pump messages during long running operations.

My code is as follows:

Private Sub frmTest_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim asd As List(Of String) = FileIO.FileSystem.GetFiles("D:Music").ToList
Dim rs As New ADODB.RecordSet("SELECT * FROM Songs", My.Settings.Files_Database__Connection)

[code].....

View 4 Replies

Converting Double Data Type To String Data Type

Jan 31, 2010

I have a program that calculates commission, but if the commission is nothing then I do not want it to show a zero commission. I want a message box to show a message that there is no commission earned.

View 1 Replies

Create An Array Size And Type Of Another?

Jul 6, 2010

I want to write an extension method that works with all kinds of arrays (Integer, String, Decimal, ...). It returns an array of the same type and size as the input parameter array.[code]...

View 1 Replies

Comparisons For A LINQ Except Query Using Primitive Datatypes?

Jan 13, 2012

Anyone have any insight on the Big O notation for comparisons for a LINQ Except query using primitive datatypes? I couldn't find anything on google.

View 3 Replies

Primitive Types - .Net Anding A Byte And A Double?

Aug 1, 2011

during some code conversion from another persons VB.net project to C#, i have come across the following code:

[Code]...

Now m trying to convert this to C#, but im a little confused as to exactly the meaning of this line:

If lbytRelayStateMask And (2 ^ lintCounter) Then It appears there something going on behind the scenes (that ill have to examine further) however before i do i would just like to clarify the result of this if statement. Am i correct in saying if either one of the sub-expressions equals zero then its false, otherwise its true? Sorry, im not too up to speed on VB.net.

View 2 Replies

Specific Method For Getting Non-primitive Types In An Assembly?

Mar 11, 2011

Is there any class or specific method for getting non-primitive types in an assembly? FieldInfo.Gettype() will do for primtive types but what about non-primitive types?

View 3 Replies







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