Welcome, Guest
Username: Password: Remember me
General Purpose Components and Libraries, discussions, problems and suggestions
  • Page:
  • 1

TOPIC:

Codetyphon - pl_onguard runtime error 9 years 8 months ago #7015

  • Hector S Ponce
  • Hector S Ponce's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 7
  • Thank you received: 0
Trying to run my program in diferent operative systems: win8, win7, XP, win7 (vmware)
I have a runtime error in line 119 of ogwmi.pas of package pl_onguard.

win8: no errors found
win7: with error
xp: with error
win7 under vmware: with error

the code:

while oEnum.Next(1, FWbemObject, iValue) = 0 do
begin
for a:=0 to fields.Count-1 do
Begin

this line ---> OutBuf:= OutBuf + Trim(string(FWbemObject.Properties_.Item(OLEVariant(fields[a])).Value));

end;
result := OutBuf <>'';
FWbemObject:=Unassigned;
end;
finally .....

changing the line for:

OutBuf:= OutBuf + Trim(VarToStr(FWbemObject.Properties_.Item(OLEVariant(fields[a])).Value));

the problem seems to be solved but the package is still unstable.

did someone know something about these issue?

Please Log in or Create an account to join the conversation.

Codetyphon - pl_onguard runtime error 9 years 8 months ago #7017

  • universe
  • universe's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 122
  • Thank you received: 8
Hello, have you tried the same code on the same machine with different OS? Because some hardware codes won't be available

Please Log in or Create an account to join the conversation.

Codetyphon - pl_onguard runtime error 9 years 8 months ago #7023

  • Hector S Ponce
  • Hector S Ponce's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 7
  • Thank you received: 0
No, I haven't tried it.
I have compared last version of the package (5.21) with the one I have used before and they have many differencies. The old version works fine to me, then I will continue using it.
The version I have is attached.

Please Log in or Create an account to join the conversation.

Last edit: by Hector S Ponce.

Codetyphon - pl_onguard runtime error 9 years 8 months ago #7024

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4540
  • Thank you received: 1117
Sir
please look at pl_OnGuard pkg unit onguardstarter.pas
Procedure OnGuard_Init;
Procedure OnGuard_Stop;


Your old version has onGuard library initialization in every unit
but Typhon IDE load pkgs as static code and
if you build the IDE with OnGuard pkg, OnGuard library start working with Typhon IDE (???)
IDE is the host Application....and this effect Typhon IDE

We moved all onGuard library initialization staff to onguardstarter.pas.
So
-in your applications start you must call OnGuard_Init and
-in the termination of your applications you must call OnGuard_Stop

please try and report
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

Last edit: by Sternas Stefanos.

Codetyphon - pl_onguard runtime error 9 years 8 months ago #7025

  • Hector S Ponce
  • Hector S Ponce's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 7
  • Thank you received: 0
When I write the code in my project in this order

Application.Initialize;
Application.CreateForm(Tformmain1, formmain1);
OnGuard_Init;
Application.Run;
OnGuard_Stop;

the application runs with no errors, so I will use the latest version.

thanks.

Please Log in or Create an account to join the conversation.

Codetyphon - pl_onguard runtime error 9 years 8 months ago #7026

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4540
  • Thank you received: 1117
Thanks Sir,
this is an lab task for Lab CT 5.30 :

-Task32 pl_OnGuard, Update, test and fix (Total Steps 3) info

We remove and "version" property....
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

Last edit: by Sternas Stefanos.

Codetyphon - pl_onguard runtime error 9 years 7 months ago #7280

  • Shaun
  • Shaun's Avatar
  • Offline
  • New Member
  • New Member
  • Posts: 3
  • Thank you received: 0
So I guess my WMI implementation was picked up then? I only noticed this thread by accident.

So much more has been fixed in the OnGuard package since then (6 months ago)

Please Log in or Create an account to join the conversation.

Last edit: by Shaun.

Codetyphon - pl_onguard runtime error 9 years 7 months ago #7281

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4540
  • Thank you received: 1117
Yes Sir
and we fix many things in the pl_OnGuard package
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

Codetyphon - pl_onguard runtime error 9 years 7 months ago #7283

  • Shaun
  • Shaun's Avatar
  • Offline
  • New Member
  • New Member
  • Posts: 3
  • Thank you received: 0
Is there a diff of those changes? An online repository, perhaps?

Please Log in or Create an account to join the conversation.

Codetyphon - pl_onguard runtime error 9 years 7 months ago #7286

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4540
  • Thank you received: 1117
Here Sir
PilotLogic Architect and Core Programmer
Attachments:

Please Log in or Create an account to join the conversation.

  • Page:
  • 1