当前位置:首页 > 网络编程 > WEB编程 > ASP.net > webservice系列教学(10)-如何调用webservice(vc1)

webservice系列教学(10)-如何调用webservice(vc1)

点击次数:20 次 发布日期:2008-11-27 00:34:16 作者:源代码网
源代码网推荐 4.10使用vc调用
需下载msSoapToolkit20.exe
    引用
#import "msxml3.dll"
using namespace MSXML2;
#import "C:Program FilesCommon FilesMSSoapBinariesmssoap1.dll" exclude("IStream", "ISequentialStream", "_LARGE_INTEGER", "_ULARGE_INTEGER", "tagSTATSTG", "_FILETIME") raw_interfaces_only
using namespace MSSOAPLib;
例程:
新建工程㠍FC AppWizard(exe)[ Mclient]㠳tep1㠥🺦𜬥﹨ॅ𖤻𖩻𘨮䥀𜥍𓥏"R>修改源文件:
< StdAfx.h>
// stdafx.h : include file for standard system include files,
//  or project specific include files that are used frequently, but
//      are changed infrequently
//

#if !defined(AFX_STDAFX_H__045CD307_9518_4AF1_8CE3_8FFE38D1ACB2__INCLUDED_)
#define AFX_STDAFX_H__045CD307_9518_4AF1_8CE3_8FFE38D1ACB2__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#define VC_EXTRALEAN        // Exclude rarely-used stuff from Windows headers

#include <afxwin.h>         // MFC core and standard components
#include <afxext.h>         // MFC extensions
#include <afxdisp.h>        // MFC Automation classes
#include <afxdtctl.h>       // MFC support for Internet Explorer 4 Common Controls
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h>         // MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT



#import "msxml3.dll"
using namespace MSXML2;

#import "C:Program FilesCommon FilesMSSoapBinariesmssoap1.dll" exclude("IStream", "ISequentialStream", "_LARGE_INTEGER", "_ULARGE_INTEGER", "tagSTATSTG", "_FILETIME") raw_interfaces_only
using namespace MSSOAPLib;


#define MSG(message)
{
    ::MessageBox(NULL,_T(message),NULL,MB_OK | MB_ICONEXCLAMATION| MB_APPLMODAL);
    goto cleanup;
}


#define CHECK_HRESULT(hr, message)
if (FAILED(hr))
{
    MSG(message);
}


//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_STDAFX_H__045CD307_9518_4AF1_8CE3_8FFE38D1ACB2__INCLUDED_)
<MClient.h>
// MClient.h : main header file for the MCLIENT application
//

#if !defined(AFX_MCLIENT_H__9A397DA6_5A62_4AEF_BE5E_6C7629322ECC__INCLUDED_)
#define AFX_MCLIENT_H__9A397DA6_5A62_4AEF_BE5E_6C7629322ECC__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#ifndef __AFXWIN_H__
    #error include "stdafx.h" before including this file for PCH
#endif

#include "resource.h"       // main symbols

/////////////////////////////////////////////////////////////////////////////
// CMClientApp:
// See MClient.cpp for the implementation of this class
//

class CMClientApp : public CWinApp
{
public:
    CMClientApp();

// Overrides
    // ClassWizard generated virtual function overrides
    //{{AFX_VIRTUAL(CMClientApp)
    public:
    virtual BOOL InitInstance();
    /
源代码网供稿.
网友评论 (0)
会员中心
网络编程
本站推荐
网络编程之精华