LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

memory model: are far and huge pointers still relevant?

Solved!
Go to solution

Hi,

 

importing functions provided by an external DLL I was wondering about some of the function declarations using the far or huge keyword, e.g. double far *cntr or unsigned long HUGE *datp . I thought that these memory models were useful (or even necessary) for 16 bit programs, but do I still need to specify a pointer as large or huge in todays 32 bit programs, i.e. using the CVI compiler?

 

Thanks, Wolfgang 

0 Kudos
Message 1 of 7
(4,755 Views)

hm, let's try again in the new year 🙂

If the question was unclear:

 

do I need to declare a function as double far *cntr or is it safe to omit the keywords 'far', 'huge' etc.

 

Thanks, Wolfgang

0 Kudos
Message 2 of 7
(4,692 Views)
My memory is hazy... aren't 'far' and 'huge' old 16-bit code, long gone and
forgotten ?
--
Guillaume Dargaud
http://www.gdargaud.net/


0 Kudos
Message 3 of 7
(4,669 Views)

Hi Guillaume,

 

that's what I thought, too... but now I have to use a hardware driver (obviously an old one) where the functions are declared this way and I wanted to know if I can ignore these key words or not...

 

Thanks, Wolfgang

0 Kudos
Message 4 of 7
(4,665 Views)
Solution
Accepted by topic author Wolfgang
Hi Wolfgang,

attached you’ll find a link, which describes, how to use the mentioned data types in CVI.
What is "Thunking" and How Does it Affect CVI's 32-bit Environment?
http://digital.ni.com/public.nsf/allkb/F72A410523887C97862562BD007994C7?OpenDocument

Ulrich
AE-NICER
Message 5 of 7
(4,625 Views)

Hi Ulrich,

 

Thanks a lot for addressing this question! I was afraid that it might have been too trivial, after following your link it seems to me that it might be too difficult to solve... But I'll try and will contact the company distributing the hardware and the driver DLL...

 

Best wishes,

 

Wolfgang

0 Kudos
Message 6 of 7
(4,623 Views)

If I may just add a suggestion for your knowledgebase article: adding some of the keywords 'far', 'near', 'huge' might increase its visibility... I was searching before asking in the forum, but wasn't aware of the word 'thunking'..

 

Wolfgang

0 Kudos
Message 7 of 7
(4,619 Views)