Greetings. It's me again.
Been trying to solve this thing since almost a month ago. Hope you could give me a hand: I installed Delphi 7, because I need to work in a project for a client. The program is already made by someone else, just gonna need to add new features. It uses third party dlls and works with a SQL Database (of course, that one is also installed in my PC).
My main problem is, when I call one of the dll's, it keeps getting me the "ActiveX can't create component" error. I been searching for a solution, but unfortunately can't find.
Code is long, but I'll put the segment where error ocurrs:
procedure TFrm_Ent.Parameters();
var
cEMP, dEMP, cBAS, dBAS : PSafeArray;
i : longint;
s : WideString;
c : Currency;
caEMP, caBAS : Smallint;
begin
SafeArrayAllocDescriptor(1,cEMP);
cEMP.rgsabound[0].lLbound := 0;
cEMP.rgsabound[0].cElements := 15;
cEMP.cbElements := sizeof(c);
cEMP.fFeatures := $0006;
SafeArrayAllocData(cEMP);
SafeArrayAllocDescriptor(1,dEMP);
dEMP.rgsabound[0].lLbound := 0;
dEMP.rgsabound[0].cElements := 15;
dEMP.cbElements := 4;
dEMP.fFeatures := $000C;
SafeArrayAllocData(dEMP);
SafeArrayAllocDescriptor(1,cBAS);
cBAS.rgsabound[0].lLbound := 0;
cBAS.rgsabound[0].cElements := 15;
cBAS.cbElements := sizeof(c);
cBAS.fFeatures := $0006;
SafeArrayAllocData(cBAS);
SafeArrayAllocDescriptor(1,dBAS);
dBAS.rgsabound[0].lLbound := 0;
dBAS.rgsabound[0].cElements := 15;
dBAS.cbElements := 4;
dBAS.fFeatures := $000C;
SafeArrayAllocData(dBAS);
Frm_P.Params.GetData(bNum,cEMP,dEMP,caEMP,cBAS,dBAS,caBAS);
end;
The error ocurrs when I call GetData (bNum comes from another dll)
When I trace, after error ocurrs it targets to the following segment in System.pas:
asm
TEST EAX,EAX
JNS @@2
MOV ECX,SafeCallErrorProc
TEST ECX,ECX
JE @@1
MOV EDX,[ESP]
CALL ECX
@@1: MOV AL,reSafeCallError
JMP Error
@@2:
end;
The thing is.... at my boss PC it works perfectly.
What I have tried:
1) Registering/Unregistering dlls
2) Uninstalling/reinstalling SQL Server (using 2008 R2)
3) Changing SQL settings
4) Changing the delphi version (my installer, then my boss')
5) Pasting Delphi's folder from boss' PC to mine to get his setting up
6) Registering/Unregistering MSRDO20.DLL (got version 6.... something). Also tried with the 40 one.
7) Target the ODBC to my boss PC in case it's my data base. Result is worse (cant even open it because user seems to be set as local in the third party dll)
8) Using VirtualBox with Win XP (real OS is Win 10 64)
9) Checking SysWOW64 folder to do propper registrations.
10) Check Windows event log (nothing is shown there....)
11) Checked registry issues with CCleaner...
Nothing of that works. And I dont know what else to do. I only can suspect my problem is either the SafeArray (perhaps a missing DLL aside of the ActiveX one?), or a huge problem in my DB (although it works fine, accesable even in network).
Any help?