FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Help translating dot net code to FWH
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Help translating dot net code to FWH
Posted: 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:

   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
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Help translating dot net code to FWH
Posted: Tue Nov 04, 2008 07:51 AM
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Help translating dot net code to FWH
Posted: Tue Nov 04, 2008 02:09 PM

Antonio,

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

Regards,
James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Help translating dot net code to FWH
Posted: Tue Nov 04, 2008 06: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!

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Help translating dot net code to FWH
Posted: Tue Nov 04, 2008 11:15 PM

Antonio,

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

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10

Continue the discussion