Jump to content
Silver Black

Impossilbe to find entry point for WinSATGetScore in WinSATAPI.dll

Recommended Posts

Hi! I have this declaration:

 

function WinSATGetScore(out Score: TWinSATScore): Boolean; external 'WinSATAPI.dll';

But I get the run-time error "Impossible to find WinSATGetScore entry point procedure in dynamic link library <executable.exe>".

What's wrong in the declaration? The DLL is a system one and thus included in my Windows 11 System32 folder.

Share this post


Link to post

I dont know so much about DLL exportations, but many DLL (system) using export the procedure by "name" or "index"... then maybe you can try some like this:

Quote

function FuncNameXXX( same params type like in DLL procedure): type-resulted; external "DLL-name" name 'name-func-into-DLL'   // or  ...  index Idx-func-into-DLL   <--- need see documentation!

 

Share this post


Link to post
10 minutes ago, Silver Black said:

Hi! I have this declaration:

 


function WinSATGetScore(out Score: TWinSATScore): Boolean; external 'WinSATAPI.dll';

But I get the run-time error "Impossible to find WinSATGetScore entry point procedure in dynamic link library <executable.exe>".

What's wrong in the declaration? The DLL is a system one and thus included in my Windows 11 System32 folder.

Win32_WinSAT class

  • Article
  • 12/12/2020
  • 2 minutes to read
  •  

[Win32_WinSAT may be altered or unavailable for releases after Windows 8.1.]               <-------------------------------------------

 

 

Share this post


Link to post
30 minutes ago, DelphiUdIT said:

Is not a normal DLL is a COM object.

 

This is a type library definition (you can make your own with IDE).

 

Bye

 

WINSATLib_TLB.pas

 

Great, thanks! 

Share this post


Link to post

the RAD has a TLibImp exe 32/64 that allow create your  TLB in command-line (IDE show dll 32bits).

param -P allow create your Delphi Pascal imports

 

RADStudio\11.0\bin64\tlibimp.exe” -P My64bit.DLL

Edited by programmerdelphi2k

Share this post


Link to post
20 hours ago, DelphiUdIT said:

From the IDE:

 

 

I had looked into that, but I wasn't sure, now I saw the registered dll, thank you again.

 

However, I still don't know how to call the function I used to call like this: 

function WinSATGetScore(out Score: TWinSATScore): Boolean; external 'WinSATAPI.dll';

How the new WINSATLib_TLB.pas unit created from the IDE should help with my problem?

Share this post


Link to post

I don't know nothing about WinSat, but what you knew in the past is different from what it is now.

 

[Win32_WinSAT may be altered or unavailable for releases after Windows 8.1.]               <-------------------------------------------  THIS DOESN'T EXISTS ANYMORE

 

Look at new TLB that i post and this piece of source ... i hope this can help you.

Quote

unit Unit1;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, WINSATLib_TLB;

type
  TForm1 = class(TForm)
    Button1: TButton;
    procedure FormCreate(Sender: TObject);
    procedure FormDestroy(Sender: TObject);
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;
  QueryWSat: TCQueryWinSAT;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var p: WINSAT_ASSESSMENT_STATE;
begin
  if Assigned(QueryWSat) then
    begin
      p := QueryWSat.Info.AssessmentState;
      ShowMessage(floattostr(QueryWSat.Info.GetAssessmentInfo(p).Score));
    end;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  QueryWSat := TCQueryWinSAT.Create(self);
end;

procedure TForm1.FormDestroy(Sender: TObject);
begin
  if Assigned(QueryWSat) then
   QueryWSat.Free;
end;

end.

 

 

 

WINSATLib_TLB.pas

Edited by DelphiUdIT

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×