error C4430 when converting to VC 2005

Hi all,
I'm converting an older project from VC 6 to VC 2005 and I have C4430 error.

I have this code in .idl in a common project:

interface IBtiError : IDispatch
{
blah blah blah...
};
[
object,
uuid(68A39EB4-609A-11D3-8946-0008C78440DA),
helpstring("IBtiErrors Interface"),
pointer_default(unique)
]
interface IBtiErrors : IDispatch
{
blah blah blah...
};

[
uuid(68A39EA3-609A-11D3-8946-0008C78440DA),
version(1.0),
helpstring("BtiError 1.0 Type Library")
]
library BTIERRORLib
{
importlib("stdole32.tlb");
importlib("stdole2.tlb");

blah blah blah...
[
uuid(68A39EB3-609A-11D3-8946-0008C78440DA),
helpstring("BtiError Class")
]
coclass BtiError
{
[default] interface IBtiError;
};
[
uuid(68A39EB5-609A-11D3-8946-0008C78440DA),
helpstring("BtiErrors Class")
]
coclass BtiErrors
{
[default] interface IBtiErrors;
};

In StdAfx.h in my project, I have this:
using namespace BTIERRORLib;

In .h file in my project, I have these 2 inline functions:

CComPtr<BTIERRORLib::IBtiErrors> m_pErrors;
inline SetErrors(BTIERRORLib::IBtiErrors* pErrors) { m_pErrors = pErrors; }
inline SetSecurity(BtiSecurity::IBtiSecurity* pSecurity) { if (m_pSecurity != NULL) m_pSecurity = pSecurity; }

It compiled and worked in the VC 6 project, but in VC 2005, I got:
15 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\homeworkcode\src\common-vc\btiado.h 47

I know I can use #pragma warning(disable:4430) to turn the error off, but I would like to fix it properly without using #pragma. Can you please help?
Greatly appreciate your help.
[1919 byte] By [Thao] at [2007-11-20 8:16:30]
# 1 Re: error C4430 when converting to VC 2005
CComPtr<BTIERRORLib::IBtiErrors> m_pErrors;
inline SetErrors(BTIERRORLib::IBtiErrors* pErrors) { m_pErrors = pErrors; }
inline SetSecurity(BtiSecurity::IBtiSecurity* pSecurity) { if (m_pSecurity != NULL) m_pSecurity = pSecurity; }
Should probably be:
CComPtr<BTIERRORLib::IBtiErrors> m_pErrors;
inline void SetErrors(BTIERRORLib::IBtiErrors* pErrors) { m_pErrors = pErrors; }
inline void SetSecurity(BtiSecurity::IBtiSecurity* pSecurity) { if (m_pSecurity != NULL) m_pSecurity = pSecurity; }
(Note the 'void' return types)

Viggy
MrViggy at 2007-11-10 22:31:32 >
# 2 Re: error C4430 when converting to VC 2005
SetErrors and SetSecutiry don't have a return type. Earlier compilers would default it to int return type and proceed. VS 2005 is stricter. If you don't return anything from a function, simply specify the return as void instead of leaving it blank
kirants at 2007-11-10 22:32:26 >