Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What exactly is HUGEP? 1

Status
Not open for further replies.

Valius

Programmer
Oct 20, 2000
174
US
When dealing with _variant_t, I've noticed that to pull data out of the Safearray within parray I have to use a HUGEP type like this:

BSTR HUGEP Data1; //or
long HUGEP Data2; //depending on the type that's in the
//_variant_t

My question is what the heck does HUGEP do? My guess is that it's short for Huge Pointer? But whats the difference between:

BSTR Data1; //and
BSTR HUGEP Data1;

Thanks in advance

Niky Williams
Lead Engineer
NTS Marketing, Inc.
 
In 16-bit environment, C compilers have different memory model: small, compact, large, and huge. Each mode supports different memory access methods (either offset or seg:eek:ffset) to data and code segment.

A "huge" pointer is a far pointer that uses seg:eek:ffset to access memory. In 32-bit environment, memory addressing uses 32-bit flat addressing mode.

HUGE is a #define (in OBJBASE.H) and is for backward compatibility. Under 32-bit it resolve to nothing. Under 16-bit mode, it is defiend as __huge - A compiler specific keyword.

HTH
Shyan

 
Okay, that makes it a bit clearer, thanks so much for the info!

Niky Williams
Lead Engineer
NTS Marketing, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top