15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


Communication Functions and WIN32 SDK

MICHAEL@datatree.com
Thursday, June 13, 1996

Environment: VC++ 4.0 and Windows 95

How do you compile/link Communications Functions,
like SetCommState, in a 32-bit MFC application.

Here's what I've tried so far in an attempt to add
SetCommState() to my source file:

1. #include "winbase"   ---- this include file contains the prototype
2. Step 1 didn't work because the prototype is wrapped in #ifndef NOCOMM.

What is this all about? All I was able to discover is that NOCOMM is
defined when RC_INVOKED is true. I gleaned this from WINDOWS.H.

I searched MSDN to no avail, however all sample code was SDK
code, or .C files. Very curious.



------------------------------
Michael L. Thal
Data Tree Corporation
voice: (619) 231-3300
fax:      (619) 231-3301




MICHAEL@datatree.com
Friday, June 14, 1996

I finally solved this by commenting out a line in my
STDAFX.H file.

//"#define VC_EXTRALEAN"

MFC adds this to remove rarely-used headers.
---------------------------------------------------------------------------
>
>Environment: VC++ 4.0 and Windows 95
>
>How do you compile/link Communications Functions,
>like SetCommState, in a 32-bit MFC application.
>
>Here's what I've tried so far in an attempt to add
>SetCommState() to my source file:
>
>1. #include "winbase"   ---- this include file contains the prototype
>2. Step 1 didn't work because the prototype is wrapped in #ifndef NOCOMM.
>
>What is this all about? All I was able to discover is that NOCOMM is
>defined when RC_INVOKED is true. I gleaned this from WINDOWS.H.
>
>I searched MSDN to no avail, however all sample code was SDK
>code, or .C files. Very curious.
>
---------------------------
Michael L. Thal
Data Tree Corporation
voice: (619) 231-3300
fax:   (619) 231-3301






| Вернуться в корень Архива |