• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2201
  • 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.
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"
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.
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).
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
CharlesCarletonAuthor Commented:
Thanks guys for your help! I was getting frustrated with this problem.
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 your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

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