473,804 Members | 3,067 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

A questinon about how to use WinHttp.dll

The problem is about the new version of the WinHttp.dll.
My Code like this :

public string Do(string Method,string Url,Object Async)
{
WinHttpRequest winHttpReq = new
WinHttp.WinHttp RequestClass();

winHttpReq.OnRe sponseStart += new
IWinHttpRequest Events_OnRespon seStartEventHan dler(winHttpReq _OnResponseStar t);
winHttpReq.OnRe sponseFinished += new
IWinHttpRequest Events_OnRespon seFinishedEvent Handler(winHttp Req_OnResponseF inished);

try
{
winHttpReq.Open (Method, Url, Async);
}
catch (Exception)
{
throw;
}

winHttpReq.Send (null);

return winHttpReq.Resp onseText;
}

void winHttpReq_OnRe sponseFinished( )
{
// to do sth
}

void winHttpReq_OnRe sponseStart(int Status, string
ContentType)
{
// to do sth
}

The problem can build and run ,but the two events of the
WinHttpRequestC lass can not run anytime. But it's very important to
me . Help!
Thanks a lot !

Jun 27 '07 #1
1 1729
"flyingchen " <fl********@gma il.comwrote in message
news:11******** **************@ x35g2000prf.goo glegroups.com.. .

There's a problem with your newsreader, which is causing it to repeat your
posts...
--
http://www.markrae.net

Jun 27 '07 #2

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

Similar topics

2
2316
by: yukeshean | last post by:
hi, I'm helping a company to develop a merchant site for online transaction. Since the company already registered with Telemoney payment gateway to handle the credit card verification, therefore my asp pages will need be devloped to talk to the telemoney server in order to pass and receive data like credit card no, transacted amount etc. Initially i thought that applying asp form method will be fine to submit data over to their server,...
1
2425
by: yukeshean | last post by:
how to use winhttp with asp to talk to Telemoney payment gateway server? how to use winhttp to make few communication link with telemoney and the links involve more than 1 asp page?
0
2608
by: thueirby | last post by:
h when i try to get data from site with clients sertificates with winHttp, I have a problem with result encoding (ru). Its OK with any sites without client sertificates, and its OK when i try to do it manualy with IE any help would be really great script looks like that Set oHttp = CreateObject("WinHttp.WinHttpRequest.5") oHttp.Option(2) = "Windows-1251" ' WinHttpRequestOption_URLCodePage = 2
0
3452
by: Bryce | last post by:
H I am using WinHTTP to hit a server. I need to provide Proxy credentials to navigate through a proxy server, as well as Server credentials to access the server I have called the SetCredentials method twice, once for the proxy user/pass and once for the server user/pass, but I am always returned with a 407 Dim oHTTP As New WinHttp.WinHttpReques oHTTP.Open "GET", "http://server/default.asp", Fals oHTTP.SetProxy 2, "192.168.1.105:8080...
1
20117
by: Francis | last post by:
I have the following codes in an asp file. This page can receive the XML string send from client. ================================================== Dim objReceive Set objReceive = Server.CreateObject("Microsoft.XMLDOM") objReceive.async=false On Error Resume Next objReceive.load(Request)
0
1237
by: Vijay | last post by:
Hi, I am trying to use Winhttp for making a SOAP request from a client to a Server, windows 2003. I have 2 issues: 1. I am making a Winhttp, HTTP request and I keep getting this error, Authentication failed, http code 401. I am passing the credentials as Base64 conversion. I do not know why I am getting this error. 2. If SSL is enabled on my server, then there is a procedure to go through,
1
1873
by: saravana kumar | last post by:
Hai , I am new to winHTTP. Can anyone point me out a good website to find few startup samples and details about winHTTP. Please help me out to start winHTTP. :confused: Any help appreciated. Saravana Kumar
1
2292
by: Gaetan | last post by:
I'm doing a prrof of concept to develop an application to run under WinPE. The application will use WinHTTP to send requests to an ASPX file running IIS 6.0 My problem is that I do not know how to prevent IIS from returning the HTTP code of the ASPX page. The client side use something like this to initiate the request: set obj1 = createobject("WinHttp.WinHttpRequest.5.1") obj1.SetProxy HTTPREQUEST_PROXYSETTING_DIRECT obj1.Open "GET",...
4
2335
by: Ted Lyngmo | last post by:
Hi! I'm new (but please do continue reading) to C++ in the VS environment and wanted to create a standalone program (or preferably, a static library, compatible with other Windows compilers) that; 1. Takes an URI as an argument. 2. Prints the proxy for that URI to stdout (or in the static library case, returns the resulting string).
0
9704
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9569
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10558
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10302
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10069
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7608
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6844
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5636
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4277
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.