• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2188
  • 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 OlivaresCommented:
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

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

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