Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Not call function from COM object on another machine

Status
Not open for further replies.

alexsubscriber

Technical User
Sep 9, 2003
12
0
0
MD
I have COM object (dll) create with Visual Fox Pro 6.0

I copy my com object in another machine. Also I copy next fox pro library
VFP6R.DLL
VFP6RENU.DLL
VFP6T.DLL

I registrate success COM object on another machine with "regsvr32".
But, the function (checkTrezSubAccount) in COM object is not call.
Why?
here is my visual fox pro 6.0 code:

DEFINE CLASS TrezSubAccount AS custom OLEPUBLIC

FUNCTION checkTrezSubAccount && not call on another machine
PARAMETERS X1, X2, strTrezSubAccountDBFPath

...
ENDFUNC && end function COD_TREZ
ENDDEFINE


In my machine all work OK - success call function "checkTrezSubAccount" from COM object) ,
but on another machnie I get next error message

Object name - 'TRBComObject'
Property name - 'checktrezsubaccount'
ERBOLEException: Unknown error with code: -2147319779.
DETAILS: EETOError : Result of executing elementary operation is negative. Executing terminated; MODULE='Sheduler'; SESSION='ShedulerOperation_1'

what is wrong?

thank you
 

Please avoid posting the same question more then once. I makes it difficult to determine which one should be answered.

I registrate success COM object on another machine with "regsvr32".

Have registered the VFP runtime libraries as well?. Can you also post your code that calls for the DLL.


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
> Have registered the VFP runtime libraries > as well?

I copy foxpro runtime libraries (VFP6R.DLL
VFP6RENU.DLL,VFP6T.DLL) at the same folder where is my COM object

> Can you also post your code that calls for >the DLL.

the code that call DLL is on our inner language
...
1.objSelectCOM = CreateCOMObject;
2.objSelectCOM.
CreateNewObject('com_trezsubaccount.TrezSubAccount');
4.strBSSystemPath := RootDirectory;
strTrezSubAccountDBFPath := strBSSystemPath + TREZSUBACCOUNT_DBF_PATH;
5.strResult := objSelectCOM.checkTrezSubAccount(strSubAccount, 'L', strTrezSubAccountDBFPath);
...

in row 2, COM object success find and create. But in row 5 I get error message (see question)
I suppose if this code works on my local machine (where visual foxpro 6.0 is installed ), and doesn't work on another machine, then there is no dll libraries on that machine.
 
alexsubscriber

I copy foxpro runtime libraries (VFP6R.DLL
VFP6RENU.DLL,VFP6T.DLL) at the same folder where is my COM object


I understand that you copied the VFP runtime files, but have you registered them? Please see faq184-2644.

Are you calling your COM from VB or VFP? Your code looks like VB code.



Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
>... but have you registered them?
No I'm not regisrated foxpro libraries. How I can do this?

>Are you calling your COM from VB or VFP? >Your code looks like VB code.
No, this is Delphi similar language
 
alexsubscriber

No I'm not regisrated foxpro libraries. How I can do this?

The same way you would register your COM (with "regsvr32")

No, this is Delphi similar language

I'm not familiar how to call a VFP COM from Delphi, perhaps soemone else here or you can ask this question in the Delphi forum (forum102)



Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
registrate with regsvr32 next runtime foxpro library
Vfp6r.dll
Oleaut32.dll
Olepro32.dll
Vfp6run.exe

but it's not help :-(
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top