473,324 Members | 2,002 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

UInt32 error?

Hi there, The following code is troubling me:

UInt32 nOffset = nStringEntriesOffset + (40 * nIndex);

nStringEntriesOffset is a UInt32 containing 2124
nIndex is a UInt32 containing 5213

After the execution of the above line, nIndex equals to : 14036 !!!

What the hell is hapening?

Ins't supposed to contain 210644 instead ?!
Nov 15 '05 #1
1 1680
UInt32 nStringEntriesOffset = 2124;

UInt32 nIndex = 5213;

UInt32 nOffset = nStringEntriesOffset + (40 * nIndex);

Console.WriteLine(nOffset.ToString());

Console.ReadLine();

Returns you : 210644 !!!!!!

José

"Michel Racicot" <mi*********************@cgi.com> a écrit dans le message
de news:O0****************@TK2MSFTNGP11.phx.gbl...
Hi there, The following code is troubling me:

UInt32 nOffset = nStringEntriesOffset + (40 * nIndex);

nStringEntriesOffset is a UInt32 containing 2124
nIndex is a UInt32 containing 5213

After the execution of the above line, nIndex equals to : 14036 !!!

What the hell is hapening?

Ins't supposed to contain 210644 instead ?!

Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: john smith | last post by:
I have never really understood the difference between the two notations below. I often run into code where they are passing in the address of some location. Some people do something like...
9
by: Xiangliang Meng | last post by:
Hi, all. I see a very strange fragment code today. Uint32 enum { a = 100; b = 200; }; NOTE: Uint32 is defined to be 'unsigned' in other source files.
2
by: Shankar | last post by:
Hi, I am writing a Managed C++ class library where interfaces take a unsigned int parameter. Looking at the CTS documentation, it is mentioned that there is no built- in type in VB.NET for this...
1
by: steellock | last post by:
The below code always get compile error, "Can not change Interger to UInt32". Then How to set the BackColor property With TextObjec .Name = "txtProductCode .SetText("Apple" .BackColor = 8 '...
2
by: steellock | last post by:
The below code always get compile error, "Can not change Integer to UInt32". Then how can I set BackColor property With txtob .Name = "txtProductCode .SetText("Apple" .BackColor = 8 '...
9
by: Chris Botha | last post by:
Hi, I have an UInt32 and want to stick the value into an Integer and get an Overflow exception, BUT using C# the same value can be casted into an int and the value is as expected. The Hex value is...
2
by: Bern McCarty | last post by:
In the old MEC++ syntax I can do this: // compile in VS 2005 shell with cl -clr:oldsyntax -LD ArrayCopyOldSyntax.cpp #using <mscorlib.dll> public __gc class CopyTest { private:...
22
by: David T. Ashley | last post by:
I'm writing code which will compile on multiple Windows and multiple *nix platforms. Some will have 64-bit integers, I believe. What is my best option to define platform-independent types such...
11
by: Yaniv | last post by:
Hi How can I convert Uint32 variable to System.drawing.color ?? Thanks in advanced Yaniv
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.