I'm trying to make a WIN32 dll but I doesn't compile right somehow. For example:

Code:
__declspec(dllexport) int testfun(int x)
{
	return x+1;
}
It compiles ok, but when i try to use testfun() from another program I get an error saying that that function doesn't exist in dll. I opened mydll.dll in DLL Viewer and it showed that that
function exists and is called "?testfun@@YAHH@Z". So, I tried using ?testfun@@YAHH@Z() in my program and it works! But how can I make a dll that has a correct function name? I'm using Visual Studio .NET 2003.