Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VC++ or VB to VFP Code
Message
From
15/12/2005 19:44:13
 
 
To
15/12/2005 17:25:47
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01078483
Message ID:
01078521
Views:
14
Hello Tracy,

VB code:
"'Create a list of documents to Merge  
 Dim DocList() As String  
 ReDim DocList(0 To 1)  
 DocList(0) = InputFile1  
 DocList(1) = InputFile2  
 ' Load Documents to merge  
 gtPDFDocumentX1.MergeDocs (DocList)  
 ' Save the Document  
 gtPDFDocumentX1.SaveToFile (OutputFile)  
 ' Free the List  
 ReDim DocList(0)"
FoxPro code:
LOCAL doclist[2]
doclist[1] = FULLPATH("somefile.pdf")
doclist[2] = FULLPATH("somefile2.pdf")
&& the array is zero based
COMARRAY(gtPDFDocumentX1,0) && you may also try 10, but 0 should do it 
gtPDFDocumentX1.MergeDocs(@doclist)
...
additionally forget about hacking with strings - this will definitly not work, cause FoxPro's COM marshaling code (the code that tranlates parameter's from the binary representation in FoxPro to the representation that is used by COM parameters) is fixed and you cannot get around it like with a normal C DLL where you can DECLARE function parameters yourself and 'fake' types by building string variables with the correct binary representation.
If a COM parameter type is not supported natively by FoxPro you're lost, and the only way to overcome such situations is to write an intermediate wrapper COM object or function in a language where you have more low level control like in C++.
Drifting away from the problem a bit ... i'm pretty sure that it'll work with COMARRAY.

Regards
Christian
Previous
Reply
Map
View

Click here to load this message in the networking platform