Click here to Skip to main content
15,846,571 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to return hex values like the below

// define the media modes
#define TAPIMEDIATYPE_AUDIO                     0x8
#define TAPIMEDIATYPE_VIDEO                     0x8000
#define TAPIMEDIATYPE_DATAMODEM                 0x10
#define TAPIMEDIATYPE_G3FAX                     0x20
#define TAPIMEDIATYPE_MULTITRACK                0x10000

I want to return one or more than one values from a function like


What should be the return type ??


Thanks All,

I put the return type UINT.

Updated 9-Jul-10 4:56am

Hex values don't exist. What you have is an integer which is represented as string in hexadecimal format. So, in your case you simply return an integer.
Share this answer
Iain Clarke, Warrior Programmer 9-Jul-10 9:52am    
Reason for my vote of 5
Answers the question, and attempts to educate the questioner also
A DWORD (or unsigned int) looks appropriate.
Share this answer
use unsigned char
     unsigned char l = 0x08;
     but if value is more than 255 then split it into 2 bytes 
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900