The command to register the COM object is regsvr32 followed by the DLL
name.
I also suspect you will need to use the following in your CreateObject
call:
<cfset BBAPI = CreateObject("COM", "BBAPI.API")>
Tom
________________________________
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Dave Shuck
Sent: Tuesday, March 27, 2007 2:40 PM
To: Dallas/Fort Worth ColdFusion User Group Mailing List
Subject: Re: [DFW CFUG] Need help instantating a COM object in CF7...
It's myfirst time... :o(
Christopher is the DLL registered on the system? When I have used COM
objects, I have instantiated them by the class name that they system
knows it by rather than how you would instantiate a CFC in a particular
dot delimited path from your web root.
~Dave
On 3/27/07, Christopher Jordan <[EMAIL PROTECTED]> wrote:
Hi folks,
I really need some help instantiating a COM object.
I've been given a .dll file, and been told that it is the COM object,
but I don't know how to instantiate it. I thought it would be simple.
I've tried:
<cfset BBAPI = CreateObject("COM", "COM.BBAPI")>
The directory is COM and the dll is called BBAPI. I thought maybe it was
a path thing, but I tried instantiating a CFC (whose directory is on the
same level as the COM directory) and it worked like a champ.
The only thing mentioned about instantiating the object is mentioned in
his component summary. The first two items are:
Type: COM
Name: BBAPI
Note: Used for instantiating the object
Type: Class
Name: API
Note: Used for instantiating the object. (i.e. CreateObject BBAPI.API)
I've tried:
<cfset BBAPI = CreateObject("COM", " COM.API")>
<cfset BBAPI = CreateObject("COM", "COM.BBAPI")>
<cfset BBAPI = CreateObject("COM", "COM.BBAPI.API")>
<cfset BBAPI = CreateObject("COM", " COM.BBAPI.dll")>
I just don't know what to do. The docs say that I need:
<cfset BBAPI = CreateObject("COM", "class")>
Well according to what I'm reading the class is "API".
Can someone help me please? :o)
Chris
_______________________________________________
Reply to DFWCFUG:
[email protected]
Subscribe/Unsubscribe:
http://lists1.safesecureweb.com/mailman/listinfo/list
List Archives:
http://www.mail-archive.com/list%40list.dfwcfug.org/
http://www.mail-archive.com/list%40dfwcfug.org/
DFWCFUG Sponsors:
www.instantspot.com/
www.teksystems.com/ <http://www.teksystems.com/>
--
~Dave Shuck
[EMAIL PROTECTED]
www.daveshuck.com
Where's your Spot?
www.instantspot.com
_______________________________________________
Reply to DFWCFUG:
[email protected]
Subscribe/Unsubscribe:
http://lists1.safesecureweb.com/mailman/listinfo/list
List Archives:
http://www.mail-archive.com/list%40list.dfwcfug.org/
http://www.mail-archive.com/list%40dfwcfug.org/
DFWCFUG Sponsors:
www.instantspot.com/
www.teksystems.com/