Posting Files to the Web

.

The WebPost API allows applications to easily post Web pages (files) to any Internet Web site. The WebPost functions can be used to connect to an Internet Service Provider (ISP), determine the protocol needed to copy the files, and much more. These functions can display wizards to guide the users throughout the process.

This API is easy to implement and powerful.

In this code sample I just called "wpPost" function and pass the Window handle to tell the wizard which window it should return the focus after it completes its job. Then I pass NULL as value to all the other parameters in this function except the last parameter which is the FLAGS. We can give any of the four given flags

 

Value Meaning
WPF_FIRST_FILE_AS_DEFAULT If this flag is set then take the first file specified in the lppszLocalPaths list as the file that will be shown as the default page.
WPF_MINIMAL_UI Skip the wizard pages where the input has been given. if lpszsitename is given then the wizard will not show the page for choosing the site name
WPF_NO_RECURSIVE_POST Do not post the files recursively if lppszLocalPaths array points to a directory.
WPF_NO_WIZARD Do not display the wizard. This is relevant only if lpszSiteName has been created before.

or just give 0 as the value. In this sample code I just gave 0 as the value to this parameter. Here I stop my blah blah and lets look at the code.

LONG CPostView::Post( )
{
	LONG lRet; //return value

	lRet = WpPost( GetSafeHwnd(),	// Handle to the Window
		NULL, 			// Number of files to be posted, can be null
		NULL, 			// Files List, can be null
		NULL, 			// Site Name Count, can be null
		NULL, 			// Site Name, can be null
		NULL, 			// URL Count, can be null
		NULL, 			// URL Name, can be null
		0 
	); // Flags

	return lRet;
}

This Post() function internally calls WpPost function. Since all the parameters are given NULL WpPost function calls the wizard to post the files to the web. That's it folks. I will update this article soon with more features. If you have better idea or if you find any bugs in this article let me know.

Updated on May 23 1998



Comments

  • Mike Pliam

    Posted by Mike Pliam on 06/01/2004 06:09pm

    Please send me a copy of the source code if you would be so kind. Thanks. Mike mailto:michaelpliam@dochs.org

    Reply
  • Very Intresting!!!

    Posted by Legacy on 07/15/2003 12:00am

    Originally posted by: SunilNayak

    Very good example for posting the files to the webserver
    
    can u plz send me the source code and little more explanation....

    sunil

    Reply
  • Can i get a source copy to?

    Posted by Legacy on 01/10/2003 12:00am

    Originally posted by: Platenkamp

    Can i get a source copy to?

    plz e-mail it platenkamp@home.nl

    Reply
  • can i get the code?

    Posted by Legacy on 11/04/2002 12:00am

    Originally posted by: satan468

    I am very interested in it,can you send me the soure?
    satan468@msn.com

    Reply
  • can you send me your code

    Posted by Legacy on 11/01/2002 12:00am

    Originally posted by: nbt

    i am very interested in this topic, so can i get your source code?
    

    Reply
  • Can I get a copy of working source code for this.

    Posted by Legacy on 06/13/2001 12:00am

    Originally posted by: HAMMER

    Can I get a copy of working source code for this.

    Reply
  • I need help to transfer files without ftp

    Posted by Legacy on 02/20/2001 12:00am

    Originally posted by: Mohsin Ali

    I really need help to transfer files across the internet without using ftp help. instead i want to use http service. how it is possible?

    • Question about Time And Date

      Posted by ajitlokpriya on 11/03/2009 02:25am

      hi, can any one tell me how we take google date and time in textbox in asp.net?.If any one know pl send me code in my id ajitlokpriya@gmail.com

      Reply
    Reply
  • Sample code

    Posted by Legacy on 02/02/2001 12:00am

    Originally posted by: Deepika Nair

    Can I get the code for posting files?
    
    I need the actual working of WpPost...

    Reply
  • Source Code ?

    Posted by Legacy on 12/02/2000 12:00am

    Originally posted by: Anuj Garg

    Where is your source code to check this.
    Please send me source code, this is very urgent.

    Reply
  • how can i get the sample source

    Posted by Legacy on 05/28/2000 12:00am

    Originally posted by: charli park

    please give me
    are you all right?
    thank you ^_^

    Reply
  • Loading, Please Wait ...

Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Packaged application development teams frequently operate with limited testing environments due to time and labor constraints. By virtualizing the entire application stack, packaged application development teams can deliver business results faster, at higher quality, and with lower risk.

  • With 81% of employees using their phones at work, companies have stopped asking: "Is corporate data leaking from personal devices?" and started asking: "How do we effectively prevent corporate data from leaking from personal devices?" The answer has not been simple. ZixOne raises the bar on BYOD security by not allowing email data to reside on the device. In addition, Zix allows employees to maintain complete control of their personal device, therefore satisfying privacy demands of valued employees and the …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds