473,473 Members | 2,286 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

MAKEWORD( )

frnds,

i m new to this world.
I use to make application out of scratch.

wVersionRequested = MAKEWORD( 2, 2 );

can anyone tell me wht is the significance of calling MAKEWORD( )
function ??
Thanx

Regards
Asit

Jul 17 '07 #1
4 23497
asit skrev:
frnds,

i m new to this world.
I use to make application out of scratch.

wVersionRequested = MAKEWORD( 2, 2 );

can anyone tell me wht is the significance of calling MAKEWORD( )
function ??
This is part of the C++ socket wrapper class from the MSDN...
it's macro and defined
//#define MAKEWORD(low, high) \
((WORD)((((WORD)(high)) << 8) | ((BYTE)(low))))

in any case I strongly doubt that it is C standard :P
and the place to look for the answer would by:
http://search.msdn.microsoft.com
Thanx

Regards
Asit
Jul 17 '07 #2
On Tue, 17 Jul 2007 20:21:07 +0200, Carramba <ca******@example.com>
wrote:
>asit skrev:
>frnds,

i m new to this world.
I use to make application out of scratch.

wVersionRequested = MAKEWORD( 2, 2 );

can anyone tell me wht is the significance of calling MAKEWORD( )
function ??

This is part of the C++ socket wrapper class from the MSDN...
Nah, it's a macro that I wrote long ago - before MS even had their own
C compiler. It combines two characters into a 16-bit word.

I don't know how the OP found it ;-)

--
Al Balmer
Sun City, AZ
Jul 17 '07 #3
Al Balmer skrev:
On Tue, 17 Jul 2007 20:21:07 +0200, Carramba <ca******@example.com>
wrote:
>asit skrev:
>>frnds,

i m new to this world.
I use to make application out of scratch.

wVersionRequested = MAKEWORD( 2, 2 );

can anyone tell me wht is the significance of calling MAKEWORD( )
function ??
This is part of the C++ socket wrapper class from the MSDN...

Nah, it's a macro that I wrote long ago - before MS even had their own
C compiler. It combines two characters into a 16-bit word.
yeah sure... how about you search for it on google and see were you find
it..
you should then sue ms for piracy ;-)
I don't know how the OP found it ;-)
Jul 18 '07 #4
On Wed, 18 Jul 2007 19:11:48 +0200, Carramba <ca******@example.com>
wrote:
>Al Balmer skrev:
>On Tue, 17 Jul 2007 20:21:07 +0200, Carramba <ca******@example.com>
wrote:
>>asit skrev:
frnds,

i m new to this world.
I use to make application out of scratch.

wVersionRequested = MAKEWORD( 2, 2 );

can anyone tell me wht is the significance of calling MAKEWORD( )
function ??

This is part of the C++ socket wrapper class from the MSDN...

Nah, it's a macro that I wrote long ago - before MS even had their own
C compiler. It combines two characters into a 16-bit word.

yeah sure... how about you search for it on google and see were you find
it..
Google doesn't know everything. I already know exactly where to find
it. Has it really come to this - people think Google encompasses the
total of human knowledge?
>you should then sue ms for piracy ;-)
Huh? I never tried to trademark it, and I suspect MS's implementation
was independently developed. OTOH, it might be cheaper for them to
settle ...

I trust that you do get the point - the macro in question (if it is a
macro) is not necessarily what you told the OP it is, and although it
might be implemented in standard C, discussing it in c.l.c is
pointless without seeing the implementation.
>
>I don't know how the OP found it ;-)
--
Al Balmer
Sun City, AZ
Jul 18 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Salgoud Dell | last post by:
C++ has a variable type 'unsigned short int.' I am trying to write a VB6 program that prints these out of a file made originally by C++. However, the unsigned short integer (1-65535) is not...
13
by: Siemel Naran | last post by:
Hi. I posted this question to comp.lang.c++, but am rephrasing it a bit from what I learned and posting to comp.lang.c++.moderated for more insight. So how do I solve my problem? I want it so...
0
by: Robert Colfin | last post by:
Can anyone verify if this is the correct way to do this? Thanks. using System; using System.Threading; using System.Diagnostics; using System.Runtime.InteropServices; namespace WSockImport...
4
by: Steve | last post by:
In VC++ 6.0 there were very handy macros to extract bytes from words and words from double words: HIBYTE, LOBYTE,HIWORD,LOWORD. Also there were macros to make words from bytes and double words...
1
by: Glen Conway | last post by:
Hi, I'm trying to use the gethostbyname function from wsock32.dll and failing dismally Has anyone got a successful implementation of this in VB.NET? My ulitimate goal is to resolve NetBIOS names...
3
by: HasseA | last post by:
I was wondering if some one could help me. I need to put two unsigned char (8bits) near each other and make another number of it. For example: Binary 00000001 (1 dec) Binary 00000010 (2 dec)...
6
by: s_4 | last post by:
Hello! Sorry about my english - I write to you from poland. I have strange problem. Bind() return '16'. Documentation say that it should return 0 (no error) or -1 (some error). Here is the code...
2
by: asit | last post by:
frnds, i m new to this world. I use to make application out of scratch. wVersionRequested = MAKEWORD( 2, 2 ); can anyone tell me wht is the significance of calling MAKEWORD( ) function ??
3
by: MattKent | last post by:
Hi, I'll try and keep this quick and painless. I've created a status bar in my Win32 C++ code, and it works fine. Then I try assigning text the correct way: LPSTR textString = "Ready";...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.