extern void word(ULONG msg, BYTE target)


can you please explain to me what this line of code means? it is in a .h file.

Also, please metion (if you have something to add) about the sizes of the variables. ie: 8, 16 or 32 bit. (To give some background info, I am porting code from a 16bit to a 32 bit processor, and I need to know if this line needs to be changed.  

(Please focus on explaining the code though, then I can probably figure the rest out.

Thank you
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

rbrConnect With a Mentor Commented:
extern void word (ULONG msg,BYTE target)

extern: Function can be used from outside this file

void: function has no return value

word: name of the function

ULONG: must be a typedef (i.g. typedef unsigned long ULONG

msg: name of the varibale of type ULONG

BYTE: typeddef like ULONG (i.g. typedef unsigned char BYTE or typedef char BYTE)

target: name of the variable of type BYTE
extern = external. somewhere outside the current file.
void = no return value.
word = the name of the function.
ULONG = unsigned long.
msg = a ULONG variable named 'msg'
BYTE = one byte variable type.
target = a BYTE variable named 'target'

The sizes of ULONG and BTYE depends on the processor, but if you use these CONSTANT values (or use sizeof() ), you should be in the clear.

I'll look for more info also,
Arnon David.
if the typedef ULONG is unsigned long no changes between 16bit and 32bit may be done. (I guess it would be so).

The same statement is true for the BYTE if char is used.
rbr, except for the 'extern' part, how is your answer different then mine ?

Arnon David.
All Courses

From novice to tech pro — start learning today.