473,385 Members | 1,942 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Basic question ASP.net webservice written in c++

I'm creating a ASP.net webservice written in c++, so I'm posting my
question on both the aspnet and vc newsgroups. I hope somebody can help
me...
What I want to do seems basic c++ to me...

I create a template ASP.net webservice.
In the helloworld function, I create an instance of a wrapperclass (wich
wraps unmanaged C++), and call a function upon it, like this:

String __gc* JagaWebserviceClass::HelloWorld()
{
ManagedWrapperClass *mw;
return mw->function();
}

I include Managedwrapper.h wich contains the following:

#include "stdafx.h"
#pragma once
#include "Interface.h"
#pragma managed

__gc class ManagedWrapperClass{
private:
Interface * i;
public:
ManagedWrapperClass() {i = new Interface;}
~ManagedWrapperClass() {delete i;}
const char* function() {return i->testfunction();}
};

In interface.h, I define my class interface:

#include "stdafx.h"
class Interface{
public:
Interface() {}
~Interface() {}
char* testfunction();
};

I create (like I always do in c++) an .cpp file, with the implementation
of my testfunction
interface.cpp:

#include "stdafx.h"
#include "Interface.h"
char* Interface::testfunction()
{
return "test";
}

But this does not work. When I put the implementation of testfunction
inline in my header file. It works perfect.

Why is this?

I can't put all my implementations is my .h because in the next step, I
will include an old project, and rewriting it is not an option...

Please help?
thx,

Kristof
Nov 17 '05 #1
0 899

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: MA | last post by:
Hi all! I know there is other newsgroups for webservices, but I donīt get any answers on those. I have developed a webservice that writeing and reading files in different folders. Question...
11
by: Andy | last post by:
Make the story short, I have a VB.NET client interface calling .NET webservice, written in VB.NET as well. I am trying to make the client as thin as possible so I let the webservice part to...
3
by: Old Man | last post by:
using c# in a windows application. I am developing a webservice to run on our extranet SSL server. The company policy is that this server log everybody in. I am going to use the WSE security,...
0
by: Det | last post by:
Hi there I am somewhat stuck with calling a WebService from out of a VB App. My Goal: - Get a WebService invoked under MS - Access 2002, not using the MS-SOAP-Toolkit but the .net - Framework ...
1
by: Vincenzo Milazzo | last post by:
Ciao, come faccio a chiamare un webservice scritto in c# da una pagina asp in vbscript ? Ciao a tutti
5
by: jb | last post by:
*Please* help --- I'm tearing my hair out. I want to use sessionstate in a webservice, accessed from a client, written in script (JScript, InfoPath). I have written my webservice (C# .NET). I...
5
by: AliR | last post by:
Hi Everyone, I have a Visual C++ MFC program, and I am trying to use a webservice written in C#. When I add the webservice to my project using Add Web Reference the sproxy compiler complains...
6
by: fiziwig | last post by:
Hi, I've written my first attempt at basic authentication and it doesn't work. I thought I understood the specs, but I must be missing something obvious. Can anyone give me a hint as to what...
1
by: Felix | last post by:
Hi Fellows, following problem: I have written a class library in vb.net an enabled it for com interop. A class within the library calls the FileNet Content Engine Webservice. That is a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.