C++调用C#的dll,dll的配置文件如何用
利用C#生成的dll用来访问soap服务器,里面有配置文件.
C++程序需要调用这个dll,但是这个配置文件如何使用?单独调用dll,访问soap服务器不成功.
C#中的配置文件app.config
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<services>
<service behaviorConfiguration="serviceBehavior" name="Staubli.Wcf.DebugService.DebugService">
<endpoint address="" binding="basicHttpBinding" contract="Staubli.Wcf.DebugService.IDebugService" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:5656" />
</baseAddresses>
<timeouts closeTimeout="00:00:01" />
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="serviceBehavior">
<serviceMetadata httpGetEnabled="false" httpGetUrl="" />
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<basicHttpBinding>
<binding name="CS8ServerV0BindingConfig"
closeTimeout="00:00:10" openTimeout="00:00:10" receiveTimeout="00:10:00" sendTimeout="00:00:10"
bypassProxyOnLocal="true" useDefaultWebProxy="false"
maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
allowCookies="false" hostNameComparisonMode="StrongWildcard">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None" realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
<customBinding>
<binding name="MtomBindingConfig">
<mtomMessageEncoding maxReadPoolSize="64" maxWritePoolSize="16" messageVersion="Soap12" />
<httpTransport maxBufferPoolSize="52428800"
bypassProxyOnLocal="true" useDefaultWebProxy="false"
maxReceivedMessageSize="6553600" allowCookies="false" authenticationScheme="Anonymous"
keepAliveEnabled="true" maxBufferSize="6553600" proxyAuthenticationScheme="Anonymous"
transferMode="Buffered" unsafeConnectionNtlmAuthentication="false" />
</binding>
</customBinding>
</bindings>
<client>
<endpoint contract="CS8ServerV0PortType" name="CS8ServerV0"
binding="basicHttpBinding" bindingConfiguration="CS8ServerV0BindingConfig" />
<endpoint contract="ServerV1.CS8ServerV1PortType" name="CS8ServerV1"
binding="customBinding" bindingConfiguration="MtomBindingConfig" />
<endpoint contract="CS8ServerV2PortType" name="CS8ServerV2"
binding="customBinding" bindingConfiguration="MtomBindingConfig" />
<endpoint contract="CS8ServerV3PortType" name="CS8ServerV3"
binding="customBinding" bindingConfiguration="MtomBindingConfig" />
</client>
</system.serviceModel>
</configuration>