Questions tagged [uint32]

uint32 is a datatype that represents an unsigned integer and is coded on 32 bits in memory.

uint32 is a datatype that represents an and is coded on 32 bits in memory. Unlike its counterpart which is , uint32 can only be used to store positive integers, of values between 0 and 232 - 1.

176 questions
3
votes
2 answers

How to call a C function in Fortran and properly pass uint32_t arguments

Hi I am using a Fortran 90 code to call a C function. Since I am manipulating addresses, the arguments of the C function should be properly matched in Fortran. I am using ifort and icc to compile the code and working on 64 bit machine. Some testing…
Alexander Cska
  • 738
  • 1
  • 7
  • 29
3
votes
1 answer

ReadInt32 vs. ReadUInt32

I was tinkering with IP packet 'parsers' when I noticed something odd. When it came to parsing the IP addresses, in C# private uint srcAddress; // stuff srcAddress = (uint)(binaryReader.ReadInt32()); does the trick, so you'd think this VB.Net…
esjr
  • 186
  • 3
  • 9
3
votes
1 answer

Converting an Ipv6 type address to network byte order

I have an ipv6 address in the following format uint32_t adress6[4]; So the above array stores 4 uint32_t type data which equals 16 bytes overall and hence an ipv6 type address. How can I convert the address stored in the above format to a network…
Sumit Das
  • 1,007
  • 9
  • 17
3
votes
4 answers

What is the UInt32 data type in Visual Basic .NET?

What is the UInt32 datatype in VB.NET? Can someone inform me about its bit length and the differences between UInt32 and Int32? Is it an integer or floating point number?
user156073
  • 1,933
  • 8
  • 31
  • 37
2
votes
3 answers

How to pass uint in Java?

I'm trying to call SendMessage with an uint parameter from Java, but I can't convert int to uint. I can't change the uint parameter in SendMessage because it is a windows function. Is there some way of doing this? Background: I'm actually using…
omikun
  • 273
  • 1
  • 2
  • 14
2
votes
1 answer

Visual Studio C++ has different comparison results for UINT16 and UINT32

I caught myself checking if the difference between two unsigned numbers was >= 0. I ran a test running Visual Studio 2022 Preview with the following code. In both cases the answer was true. That seems right to me as how could an unsigned number be…
MaryK
  • 71
  • 6
2
votes
3 answers

C# Problem using blowfish NET: How to convert from Uint32[] to byte[]

In C#,I'm using Blowfish.NET 2.1.3's BlowfishECB.cs file(can be found here) In C++,It's unknown,but it is similiar. In C++,the Initialize(blowfish) procedure is the following: void cBlowFish::Initialize(BYTE key[], int keybytes) In C#,the…
Ivan Prodanov
  • 34,634
  • 78
  • 176
  • 248
2
votes
2 answers

Faster way to convert three uint32_t to generate a unique key in C

I have three uint32_t that when combined, they will generate a unique key. I have to do this about 100M or more & potentially several times a day and store that in a key-value database. I'd like to keep the key to the least amount of bytes possible.…
Peter D
  • 47
  • 5
2
votes
0 answers

Timestamp UINT32_t overflowing issue

I have an application where an embedded device sets an internal timestamp each day from a server request. To make things simple the server returns time in Unix Epoch for example: 1602529759 = 10/12/2020 3:08:XX EST PM These devices report that…
Tanner Ewing
  • 337
  • 4
  • 18
2
votes
1 answer

write a raw binary unsigned 32bit integer in fortran

I have a four byte integer that i want to convert to a unsigned 32 bits integer and write as a raw binary data (little endian). This value will be used as a offset in a .vtu file to be read in paraview, according to this pattern…
grpllrne
  • 41
  • 4
2
votes
1 answer

Error when trying to set a DWORD value in the windows registry using C #

I'm writing code that sets a value in the Windows registry. when I set that value manually, it works as expected; when I want to set the value programmatically, however, it gives an error. The value I want to define is a DWORD value type that is…
2
votes
1 answer

Swift: Cannot convert value of type 'Int?' to specified type 'UInt32'

I'm trying to assign an array count to a UInt32. I get the error "Cannot convert value of type 'Int?' to specified type 'UInt32'". The array count is type Int, but the error says "Int?", which looks like an optional Int. I have no idea what else it…
Chewie The Chorkie
  • 4,896
  • 9
  • 46
  • 90
2
votes
2 answers

Fastest UInt32 to int conversion in C#

I have a fast bit-level routine that calculates a value, and returns a UInt32. I need to store this value in SQL Server in a 32 bit int field. I don't want to increase the size of the field, and just want to store the "bytes" from this function…
Flipster
  • 4,373
  • 4
  • 28
  • 36
2
votes
1 answer

Binary operator '/' cannot be applied to two 'UInt32' operands

Here is my code. var frameCount = INT_MAX ... let totalSize: UInt32 = 4096 let itemSize: UInt32 = 64 frameCount = totalSize / itemSize I get "Binary operator '/' cannot be applied to two 'UInt32' operands" error message. Is it really impossible or…
Capella
  • 881
  • 3
  • 19
  • 32
2
votes
1 answer

swift UInt32 0 or 0x0?

All the tutorials I look I see the number as 0x0 when is assigned to a UInt32 self.physicsBody!.collisionBitMask = 0x0 why not self.physicsBody!.collisionBitMask = 0 is there a reason for it or just for readability ?
Eric Yu
  • 213
  • 2
  • 12
1 2
3
11 12