php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21024 calling a VT_ARRAY syntax unknown or error
Submitted: 2002-12-15 03:05 UTC Modified: 2003-01-15 15:25 UTC
Votes:1
Avg. Score:1.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: nelles at epost dot de Assigned:
Status: No Feedback Package: COM related
PHP Version: 4.2.3 OS: win 2000
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: nelles at epost dot de
New email:
PHP Version: OS:

 

 [2002-12-15 03:05 UTC] nelles at epost dot de
hi,

when I call IE as COM and open PrintPreview and set Header/Footer, i use ExecWB(). The third parameter is VT_ARRAY. How shall create this VT_ARRAY. Every syntax with VT_ARRAY fails. Or is this a two dimensional SAFEARRAY??
Tanks guenter

	print "start";
	$ie = new COM("InternetExplorer.Application");
	$ie->Visible=true;
	$ie->Navigate("www.php.net");
	while ($ie->Busy) sleep(1);
/*
Microsofts msdn says:
If pvaIn (third parameter) is a VARIANT of type VT_ARRAY, pvaIn specifies a SAFEARRAY containing (in the following order) a
header BSTR, a
footer BSTR, the
address of an IStream pointer for a Microsoft? Outlook? Express header document, an
alternate URL BSTR used for MSHTML in Outlook Express, and a
DWORD containing flags.
*/

	$aArray[0]= "header";
	$aArray[1]= "footer";
	$aArray[2]= null;
	$aArray[3]= "";
	$aArray[4]= 1|2;

	$aVariantArray=new Variant ($aArray,VT_ARRAY|VT_BYREF);

	$ie->ExecWB(7,2,$aVariantArray,null);

	print "stop";
?>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-12-24 05:51 UTC] phanto@php.net
can you point me to the headerfile describing the command ids (first parameter). acording to msdn they are defined in mshtmcid.h, but in my version of the file IDM_PRINTPREVIEW is 2003 and IDM_PRINT is 27 though 7 opens the print preview for me.

next msdn only describes the pvaIn that way for IDM_PRINT, for IDM_PRINTPREVIEW i only found

"pvaIn VARIANT of type VT_BSTR that specifies the path to a custom template. May be set to NULL to use the Microsoft? Internet Explorer default print template."

maybe i'm searching at the wrong place, i'd appreciate a few further hints.

harald
 [2003-01-15 15:25 UTC] phanto@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Wed Jun 26 07:01:25 2019 UTC