473,387 Members | 1,441 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

BroadcastSystemMessage - Unknown Identifier

Hi,

We have a C++ project written in Visual Studio 6 and we try to compile it in VS 2003 standard version but it gives an error Unknown Identifier on the call of
BroadcastSystemMessage. The VS 2003 installed on Windows XP. Any hints or project settings to make it compiled?

Thanks
A Pham
Nov 17 '05 #1
4 1799

Anybody able to comment on this? I too have a dirt simple shell (Windows
App ) on Windows XP (Studio .NET 2003) Using Standard Windows Libraries,
that calls BroadcastSystemMessage and it will not link. LNK2019 .

included winuser.h
Added user32.lib to project (in Platform SDK, user32.lib is not in the
top level lib folder under V7).

Changed proj to Unicode , no change.
Tried extern "C" in front of the function declaration, but that just
makes it look for
_BroadcastSystemMessage without any other decoration.

Just calling a simple function in a C++ file (no extern "C" ) makes it
look for
long __cdecl BroadcastSystemMessage(...)

But what is in the lib is
__imp__BroadcastSystemMessage@20... ( given by LibView )

So I'm lost on how to make it use the function that is actually in
user32.lib Seems to need something that is undocumented, but I don't
have the background to say.

John
A Pham wrote:
*Hi,

We have a C++ project written in Visual Studio 6 and we try to
compile it in VS 2003 standard version but it gives an error Unknown
Identifier on the call of
BroadcastSystemMessage. The VS 2003 installed on Windows XP. Any
hints or project settings to make it compiled?

Thanks
A Pham *


--
john2004
------------------------------------------------------------------------
Posted via http://www.mcse.ms
------------------------------------------------------------------------
View this thread: http://www.mcse.ms/message772944.html

Nov 17 '05 #2
"john2004" <jo*************@mail.mcse.ms> wrote in message
news:jo*************@mail.mcse.ms...

Anybody able to comment on this? I too have a dirt simple shell (Windows
App ) on Windows XP (Studio .NET 2003) Using Standard Windows Libraries,
that calls BroadcastSystemMessage and it will not link. LNK2019 .

included winuser.h
Added user32.lib to project (in Platform SDK, user32.lib is not in the
top level lib folder under V7).

Changed proj to Unicode , no change.
Tried extern "C" in front of the function declaration, but that just
makes it look for
_BroadcastSystemMessage without any other decoration.

Just calling a simple function in a C++ file (no extern "C" ) makes it
look for
long __cdecl BroadcastSystemMessage(...)

But what is in the lib is
__imp__BroadcastSystemMessage@20... ( given by LibView )

So I'm lost on how to make it use the function that is actually in
user32.lib Seems to need something that is undocumented, but I don't
have the background to say.

John
A Pham wrote:
*Hi,

We have a C++ project written in Visual Studio 6 and we try to
compile it in VS 2003 standard version but it gives an error Unknown
Identifier on the call of
BroadcastSystemMessage. The VS 2003 installed on Windows XP. Any
hints or project settings to make it compiled?


Do you not obtain the function prototype by using #include <Windows.h>?

It looks like you might just be missing WINAPI in the declaration, but --
depending on the platform and UNICODE, there appear to be three possible
exports: BroadcastSystemMessageA, BroadcastSystemMessageW, and
BroadcastSystemMessage.
--
Jeff Partch [VC++ MVP]
Nov 17 '05 #3

Jeff,
Thanks, I had to add
extern "C" __stdcall long BroadcastSystemMessage( ...

at the top of the file to make it work.
I know WINAPI is the __stdcall part but it took all of it to work.
Joh
-
john200
-----------------------------------------------------------------------
Posted via http://www.mcse.m
-----------------------------------------------------------------------
View this thread: http://www.mcse.ms/message772944.htm

Nov 17 '05 #4
john2004 wrote:
Jeff,
Thanks, I had to add
extern "C" __stdcall long BroadcastSystemMessage( ...

at the top of the file to make it work.
I know WINAPI is the __stdcall part but it took all of it to work.

Including windows.h is enought to get the right definition. At least if
uou correctly #defined WINVER to at least 0x0400 because the declaration
of BroadcastSystemMessage is guarded with:

#if(WINVER >= 0x0400)

Ronald Laeremans
Visual C++ team
Nov 17 '05 #5

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

Similar topics

4
by: Florian Preknya | last post by:
I work on building a metamodel from an UML diagram (serialized as xmi). There I have a class called Class that represents a class from the UML model. The Class has a name member and ininitially it...
4
by: James | last post by:
Can someone please help me with these errors? #include <iostream> #include <string> class holder { private: int vid; string vtype;
4
by: Calum | last post by:
I need to call a function in a shared library, but the type of the function is not known until run-time. enum Type { Void=0, Char, Uchar, Short, Ushort, Int, Uint, Float, Double, String }; ...
1
by: bmassey | last post by:
Hi, Was wondering if anyone could help me with this odd error: Am working in VS.Net Framework 1.1 C++. I had a function defined as void colorizeImage(). I decided I didn't need that function...
7
by: Igor | last post by:
I have one table with categories tblCategories cat_id | cat_name ----------------- 1 | cat 1
5
by: fjanon | last post by:
Hi, I went through the HTML spec without finding the description of what the browsers behavior should/must be regarding tags or attributes they don't understand. I did a quick experiment like...
111
by: Tonio Cartonio | last post by:
I have to read characters from stdin and save them in a string. The problem is that I don't know how much characters will be read. Francesco -- ------------------------------------- ...
0
by: =?Utf-8?B?Qm9iIFNhbmZvcmQ=?= | last post by:
In my application, I wish to set a system environment variable and have it take affect for other processes. I read in MSDN help that to set a system environment variable, I add the new value to the...
6
by: muby | last post by:
Hi everybody :) I'm modifying a C++ code in VC++ 2005 my code snippet void BandwidthAllocationScheduler::insert( Message* msg, BOOL* QueueIsFull,
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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,...

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.