在头文件中声明 CString 函数
如何在这个头文件中正确声明这个函数?
CString ExecuteExternalProgram(CString 图片名称);
#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
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在 Visual Studio 中创建了一个空项目,编译时没有遇到任何问题:
我从 http://www.codeguru.com/forum/showthread.php?t=231164。
这就是你所说的“正确”声明的意思吗?
I created an Empty Project in Visual Studio and I didn't have any problem compiling:
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?