Help translating dot net code to FWH

Help translating dot net code to FWH

Postby James Bott » Tue Nov 04, 2008 12:39 am

I am trying to access a Dot NET sdk which is exported as a COM object. I have installed the SDK for this, and I have Dot NET installed (2.0 was specified but I have 1.0, 2.0 and 3.5).

Here is the Dot NET code I need to translate:

ChargeNow chg = new ChargeNow();
chg.init();
chg.PM = ChargeNow.PAYMENTMODE.PayNow;
chg.CM = ChargeNow.CHARGEMODE.Sale;
chg.ShowDialog();

Can anyone help with this?

I have tried:

oChg := CreateObject("ChargeNow")

And I get this error:

Code: Select all  Expand view
   Error description: Error TOleAuto/-1  CO_E_CLASSSTRING: TOLEAUTO:NEW
   Args:
     [   1] = C   ChargeNow


Which I guess this means I am passing an invalid parameter. I also tried "ChargeNow" in all uppercase and all lowercase. Any ideas?

I am running FWH 8.08/xHarbour under XP SP2.

This is an SDK to process credit cards.

Regards,
James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby Antonio Linares » Tue Nov 04, 2008 7:51 am

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby James Bott » Tue Nov 04, 2008 2:09 pm

Antonio,

Thanks. I forgot to mention that the assembly was registered too.

Regards,
James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby Antonio Linares » Tue Nov 04, 2008 6:09 pm

James,

Are you able to create it from VBA ? (i.e. Word "macros")

I use to test VB code from Word itself :-) so no need to have VB!
Last edited by Antonio Linares on Tue Nov 04, 2008 11:42 pm, edited 1 time in total.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby James Bott » Tue Nov 04, 2008 11:15 pm

Antonio,

Unfortunately, I don't have either VB or Word.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 63 guests