RE: passing arrays to COM objects by ref - dll

2007-10-02 Thread Dave Watts
 I've been provided a .dll with a number of procedures written 
 in VB5. The function I'm trying to access requires three 
 inputs as arrays, the last one being an empty array (with a 
 length) for it to store the results and return. The function 
 requires all of the arrays by ref. I tried just passing it 
 regular old arrays, no success.

The way I've solved similar problems in the past is to do one of the
following:

1. Rewrite the DLL to accept strings for all arguments. Yecch.
2. Write a COM wrapper that accepts strings, and invoke the COM DLL from
within your wrapper. Also, yecch. However, this is pretty easy to do, and
you can do it with Windows Script Host, so you don't even need a compiler.
You would write a WSH object with a COM interface, and invoke that from CF.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!


~|
Check out the new features and enhancements in the
latest product release - download the What's New PDF now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:289912
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: passing arrays to COM objects by ref - dll

2007-10-02 Thread P McKinnon
 I've been provided a .dll with a number of procedures written 
 in VB5. The function I'm trying to access requires three 
 inputs as arrays, the last one being an empty array (with a 
 length) for it to store the results and return. The function 
 requires all of the arrays by ref. I tried just passing it 
 regular old arrays, no success.

The way I've solved similar problems in the past is to do one of the
following:

1. Rewrite the DLL to accept strings for all arguments. Yecch.
2. Write a COM wrapper that accepts strings, and invoke the COM DLL from
within your wrapper. Also, yecch. However, this is pretty easy to do, and
you can do it with Windows Script Host, so you don't even need a compiler.
You would write a WSH object with a COM interface, and invoke that from CF.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!


Hi Dave, thanks for the suggestions. I'll have to go the 'wrapper' route since 
I can't access the guts of the .dll, it's from an agency that is nutsy-cookoo 
about protecting the code. Do you have any suggestions for resources on 
creating wrappers? 

~|
ColdFusion 8 - Build next generation apps
today, with easy PDF and Ajax features - download now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:290006
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: passing arrays to COM objects by ref - dll

2007-10-02 Thread Dave Watts
 Hi Dave, thanks for the suggestions. I'll have to go the 
 'wrapper' route since I can't access the guts of the .dll, 
 it's from an agency that is nutsy-cookoo about protecting the 
 code. Do you have any suggestions for resources on creating 
 wrappers? 

Not offhand. I'd just Google Windows Script COM.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!


~|
ColdFusion 8 - Build next generation apps
today, with easy PDF and Ajax features - download now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:290015
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Passing Arrays/ResultSet between CF and JavaBean

2002-11-21 Thread Joe Eugene
I guess there is no Answer to this Question

Well FYI.. for anybody interested..
I ran a test switching JVM's from 1.3.1 to 1.4.0 ..The peformance gain was
like 41% over 1.3.1 JVM...This is really interesting...
Anybody else ran any tests, what are your results?
If you need any help testing.. let me know.

In CFMX admin, under your JVM details.. there is a line which says..
Java JVM Name:Java HotSpot(TM) Client VM
Does anybody know what this does FOR CFMX if it does anything at all..
Anybody from MM can explain this?

Joe

PS: HotSpot is a performance JVM.. voted 2nd runner up as best JVM.. in JDJ..
BTW.. Oracle's JVM was the BEST.

On Wed, 20 Nov 2002 23:15:26 -0500 Joe Eugene [EMAIL PROTECTED] wrote:

 Anybody know how to pass a ResultSet from a
 Java Bean back
 to a ColdFusion page.. or pass an Array to Java
 Bean.. i tried a few
 things.. Not Working..
 
 Jsp is some like..
 
 
 
 Joe
 Certified Advanced ColdFusion Developer
 [EMAIL PROTECTED] 
 
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com



Re: Passing Arrays to Custom Tags

2002-03-25 Thread Sharon Diorio

You need to evaluate the array.

cf_ShoppingCart Action=GET Scope=CART Value=ALL varName=#myCart#

Sharon
- Original Message - 
From: Jared Stark [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Monday, March 25, 2002 6:07 PM
Subject: Passing Arrays to Custom Tags


 Hello all,
 My Wrox ColdFusion book says that arrays can be passed to custom tags just like any 
other variable, but I am getting errors when I try it.  I have the following:
 
 cf_ShoppingCart Action=GET Scope=CART Value=ALL VarName=myCart
 
 which returns an array of shopping cart items into a variable called 'myCart'.  I 
can run:
 
 IsArray(myCart) and it returns YES
 
 then I pass it to another custom tag:
 
 cfmodule template=addWorkingInvoice.cfm
   Cart=myCart
   CustomerID=LDH00
 
 addWorkingInvoice.cfm checks to make sure that attributes.Cart is an array, and it 
keeps failing.  Is this not the way to pass an array to a custom tag?
 
 Thanks for your help.
 
 Jared
 
 
 
__
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Passing Arrays to Custom Tags

2002-03-25 Thread Jared Stark

DOH!  Thanks :)

