Wrox Programmer Forums
|
Classic ASP Components Discussions specific to components in ASP 3.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Components section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 12th, 2003, 09:31 AM
Registered User
 
Join Date: Dec 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to use IRequest::BinaryRead function

Hi!
I've developed ISAPI script for uploading the file via HTTP (from browser)
on VC++. Under the ISAPI I can upload big size file (100 MB and more) but
in case I'm tring to use my ActiveX component for ASP (developed on VC++
too) I can't do it correctly. I did not found where is the trouble. Can I
ask you to help me?

Regards,
Eugene Labunsky.

This is some peace of code.

VARIANT tmp_bin_variant;

m_piRequest->get_TotalBytes (&ip);
VARIANT ttt;
ttt.vt = VT_BYREF|VT_I4;
ttt.plVal = &ip;
m_piRequest->BinaryRead(&ttt, &tmp_bin_variant);

HANDLE save_all_bin;
DWORD result_saved_bytes;
// Try to save the bin part of the posted data
DWORD it;

save_all_bin =
CreateFile("c:"\temp"\full_ver2.dat",GENERIC_WRITE ,0,NULL,CREATE_ALWAYS,0,NU
LL);
if (save_all_bin != INVALID_HANDLE_VALUE)
{
// in case big file it does not works correctly !!! Why?...
if (!WriteFile (save_all_bin,tmp_bin_variant.byref,
ip,&result_saved_bytes,NULL))
{
// error
}
if (save_all_bin != NULL)
CloseHandle(save_all_bin);
}







Similar Threads
Thread Thread Starter Forum Replies Last Post
send variable in function to another function schoolBoy Javascript How-To 6 March 3rd, 2007 09:16 AM
How to call javascript function from VB function vinod_yadav1919 VB How-To 0 February 13th, 2006 06:03 AM
BinaryRead method -Dman100- Classic ASP Professional 1 July 25th, 2004 12:17 PM
retreive function/Line from macro or function? MikoMax J2EE 0 April 1st, 2004 04:42 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.