0
如何在這個頭文件中正確聲明這個函數?在頭文件中聲明一個CString函數
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
這是因爲我在頭文件中聲明CString時出錯。是因爲unicode嗎? – karikari 2011-05-20 00:27:00
我真的認爲你看到的錯誤是因爲CString在使用之前沒有聲明。如果您將 '#包括' 添加到您的頭文件的頂部,我不認爲您會看到任何錯誤。 –
Mat
2011-05-31 17:24:24