Harry McKee wrote:
>
> I've also tried this using the same program with Vee 5.0 evaluation.
> Exactly the same results. I am able to get RPC programs to work, but not
> ActiveX. I think there is something wrong with the setup before I call
> the functions.
Are you using Formulas or the Call Function box?
It won't work with the Call Function box.
[<>] regards -- gvg
>
> I've also tried this using the same program with Vee 5.0 evaluation.
> Exactly the same results. I am able to get RPC programs to work, but not
> ActiveX. I think there is something wrong with the setup before I call
> the functions.
Are you using Formulas or the Call Function box?
It won't work with the Call Function box.
[<>] regards -- gvg
I have been able to use the following functions:
LoadVeeLibrary();
NumFunctions();
NumActualReturns();
Could not use these:
RetrieveFunctionResults(); - Returns result -17.
Unsure of the results of these:
EnumFunctions();
CallFunction();
EnumReturnTypes();
Has anyone else done this? Is there any code out with successful examples?
This is the code I am using:
(Appropriate user functions have been defined in a the file simple.vee)
long result;
int count;
CCall* call1 = (CCall*) GetDlgItem(IDC_CALLCTRL);
CString library("C:\VeePrograms\simple.vee");
LPCTSTR libName(library);
LPCTSTR functionName("swap");
result = call1->LoadVeeLibrary(libName);
COleVariant vArg[2];
vArg[0] = COleVariant((long) 1);
vArg[1] = COleVariant((long) 2);
COleVariant functionResults[2];
functionResults[0] = COleVariant((CString) "blegga");
functionResults[1] = COleVariant((CString) "blegga");
count = call1->NumFunctions(libName);
result = call1->EnumFunctions(libName, *functionResults);
result = call1->CallFunction(libName, functionName, *vArg);
result = call1->RetrieveFunctionResults(libName, functionName,
*functionResults);
count = call1->NumActualReturns(libName, functionName);
COleVariant resultTypes[2];
resultTypes[0] = COleVariant((long) 1);
resultTypes[1] = COleVariant((long) 2);
COleVariant resultCount[2];
result = call1->EnumReturnTypes(libName, functionName,
*resultTypes, *resultCount);
Thanks.
-harry
+-----------------------------------+
| Harry McKee, Software Engineer |
| t_hmckee@qualcomm.com |
| phone: 619.651.2744 |
+-----------------------------------+