- Original Message -
From: Sharon Diorio [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Monday, March 25, 2002 4:15 PM
Subject: Re: Passing Arrays to Custom Tags


| You need to evaluate the array.
|
| cf_ShoppingCart Action=GET Scope=CART Value=ALL varName=#myCart#
|
| Sharon
| - Original Message -
| From: Jared Stark [EMAIL PROTECTED]
| To: CF-Talk [EMAIL PROTECTED]
| Sent: Monday, March 25, 2002 6:07 PM
| Subject: Passing Arrays to Custom Tags
|
|
|  Hello all,
|  My Wrox ColdFusion book says that arrays can be passed to custom tags
just like any other variable, but I am getting errors when I try it.  I
have the following:
| 
|  cf_ShoppingCart Action=GET Scope=CART Value=ALL VarName=myCart
| 
|  which returns an array of shopping cart items into a variable called
'myCart'.  I can run:
| 
|  IsArray(myCart) and it returns YES
| 
|  then I pass it to another custom tag:
| 
|  cfmodule template=addWorkingInvoice.cfm
|Cart=myCart
|CustomerID=LDH00
| 
|  addWorkingInvoice.cfm checks to make sure that attributes.Cart is an
array, and it keeps failing.  Is this not the way to pass an array to a
custom tag?
| 
|  Thanks for your help.
| 
|  Jared
| 
| 
| 
| 
__
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Passing Arrays

2002-02-19 Thread Raymond Camden

Your code below should work fine - you probably have an issue in your
UDF code. Can you share that?

===
Raymond Camden, Principal Spectra Compliance Engineer for Macromedia

Email: [EMAIL PROTECTED]
Yahoo IM : morpheus

My ally is the Force, and a powerful ally it is. - Yoda 

 -Original Message-
 From: Marlon Moyer [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, February 18, 2002 6:28 PM
 To: CF-Talk
 Subject: Passing Arrays
 
 
 Is there a way to pass an array to a UDF?
 
 Example:
 
 myFunction (myArray) {
 ..//
 }
 
 thisArray = ArrayNew(1);
 
 myFunction (thisArray);
 
 If I do it this way, CF complains about not being able to convert 
 complex values.
 
 Thanks
 
 Marlon
 
 
 
__
Why Share?
  Dedicated Win 2000 Server · PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Passing arrays to a popup

2001-11-25 Thread Don Vawter

in the popup window you can refer to the elements in the main window using
js by
opener.document.forms[0].elements
which is a collection of all the form fields.

- Original Message -
From: Bruce Sorge [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Sunday, November 25, 2001 9:02 PM
Subject: Passing arrays to a popup


 I have looked in all the archives and I cannot find how I would pass an
 array from a form to a pop-up window. Has anyone done this?

 Bruce

 
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Passing arrays to a popup

2001-11-25 Thread Bruce Sorge

I am JavaScript stupid. My knowledge is just enough to be dangerous. I
suppose that this is the wrong context?

script language=JavaScript type=text/javascript
!--
Function getItems() {
opener.document.forms[0].elements
}
//--
/script

What else goes in this?
- Original Message -
From: Don Vawter [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Sunday, November 25, 2001 10:12 PM
Subject: Re: Passing arrays to a popup


 in the popup window you can refer to the elements in the main window using
 js by
 opener.document.forms[0].elements
 which is a collection of all the form fields.

 - Original Message -
 From: Bruce Sorge [EMAIL PROTECTED]
 To: CF-Talk [EMAIL PROTECTED]
 Sent: Sunday, November 25, 2001 9:02 PM
 Subject: Passing arrays to a popup


  I have looked in all the archives and I cannot find how I would pass an
  array from a form to a pop-up window. Has anyone done this?
 
  Bruce
 
 
 
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Passing arrays to a popup

2001-11-25 Thread Don Vawter

first off js is case sensitive so use function not Function
also what do you want to do with the values? prepolulate another form or
what.
To loop over the elements collection you would have something like:

var foo = new Array();
for(i=0;iopener.document.forms[0].elements.length;i++){
foo[i]=opener.document.forms[0].elements[i].value;
}

This would give you an array foo with all the elements values. Of course if
you were using netscape and dropdowns they don't have a value but otherwise
you are ok. Decent js guide at:
http://developer.netscape.com/docs/manuals/js/client/jsref/index.htm



- Original Message -
From: Bruce Sorge [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Sunday, November 25, 2001 9:27 PM
Subject: Re: Passing arrays to a popup


 I am JavaScript stupid. My knowledge is just enough to be dangerous. I
 suppose that this is the wrong context?

 script language=JavaScript type=text/javascript
 !--
 Function getItems() {
 opener.document.forms[0].elements
 }
 //--
 /script

 What else goes in this?
 - Original Message -
 From: Don Vawter [EMAIL PROTECTED]
 To: CF-Talk [EMAIL PROTECTED]
 Sent: Sunday, November 25, 2001 10:12 PM
 Subject: Re: Passing arrays to a popup


  in the popup window you can refer to the elements in the main window
using
  js by
  opener.document.forms[0].elements
  which is a collection of all the form fields.
 
  - Original Message -
  From: Bruce Sorge [EMAIL PROTECTED]
  To: CF-Talk [EMAIL PROTECTED]
  Sent: Sunday, November 25, 2001 9:02 PM
  Subject: Passing arrays to a popup
 
 
   I have looked in all the archives and I cannot find how I would pass
an
   array from a form to a pop-up window. Has anyone done this?
  
   Bruce
  
  
 
 
~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists