uint64 in VC++ 6.0 Compiler?? [modified]
-
Hi, I wonder if unsigned 64bit integer is valid on a vc++ 6.0 compiler. In my application I have to use uint64 data type and whenever I try to use the command that is assigned to this, it fails. These are the two syntaxes that I have to use to define the buffers and the second one is for 64bit unsigned integer buffer on a system having a 64bit compiler and the first one is for systems with non-64bit compiler. If I have to use the first one, how can I define the low/high offsets and low/high transferlen. Suppose I want to start the buffer with zero offset and buffer length of 1024x1024bytes. //************************************************************************* uint32 _stdcall spcm_dwDefTransfer_i64m(// Defines the transer buffer by using 2 x 32 bit unsigned integer values for each 64 bit value drv_handle hDevice, // handle to an already opened device uint32 dwBufType, // type of the buffer to define uint32 dwDirection, // the transfer direction as defined above uint32 dwNotifySize, // amount of bytes after which i want do receive void* pvDataBuffer, // pointer to the data buffer uint32 dwBrdOffsH, // high part of offset in board memory uint32 dwBrdOffsL, // low part of offset in board memory uint32 dwTransferLenH, // high part of transfer buffer length uint32 dwTransferLenL); // low part of transfer buffer length //************************************************************************* uint32 _stdcall spcm_dwDefTransfer_i64 (// Defines the transer buffer by using 64 bit unsigned integer values drv_handle hDevice, // handle to an already opened device uint32 dwBufType, // type of the buffer to define as listed above uint32 dwDirection, // the transfer direction as defined above uint32 dwNotifySize, // amount of bytes after which i want do receive void* pvDataBuffer, // pointer to the data buffer uint64 qwBrdOffs, // offset for transfer in board memory uint64 qwTransferLen); // buffer length thanks, -Pavan. -- modified at 18:07 Wednesday 8th November, 2006
-
Hi, I wonder if unsigned 64bit integer is valid on a vc++ 6.0 compiler. In my application I have to use uint64 data type and whenever I try to use the command that is assigned to this, it fails. These are the two syntaxes that I have to use to define the buffers and the second one is for 64bit unsigned integer buffer on a system having a 64bit compiler and the first one is for systems with non-64bit compiler. If I have to use the first one, how can I define the low/high offsets and low/high transferlen. Suppose I want to start the buffer with zero offset and buffer length of 1024x1024bytes. //************************************************************************* uint32 _stdcall spcm_dwDefTransfer_i64m(// Defines the transer buffer by using 2 x 32 bit unsigned integer values for each 64 bit value drv_handle hDevice, // handle to an already opened device uint32 dwBufType, // type of the buffer to define uint32 dwDirection, // the transfer direction as defined above uint32 dwNotifySize, // amount of bytes after which i want do receive void* pvDataBuffer, // pointer to the data buffer uint32 dwBrdOffsH, // high part of offset in board memory uint32 dwBrdOffsL, // low part of offset in board memory uint32 dwTransferLenH, // high part of transfer buffer length uint32 dwTransferLenL); // low part of transfer buffer length //************************************************************************* uint32 _stdcall spcm_dwDefTransfer_i64 (// Defines the transer buffer by using 64 bit unsigned integer values drv_handle hDevice, // handle to an already opened device uint32 dwBufType, // type of the buffer to define as listed above uint32 dwDirection, // the transfer direction as defined above uint32 dwNotifySize, // amount of bytes after which i want do receive void* pvDataBuffer, // pointer to the data buffer uint64 qwBrdOffs, // offset for transfer in board memory uint64 qwTransferLen); // buffer length thanks, -Pavan. -- modified at 18:07 Wednesday 8th November, 2006
Did you try using the LARGE_INTEGER struct?
-
Did you try using the LARGE_INTEGER struct?
Sorry, didn't get you, I know there is LARGE_INTEGER data type, but where do you want me to use it?? This command is specific to the board driver that I am using. thanks, -Pavan
-
Hi, I wonder if unsigned 64bit integer is valid on a vc++ 6.0 compiler. In my application I have to use uint64 data type and whenever I try to use the command that is assigned to this, it fails. These are the two syntaxes that I have to use to define the buffers and the second one is for 64bit unsigned integer buffer on a system having a 64bit compiler and the first one is for systems with non-64bit compiler. If I have to use the first one, how can I define the low/high offsets and low/high transferlen. Suppose I want to start the buffer with zero offset and buffer length of 1024x1024bytes. //************************************************************************* uint32 _stdcall spcm_dwDefTransfer_i64m(// Defines the transer buffer by using 2 x 32 bit unsigned integer values for each 64 bit value drv_handle hDevice, // handle to an already opened device uint32 dwBufType, // type of the buffer to define uint32 dwDirection, // the transfer direction as defined above uint32 dwNotifySize, // amount of bytes after which i want do receive void* pvDataBuffer, // pointer to the data buffer uint32 dwBrdOffsH, // high part of offset in board memory uint32 dwBrdOffsL, // low part of offset in board memory uint32 dwTransferLenH, // high part of transfer buffer length uint32 dwTransferLenL); // low part of transfer buffer length //************************************************************************* uint32 _stdcall spcm_dwDefTransfer_i64 (// Defines the transer buffer by using 64 bit unsigned integer values drv_handle hDevice, // handle to an already opened device uint32 dwBufType, // type of the buffer to define as listed above uint32 dwDirection, // the transfer direction as defined above uint32 dwNotifySize, // amount of bytes after which i want do receive void* pvDataBuffer, // pointer to the data buffer uint64 qwBrdOffs, // offset for transfer in board memory uint64 qwTransferLen); // buffer length thanks, -Pavan. -- modified at 18:07 Wednesday 8th November, 2006
Something like this?
//Note: Intel x86 specific
uint32 _stdcall spcm_dwDefTransfer_i64 (// Defines the transer buffer by using 64 bit unsigned integer values
drv_handle hDevice, // handle to an already opened device
uint32 dwBufType, // type of the buffer to define as listed above
uint32 dwDirection, // the transfer direction as defined above
uint32 dwNotifySize, // amount of bytes after which i want do receive
void* pvDataBuffer, // pointer to the data buffer
union
{
uint64 qwBrdOffs; // offset for transfer in board memory
struct
{
uint32 dwBrdOffsL;
uint32 dwBrdOffsH;
};
};
union
{
uint64 qwTransferLen; // buffer length
struct
{
uint32 dwTransferLenL;
uint32 dwTransferLenH;
};
};*EDIT* Fixed some typing :)
-- modified at 19:04 Wednesday 8th November, 2006 -
Something like this?
//Note: Intel x86 specific
uint32 _stdcall spcm_dwDefTransfer_i64 (// Defines the transer buffer by using 64 bit unsigned integer values
drv_handle hDevice, // handle to an already opened device
uint32 dwBufType, // type of the buffer to define as listed above
uint32 dwDirection, // the transfer direction as defined above
uint32 dwNotifySize, // amount of bytes after which i want do receive
void* pvDataBuffer, // pointer to the data buffer
union
{
uint64 qwBrdOffs; // offset for transfer in board memory
struct
{
uint32 dwBrdOffsL;
uint32 dwBrdOffsH;
};
};
union
{
uint64 qwTransferLen; // buffer length
struct
{
uint32 dwTransferLenL;
uint32 dwTransferLenH;
};
};*EDIT* Fixed some typing :)
-- modified at 19:04 Wednesday 8th November, 2006I have no idea how their developers (strategic-test) have developed these two syntaxes. Maybe same as how you defined, but I am not sure. I have asked their technical support to rephrase my i64 command into i64m command. BTW how can we define the low and high addresses or lengths for a 64bit integer while accesses it in 32bit fashion?? -Pavan
-
I have no idea how their developers (strategic-test) have developed these two syntaxes. Maybe same as how you defined, but I am not sure. I have asked their technical support to rephrase my i64 command into i64m command. BTW how can we define the low and high addresses or lengths for a 64bit integer while accesses it in 32bit fashion?? -Pavan
pavanbabut wrote:
BTW how can we define the low and high addresses or lengths for a 64bit integer while accesses it in 32bit fashion
With the structure I showed as an example you can access them either way - through the dw or the qw members. The struct will work for both 32 and 64 bit but that doesn't mean that's what the driver vendor does.
-
Hi, I wonder if unsigned 64bit integer is valid on a vc++ 6.0 compiler. In my application I have to use uint64 data type and whenever I try to use the command that is assigned to this, it fails. These are the two syntaxes that I have to use to define the buffers and the second one is for 64bit unsigned integer buffer on a system having a 64bit compiler and the first one is for systems with non-64bit compiler. If I have to use the first one, how can I define the low/high offsets and low/high transferlen. Suppose I want to start the buffer with zero offset and buffer length of 1024x1024bytes. //************************************************************************* uint32 _stdcall spcm_dwDefTransfer_i64m(// Defines the transer buffer by using 2 x 32 bit unsigned integer values for each 64 bit value drv_handle hDevice, // handle to an already opened device uint32 dwBufType, // type of the buffer to define uint32 dwDirection, // the transfer direction as defined above uint32 dwNotifySize, // amount of bytes after which i want do receive void* pvDataBuffer, // pointer to the data buffer uint32 dwBrdOffsH, // high part of offset in board memory uint32 dwBrdOffsL, // low part of offset in board memory uint32 dwTransferLenH, // high part of transfer buffer length uint32 dwTransferLenL); // low part of transfer buffer length //************************************************************************* uint32 _stdcall spcm_dwDefTransfer_i64 (// Defines the transer buffer by using 64 bit unsigned integer values drv_handle hDevice, // handle to an already opened device uint32 dwBufType, // type of the buffer to define as listed above uint32 dwDirection, // the transfer direction as defined above uint32 dwNotifySize, // amount of bytes after which i want do receive void* pvDataBuffer, // pointer to the data buffer uint64 qwBrdOffs, // offset for transfer in board memory uint64 qwTransferLen); // buffer length thanks, -Pavan. -- modified at 18:07 Wednesday 8th November, 2006