C# DLL in C++, help please

hi, i having some problem here. I have a DLL written in C# but I need to re-write it in C++ using visual studio 2005. I have no C++ knowledge..o.O so could some one help guide me? help translate my code..should i use new project > 'Class Library' project or 'Win32 Console -> DLL' project? What .h file used for? and where should I put the __declspec(dllexport)? I need to function to be exported so that my 3rd party system could read it. million thanks!

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Web.Services3.Security.Tokens;
using Microsoft.Web.Services3.Security;
using Microsoft.Web.Services3;
using System.Web.Services;
using System.Web.Services.Protocols;

namespace ClassLibrarySetupProcess
{
    public class Class1
    {
        public string callSetup(string msisdn, string contractid, string customerid, string accountind, string customercode)
        {
            DateTime dt = DateTime.Now;

            string datestr = String.Format("{0:yyMMddHHmmss}", dt);

           SetupService.SetupServiceService x = new  SetupService.SetupServiceService();
            SoapContext mycon = x.RequestSoapContext;
            UsernameToken tok = new UsernameToken("MGR1", "mg01Ch", PasswordOption.SendHashed);

            mycon.Security.Tokens.Add(tok);
            x.Dispose();

            SetupService.SetupServiceRequest mpInput = new SetupService.SetupServiceRequest();
            mpInput .ReferenceID = datestr + msisdn;
            mpInput .ChannelID = "CSSMBT";
            mpInput .ChannelMedia = "TTIVR";
            mpInput .TicklerIndicator = "2";
            mpInput .MSISDN = msisdn;
            mpInput .ContractID = contractid;
            mpInput .CustomerID = customerid;
            mpInput .CustomerCode = customercode;
            mpInput .AccountIndicator = accountind;
            mpInput .TicklerCode = "MBTFTP";
            mpInput .TicklerStatus = "NOTE";
            mpInput .TicklerShortDesc = "CLOVA VIA IVR";
            mpInput .TicklerLongDesc = "Temporary Unavailable";
            mpInput .TicklerPriority = "5";



            SetupService.SetupServiceResponse wseOutput = x.SetupService(wseInput);

            return mpInput.TransactionID + "|" + mpInput.ReferenceID + "|" + mpInput.ResultStatus.StatusCode + "|" + mpInput.ResultStatus.ErrorCode + "|" + mpInput.ResultStatus.ErrorDescription;


        }
    }
}
Last edited on
Topic archived. No new replies allowed.