01/23/2017
Hi,
I have old c++ code from an HDA server that works on 32bits. I will like to compile it in 64 bit but I am having problems with truncation from OPCHANDLE to HANDLE.
OPCHANDLE is defined as a DWORD (4 bytes) and HANDLE is 8 bytes long in x64 machines.
So, my question is, there exist new opc headers to compile in 64 bits (opchda.h, etc.)? or should I handle this problem in my code?
Thnks
Estanislao
02/24/2014
OPCHANDLE is DWORD (4 bytes, 32 bits) in 64-bit OPC world as well. It has to be, so that the servers and clients with differing bitnesses can interoperate.
The HANDLE (be it whatever it is) has nothing to do with it.
I can imagine that some existing 32-bit code may be storing pointers to OPCHANDLE, and of course that won’t work in 64-bits. In such case the code has to be rewritten to define its handles differently – usually, some kind of “map” (dictionary) structure between the pointers and the actual handles will do.
Best regards
Zbynek Zahradnik
1 Guest(s)