• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2230
  • Last Modified:

Why won't the rpcdce.h file compile in a Win32 Aplication?

I've been trying to compile the rpcdce.h in a Win32 Application and i've been getting this error:
c:\program files\microsoft visual studio\vc98\include\rpcdce.h(30) : error C2146: syntax error : missing ';' before identifier 'RPC_BINDING_HANDLE'
c:\program files\microsoft visual studio\vc98\include\rpcdce.h(30) : fatal error C1004: unexpected end of file found

I know that rpcdce.h compiles in a MFC Dialog based app but I need to create an application with an invisible window.

I would really appreciate some suggestions.
Charles
0
CharlesCarleton
Asked:
CharlesCarleton
1 Solution
 
Jaime OlivaresSoftware ArchitectCommented:
It works for me.
First of all, in your program file (.cpp) put the #include "rpcdce.h" before #include "stdafx.h"
0
 
drichardsCommented:
You need to do:

    #include <rpc.h>
    #include <rpcdce.h>

to make it work.

And stdafx.h should be included first by convention if you are using precompiled headers.
0
 
vijay_visanaCommented:
This error may come duet to error in header file included just before rpcdce.h there if you forget to put ; then it may be causing problem check your header and cpp files to see is there any character (you may have typed it unintentionally).
0
 
vijay_visanaCommented:
You can also do one more check project setting define /p compiler option to send preprocessor to .i file after compiling check this file for RPC_BINDING_HANDLE and line before that
0
 
CharlesCarletonAuthor Commented:
Thanks guys for your help! I was getting frustrated with this problem.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now