How to properly declare this function inside this header file?
CString ExecuteExternalProgram(CString pictureName);
#pragma warning( disable: 4049 ) /* more than 64k source lines */
#ifndef __REQUIRED_RPCNDR_H_VERSION__
#define __REQUIRED_RPCNDR_H_VERSION__ 475
#endif
#include "rpc.h"
#include "rpcndr.h"
CString ExecuteExternalProgram(CString pictureName); //<---- THIS LINE IS ERROR?
#ifndef __RPCNDR_H_VERSION__
#error this stub requires an updated version of <rpcndr.h>
#endif // __RPCNDR_H_VERSION__
#ifndef __Example1_h__
#define __Example1_h__
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
#pragma once
#endif
/* Forward Declarations */
#ifdef __cplusplus
extern "C"{
#endif
#ifndef __Example1_INTERFACE_DEFINED__
#define __Example1_INTERFACE_DEFINED__
void Output(
/* [string][in] */ const char *szOutput);
extern handle_t hExample1Binding;
extern RPC_IF_HANDLE Example1_v1_0_c_ifspec;
extern RPC_开发者_运维问答IF_HANDLE Example1_v1_0_s_ifspec;
#endif /* __Example1_INTERFACE_DEFINED__ */
#ifdef __cplusplus
}
#endif
#endif
I created an Empty Project in Visual Studio and I didn't have any problem compiling:
#include <atlstr.h>
#include "Example1.h" // Direct copy of your code from above
int main(int argc, char **argv) {
return 0;
}
I was tipped off about atlstr.h from http://www.codeguru.com/forum/showthread.php?t=231164.
Is that what you mean by "properly" declare?
精彩评论