A
andy6 via DotNetMonster.com
I took a c++ 6.0 project and converted it to c++ .net 2005 project. I want to
make a web service out of it. One of the new files I created was a cpp where
I have the webmethod pointing to a function in the previously 6.0 code and I
get the error noted below. What I don't understand is since I created this
cpp as a new file in .net and inherited from a .net base class then why would
I get this error? Both the class and base class to me should be managed.
Below is the code, can you help me resolve the error?
error C3625: 'HCFAWebService::HCFAWebServiceEntryPoint': an unmanaged type
cannot derive from a managed type 'System::Web::Services::WebService' - line
12
HCFAWebServiceEntryPoint.h
============================
#using <System.Web.Services.dll>
#using <System.dll>
using namespace System;
using namespace System::Web;
using namespace System::Web::Services;
namespace HCFAWebService
{
public class HCFAWebServiceEntryPoint : public WebService
{ // Visual Studio points to line 12 as being here
public:
[System::Web::Services::WebMethod]
int CallHCFA( int editno, LPSTR inbuf, LPSTR inSV, LPSTR inDB, LPSTR
inUI, LPSTR inPW, LPSTR inPCA, LPSTR inDSN, LPSTR inFl);
};
}
// HCFAWebServiceEntryPoint.cpp : main project file.
//
#include "stdafx.h"
#include "HCFAWebServiceEntryPoint.h"
#include "Ecghcfa.h"
#include "Global.asax.h"
namespace HCFAWebService
{
int CallHCFA(int a, LPSTR b, LPSTR c, LPSTR d, LPSTR e, LPSTR f, LPSTR g,
LPSTR h, LPSTR k)
{
CEcghcfaApp *pValidateClaim = new CEcghcfaApp();
int ab = pValidateClaim->ValidateClaim(a,b,c,d,e,f,g,h,k);
delete pValidateClaim;
return ab;
}
}
make a web service out of it. One of the new files I created was a cpp where
I have the webmethod pointing to a function in the previously 6.0 code and I
get the error noted below. What I don't understand is since I created this
cpp as a new file in .net and inherited from a .net base class then why would
I get this error? Both the class and base class to me should be managed.
Below is the code, can you help me resolve the error?
error C3625: 'HCFAWebService::HCFAWebServiceEntryPoint': an unmanaged type
cannot derive from a managed type 'System::Web::Services::WebService' - line
12
HCFAWebServiceEntryPoint.h
============================
#using <System.Web.Services.dll>
#using <System.dll>
using namespace System;
using namespace System::Web;
using namespace System::Web::Services;
namespace HCFAWebService
{
public class HCFAWebServiceEntryPoint : public WebService
{ // Visual Studio points to line 12 as being here
public:
[System::Web::Services::WebMethod]
int CallHCFA( int editno, LPSTR inbuf, LPSTR inSV, LPSTR inDB, LPSTR
inUI, LPSTR inPW, LPSTR inPCA, LPSTR inDSN, LPSTR inFl);
};
}
// HCFAWebServiceEntryPoint.cpp : main project file.
//
#include "stdafx.h"
#include "HCFAWebServiceEntryPoint.h"
#include "Ecghcfa.h"
#include "Global.asax.h"
namespace HCFAWebService
{
int CallHCFA(int a, LPSTR b, LPSTR c, LPSTR d, LPSTR e, LPSTR f, LPSTR g,
LPSTR h, LPSTR k)
{
CEcghcfaApp *pValidateClaim = new CEcghcfaApp();
int ab = pValidateClaim->ValidateClaim(a,b,c,d,e,f,g,h,k);
delete pValidateClaim;
return ab;
}
}