Click here to Skip to main content
15,904,935 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralCaption displaying problem Pin
spdl20017-Mar-05 19:52
spdl20017-Mar-05 19:52 
Generaltext color Pin
Anand for every one7-Mar-05 19:23
Anand for every one7-Mar-05 19:23 
GeneralRe: text color Pin
Ryan Binns7-Mar-05 20:31
Ryan Binns7-Mar-05 20:31 
GeneralUsing FindWindow in ISAPI Pin
arponjude7-Mar-05 19:18
arponjude7-Mar-05 19:18 
GeneralRe: Using FindWindow in ISAPI Pin
arponjude7-Mar-05 22:04
arponjude7-Mar-05 22:04 
GeneralISAPI and VC++ Client [downloading and uploading of file] Pin
arponjude7-Mar-05 19:06
arponjude7-Mar-05 19:06 
GeneralMultiline Textbox Pin
Anand for every one7-Mar-05 18:40
Anand for every one7-Mar-05 18:40 
GeneralRe: Multiline Textbox Pin
PJ Arends7-Mar-05 18:46
professionalPJ Arends7-Mar-05 18:46 
GeneralRe: Multiline Textbox Pin
ThatsAlok7-Mar-05 18:57
ThatsAlok7-Mar-05 18:57 
QuestionSample from MSDN, Is this correct? Pin
eight7-Mar-05 17:45
eight7-Mar-05 17:45 
QuestionMDI CScrollView? Pin
murali_utr7-Mar-05 16:57
murali_utr7-Mar-05 16:57 
GeneralProblem of Getting image from a window Pin
kokehqyu7-Mar-05 16:05
kokehqyu7-Mar-05 16:05 
GeneralRe: Problem of Getting image from a window Pin
Christian Graus7-Mar-05 17:11
protectorChristian Graus7-Mar-05 17:11 
GeneralRe: Problem of Getting image from a window Pin
kokehqyu8-Mar-05 17:41
kokehqyu8-Mar-05 17:41 
GeneralUsing msado15.dll in VC++ Application Which build DLL ! Pin
lucdt7-Mar-05 13:46
lucdt7-Mar-05 13:46 
GeneralRe: Using msado15.dll in VC++ Application Which build DLL ! Pin
Serge Krynine7-Mar-05 16:02
Serge Krynine7-Mar-05 16:02 
GeneralRe: Using msado15.dll in VC++ Application Which build DLL ! Pin
lucdt7-Mar-05 16:09
lucdt7-Mar-05 16:09 
Question"_ _cplusplus" tag error? Not VC++6 compatible? Pin
Axonn Echysttas7-Mar-05 12:08
Axonn Echysttas7-Mar-05 12:08 
Hi everybody : ). Before I begin, I must say I'm a newcommer to the world of Visual C++. Up until a few days ago I didn't know much about it, but I'm a fast learner, specially when I really have to do do something. And I really have a complex task that I need to accomplish. It's related to the SysTray. I won't get into that... anyway, the toughest part is this: creating a hook on Explorer.exe to monitor the messages it sends to the Systray's window.

What I need to make is a DLL to call from my VB application. I know how to do all that but here comes the problem. I have this VC++ DLL tutorial for a system-wide keyboard hook and I wanted to adapt this to VB.... Unfortunately, I didn't even get to adapting. Why? Because I got some compilation error that I am unable to correct. Here is the full source code of the module in cause (it's the header file of the DLL)

<br />
#define MAINHOOK_API _ _declspec(ddlexport)<br />
<br />
#define CCONV _stdcall<br />
#define NOMANGLE<br />
<br />
#define WH_KEYBOARD 2<br />
#define HC_ACTION 0<br />
<br />
typedef struct tagKBDLLHOOKSTRUCT {<br />
	DWORD vkCode;<br />
	DWORD scanCode;<br />
	DWORD flags;<br />
	DWORD time;<br />
	DWORD dwExtraInfo;<br />
} KBDLLHOOKSTRUCT, FAR *LPKBDLLHOOKSTRUCT, *PKBDLLHOOKSTRUCT;<br />
<br />
LRESULT CALLBACK KeyboardFunc (int nCode, WPARAM wParam, LPARAM lParam );<br />
<br />
#ifdef _ _cplusplus<br />
extern "C" {<br />
#endif<br />
  MAINHOOK_API int InstallFilterDLL(void);<br />
  MAINHOOK_API int UnInstallFilterDLL(void);<br />
#ifdef _ _cplusplus<br />
}<br />
#endif<br />
<br />


Of course you already saw probably what is the problem. Yeah, I know. Those "_ _cplusplus" tags. I don't know what they mean but my VC++6 doesn't seem to "know" them. In the book from where I took this code there wasn't any mention about "what kind" of C++ is this. The basic is that it doesn't compile. Here are the errors:

warning C4067: unexpected tokens following preprocessor directive - expected a newline
error C2485: 'ddlexport' : unrecognized extended attribute
error C2144: syntax error : missing ';' before type 'int'
error C2501: '_' : missing storage-class or type specifiers
fatal error C1004: unexpected end of file found"



So? Anybody has any idea what I'm up against? : ). Thanks a lot for all the time you guys spend helping people such as myself : ). If I *EVER* get good enough, I promise I'll return the favor. And I'm a man of my word. But for now, I really need help with this...

P.S. It's for a good cause... I`m developing a freeware Application that most of you will probably like... if it's ever gonna be completed.

-= E C H Y S T T A S =-
The Greater Mind Balance
AnswerRe: &quot;_ _cplusplus&quot; tag error? Not VC++6 compatible? Pin
Blake Miller7-Mar-05 12:30
Blake Miller7-Mar-05 12:30 
GeneralRe: &quot;_ _cplusplus&quot; tag error? Not VC++6 compatible? Pin
Axonn Echysttas7-Mar-05 20:51
Axonn Echysttas7-Mar-05 20:51 
GeneralRe: &quot;_ _cplusplus&quot; tag error? Not VC++6 compatible? Pin
Axonn Echysttas7-Mar-05 21:19
Axonn Echysttas7-Mar-05 21:19 
GeneralRe: &quot;_ _cplusplus&quot; tag error? Not VC++6 compatible? Pin
ThatsAlok7-Mar-05 22:39
ThatsAlok7-Mar-05 22:39 
GeneralRe: &quot;_ _cplusplus&quot; tag error? Not VC++6 compatible? Pin
Anonymous7-Mar-05 23:21
Anonymous7-Mar-05 23:21 
GeneralRe: &quot;_ _cplusplus&quot; tag error? Not VC++6 compatible? Pin
ThatsAlok7-Mar-05 23:37
ThatsAlok7-Mar-05 23:37 
GeneralRe: &quot;_ _cplusplus&quot; tag error? Not VC++6 compatible? Pin
Axonn Echysttas8-Mar-05 3:37
Axonn Echysttas8-Mar-05 3:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.