![]() |
Gigabyte dll functions
Easy Tune 4
![]() After compiling just drop the project in easy tune 4 directory and voila you have a temperature reading(or something else) program! This function works 100% TESTED! :)
Delphi-Quellcode:
function tform1.GetCpuTemp: cardinal;
type LX_Get_CPUTempValue = function(pCpuTemp: Pointer): cardinal stdcall; var hInstDll: THandle; Get_CPUTempValue: LX_Get_CPUTempValue; Pfad: AnsiString; begin Result := 0; Pfad := ExtractFilePath(application.ExeName) + 'w83781d.dll'; if FileExists(Pfad) then begin hInstDll := LoadLibrary(PChar(Pfad)); if hInstDll <> 0 then try Get_CPUTempValue:= GetProcAddress(hInstDll, 'LX_Get_CPUTempValue'); if Assigned(Get_CPUTempValue) then Get_CPUTempValue(Addr(Result)); finally FreeLibrary(hInstDll); end; end; end; But this dosent work!Please tell me whats wrong?Also if somebody can write about other functions how to call them? Thanks!
Delphi-Quellcode:
function ismotherboard: boolean;
type LX_IsGigaMainBoard = function(pIsGigaMainBoard: Pointer): boolean stdcall; var hInstDll: THandle; IsGigaMainBoard: LX_IsGigaMainBoard; Pfad: AnsiString; begin Pfad := ExtractFilePath(application.ExeName) + 'w83781d.dll'; if FileExists(Pfad) then begin hInstDll := LoadLibrary(PChar(Pfad)); if hInstDll <> 0 then try IsGigaMainBoard:= GetProcAddress(hInstDll, 'LX_IsGigaMainBoard'); if Assigned(IsGigaMainBoard) then IsGigaMainBoard(Addr(Result)); finally FreeLibrary(hInstDll); end; end; W83781D.DLL exported functions
Delphi-Quellcode:
LX_Admin_PWD_Setting
LX_COM1Control LX_COM2Control LX_FloppyControl LX_Get_CaseOpenStatus LX_Get_CPUFanCount LX_Get_CPUTempValue LX_Get_PowerFanValue LX_Get_SystemFanValue LX_Get_VoltageCPUValue LX_Get_VoltageP12Value LX_Get_VoltageP33Value LX_Get_VoltageP5Value LX_IsGigaMainBoard LX_IsMSIMainBoard LX_IsQDIMainBoard LX_ParallelControl LX_Password_Control_Request LX_User_PWD_Setting W_CaseO_Clear W_Get_Battery_Status W_Get_Beep_Status W_Get_CaseO_Status W_Get_Fan1_Status W_Get_Fan2_Status W_Get_Fan3_Status W_Get_FanCount W_Get_FanLoLimit W_Get_Status W_Get_Temp1_Status W_Get_Temp23_Status W_Get_Temp2_Status W_Get_Temp3_Status W_Get_TempLimitValue W_Get_TempValue W_Get_Version W_Get_VIDVcore W_Get_VIDVcore1 W_Get_VIDVcore2 W_Get_VIN0_Status W_Get_VIN1_Status W_Get_VIN2_Status W_Get_VIN3_Status W_Get_VIN4_Status W_Get_VIN5_Status W_Get_VIN6_Status W_Get_VIN7_Status W_Get_VINLimitValue W_Get_VINValue W_hua_inp W_hua_inpd W_hua_inpw W_hua_outp W_hua_outpd W_hua_outpw W_IsDualCPU W_IsGBT W_IsHWM W_IsITE W_IsW83781D W_Set_Beep_Status W_Set_FanLoLimitValue W_Set_TempLimitValue W_Set_VINLimitValue W_SMI_Test W_Temp_RtoT W_Temp_TtoR |
Re: Gigabyte dll functions
is it allowed to use the gigabyte dll?
and please specify "this doesnt work". what do you mean with that? what error appears? |
Re: Gigabyte dll functions
No error comes up until you dont drop it in easy tune 4 directory.It shows false on gigabyte motherboard.But it must show true becouse the board is gigabyte... :)
|
Re: Gigabyte dll functions
try it so
Delphi-Quellcode:
maybe der is an error while loding the dll
function ismotherboard: boolean;
type LX_IsGigaMainBoard = function(pIsGigaMainBoard: Pointer): boolean stdcall; var hInstDll: THandle; IsGigaMainBoard: LX_IsGigaMainBoard; Pfad: AnsiString; begin Pfad := ExtractFilePath(application.ExeName) + 'w83781d.dll'; if FileExists(Pfad) then begin hInstDll := LoadLibrary(PChar(Pfad)); if hInstDll <> 0 then try IsGigaMainBoard:= GetProcAddress(hInstDll, 'LX_IsGigaMainBoard'); if Assigned(IsGigaMainBoard) then begin IsGigaMainBoard(Addr(Result)); end else ShowMessage('Error'); finally FreeLibrary(hInstDll); end; end; and do you know that this type deklaration is correct? LX_IsGigaMainBoard = function(pIsGigaMainBoard: Pointer): boolean stdcall; |
Re: Gigabyte dll functions
Yes i think it is correct do we have someone here that has a Gigabyte board to test this? :)
I need this function as a sort of protect mechanism and it goes like this if you have a gigabyte motherboard then it will show cpu temperature.So if ismotherboard then cputemp... :P |
Re: Gigabyte dll functions
Zitat:
Zitat:
well to me it seems to be much easier if you just explain where you've got the signature from. Is there some SDK/Specification published by Gigabyte? And if so, I don't think that they will use the Pointer to an Delphi-Boolean as an argument of the function, neither they will use this Type for the return-parameter. Because of Portability the might have used something like an C-Bool (an Integervalue, if 0 = false, true otherwise). But why should this method return the result by an argument and as a result of the function? Regards Der Unwissende |
Re: Gigabyte dll functions
|
Re: Gigabyte dll functions
Zitat:
Well, I guess that you should change the boolean in the DLL-Function Call (as parameter and result) to LongBool. This is the more convenient way do return a True or False, because most languages supports a generic Integer Type (int in C, Integer in Delphi, ...), while boolean might be implemented in different ways. |
Re: Gigabyte dll functions
Zitat:
|
Re: Gigabyte dll functions
Nobody knows and now you are deleting my posts?Oh thats nice!
|
Re: Gigabyte dll functions
Zitat:
Well, the code of behaviour also includes, that every requester is supposed to post some detailed information about the problem to solve, the things tried out and so on. Well I think Muetze just wanted to say, that you should work on that points. So it is a little unconventional to deploy some code without the possibility to test the correctness of that code and even without any specification. As far as I can see, you just guessed how the function could work. But you should tell if so! At least this means a risk to all people testing your code on a Gigabyte-Board. If you want to know, how the dll is working, you could dissassemble it and take a look at the enty-point of the corresponding function inside the dll. Of course this is not easy, but this is the best way to get the information. Of cource you could ask bitsetter, maybe by PN or post the question in a thread. But please keep it polite and post all information, including where you've got the code from and why you changed it the way you did. Of course it also good to know where your code has been testet (you've just said, that the code does not work the right way). |
Re: Gigabyte dll functions
Ok i am really sorry to Meutze1 you and many others!Wont happen again! :?
As i said i do not know ASM i will just post the code,cant understand it. I load this in to IDA (Dissassembler) But i am sure somebody will understand it... For LX_Get_CPUFanCount function
Delphi-Quellcode:
For LX_IsGigaMainBoard function
public LX_Get_CPUFanCount
LX_Get_CPUFanCount proc near arg_0= dword ptr 4 mov eax, [esp+arg_0] push eax push 1 call W_Get_FanCount retn 4 LX_Get_CPUFanCount endp
Delphi-Quellcode:
For LX_IsQDIMainBoard function
; Exported entry 14. LX_IsGigaMainBoard
public LX_IsGigaMainBoard LX_IsGigaMainBoard proc near mov eax, dword_1000D674 dec eax neg eax sbb eax, eax retn LX_IsGigaMainBoard endp
Delphi-Quellcode:
; Exported entry 15. LX_IsMSIMainBoard
; Exported entry 16. LX_IsQDIMainBoard public LX_IsQDIMainBoard LX_IsQDIMainBoard proc near or eax, 0FFFFFFFFh ; LX_IsMSIMainBoard retn LX_IsQDIMainBoard endp For LX_IsMSIMainBoard function
Delphi-Quellcode:
For LX_Get_CPUFanCount function
; Exported entry 15. LX_IsMSIMainBoard
; Exported entry 16. LX_IsQDIMainBoard public LX_IsQDIMainBoard LX_IsQDIMainBoard proc near or eax, 0FFFFFFFFh ; LX_IsMSIMainBoard retn LX_IsQDIMainBoard endp
Delphi-Quellcode:
; Exported entry 5. LX_Get_CPUFanCount public LX_Get_CPUFanCount LX_Get_CPUFanCount proc near arg_0= dword ptr 4 mov eax, [esp+arg_0] push eax push 1 call W_Get_FanCount retn 4 LX_Get_CPUFanCount endp For LX_Get_SystemFanValue function
Delphi-Quellcode:
For LX_Get_PowerFanValue function
; Exported entry 9. LX_Get_SystemFanValue
public LX_Get_SystemFanValue LX_Get_SystemFanValue proc near var_4= dword ptr -4 arg_0= dword ptr 4 push ecx cmp dword_1000D680, 1 jnz short loc_100038DA
Delphi-Quellcode:
For LX_Get_VoltageP12Value function
; Exported entry 8. LX_Get_PowerFanValue
public LX_Get_PowerFanValue LX_Get_PowerFanValue proc near arg_0= dword ptr 4 cmp dword_1000D680, 1 jnz short loc_10003938
Delphi-Quellcode:
; Exported entry 11. LX_Get_VoltageP12Value
public LX_Get_VoltageP12Value LX_Get_VoltageP12Value proc near arg_0= dword ptr 4 mov eax, [esp+arg_0] push eax push 4 call W_Get_VINValue retn 4 LX_Get_VoltageP12Value endp For LX_Get_VoltageP5Value function
Delphi-Quellcode:
; Exported entry 13. LX_Get_VoltageP5Value
public LX_Get_VoltageP5Value LX_Get_VoltageP5Value proc near arg_0= dword ptr 4 mov eax, [esp+arg_0] push eax push 3 call W_Get_VINValue retn 4 LX_Get_VoltageP5Value endp For LX_Get_VoltageP3Value function
Delphi-Quellcode:
; Exported entry 12. LX_Get_VoltageP33Value
public LX_Get_VoltageP33Value LX_Get_VoltageP33Value proc near arg_0= dword ptr 4 mov eax, dword_1000D680 push esi cmp eax, 1 jnz short loc_100039A8 For LX_Get_CaseOpenStatus function
Delphi-Quellcode:
; Exported entry 7. LX_Get_CaseOpenStatus
public LX_Get_CaseOpenStatus LX_Get_CaseOpenStatus proc near arg_0= dword ptr 4 mov eax, [esp+arg_0] push eax push 10h call W_Get_Status retn 4 LX_Get_CaseOpenStatus endp For W_Get_FanLoLimit function
Delphi-Quellcode:
; Exported entry 28. W_Get_FanLoLimit
public W_Get_FanLoLimit W_Get_FanLoLimit proc near arg_0= dword ptr 4 arg_4= dword ptr 8 xor eax, eax mov ax, word_1000D894 cmp eax, 290h jg short loc_10002C0E For W_Set_FanLoLimitValue function
Delphi-Quellcode:
; Exported entry 57. W_Set_FanLoLimitValue
public W_Set_FanLoLimitValue W_Set_FanLoLimitValue proc near arg_0= dword ptr 4 arg_4= dword ptr 8 xor eax, eax mov ax, word_1000D894 cmp eax, 130h jg short loc_10002E18 |
Re: Gigabyte dll functions
Sorry to double post but dosent the info help?If not then this was not worth posting..
|
Re: Gigabyte dll functions
Perhaps those information is in fact helpful and the other guys just did'nt had the time to look at it.
'Pushing' a thread like you do is only allowed after a minimum of 24 hours here, so I really urge you to stick to our forum rules here and only reply to an own post which is more than a whole day old. We mods already got complaints about some of your posts (as well as the deactivated one was a users complaint) and we got complaints about your pushing, so please try to calm a bit down if there isn't an answer after three or four hours, get yourself a cup of really hot tea and have a book beside you. Just don't bring us in a haste, okay? :zwinker: |
Re: Gigabyte dll functions
Opology has been stated to the mods,muetze1 and everybody else. Kein Problem :)
|
Re: Gigabyte dll functions
Liste der Anhänge anzeigen (Anzahl: 1)
HardwareMonitor.zip
|
Re: Gigabyte dll functions
Thank you very much! :)
Can you provide more information about other functions thanks in advance! LX_IsGigaMainBoard //Checks if its gigabyte board LX_IsMSIMainBoard //Checks if its MSI board LX_IsQDIMainBoard //Checks if its QDI board These are voltages (12 V,3,3 V,5 V,-5 V,-12 V,VBAT,+5 VSB and vcore) W_Get_VIN0_Status W_Get_VIN1_Status W_Get_VIN2_Status W_Get_VIN3_Status W_Get_VIN4_Status W_Get_VIN5_Status W_Get_VIN6_Status W_Get_VIN7_Status Voltage regulation W_Get_VIDVcore W_Get_VIDVcore1 W_Get_VIDVcore2 Voltage Alarm W_Get_VINLimitValue W_Get_VINValue By this you can set Voltage Alarm limit W_Set_VINLimitValue Checks if its open case i guess its boolean or longbolean maybe even integer( 0,-1) W_Get_CaseO_Status Another interested functions i dont know what they do W_IsDualCPU //Check mechanism for dual core/quad core cpus? W_IsGBT //is gigabyte board? W_IsHWM //Dont know for this one,i think it has to do with graphic cards,not 100% sure... W_IsITE //ITE GigaRAID controler? W_IsW83781D W_SMI_Test W_Get_FanLoLimit //Alarm maybe for fans? W_Get_Status W_hua_inp W_hua_inpd W_hua_inpw W_hua_outp W_hua_outpd W_hua_outpw W_Temp_RtoT W_Temp_TtoR W_CaseO_Clear //Case opened? |
Re: Gigabyte dll functions
LX_IsGigaMainBoard //Checks if its gigabyte board
This functions 100%.Works like this if you have a Gigabyte board then it will show i:0(as boolean true) if you don't have a Gigabyte board then it will show i:-1(as boolean false).Simple,eh? :)
Delphi-Quellcode:
#include <windows.h>
#include <stdio.h> typedef int (*isgigabytemobo)(void); int main() { HMODULE hGigabyteLib = NULL; isgigabytemobo LX_IsGigaMainBoard = NULL; hGigabyteLib = LoadLibrary(L"W83781D.DLL"); if (hGigabyteLib != NULL) { printf("Library loaded: W83781D.DLL.\n"); LX_IsGigaMainBoard = (isgigabytemobo)GetProcAddress(hGigabyteLib, "LX_IsGigaMainBoard"); if (LX_IsGigaMainBoard != NULL) { printf("Found LX_IsGigaMainBoard.\n"); printf("i: %i.\n", LX_IsGigaMainBoard()); } else printf("Could not find LX_IsGigaMainBoard.\n"); FreeLibrary(hGigabyteLib); } else printf("Couldn't load library W83781D.DLL.\n"); system("pause"); return 0; } |
Re: Gigabyte dll functions
No comments? :wall:
|
Re: Gigabyte dll functions
*push* :?
|
Re: Gigabyte dll functions
Maybe start up a disassembler and investigate on your own? How about IDA 4.3 Freeware?
|
Re: Gigabyte dll functions
Well i wouldnt know even where to start,all i found is this but what does this mean?Does it contain any parameters,well i doubt so.
Zitat:
Can someone translate this?To delphi.. Zitat:
|
Re: Gigabyte dll functions
Zitat:
Zitat:
Code:
which says that:
typedef int (*isgigabytemobo)(void);
Delphi-Quellcode:
(where cdecl is not important, because no params are being passed)
type TFNisgigabytemobo = function(): Integer; cdecl;
|
Re: Gigabyte dll functions
Even though if a function doesnt have a parameter can it be called?I guess than it will only return 0 or -1 ,yes or no
|
Re: Gigabyte dll functions
Of course can a function without parameters be called.
Given the short disassembly excerpt, this function returns exactly ONE value: -1 But I presume that the actual meaning is BOOL (i.e. LongBool in Delphi) and that this is supposed to return -1 or 0, yes. |
Re: Gigabyte dll functions
public LX_IsQDIMainBoard
LX_IsQDIMainBoard proc near or eax, 0FFFFFFFFh ; LX_IsMSIMainBoard retn LX_IsQDIMainBoard endp So this is accuall boolean function that returns -1 or 0 ,you can also sometime see the parameter in the name of the function.Is can only be boolean. |
Re: Gigabyte dll functions
Zitat:
|
Re: Gigabyte dll functions
Can you help me with other functions :)
|
Re: Gigabyte dll functions
How much do you pay per hour? :mrgreen: :zwinker:
I can try, but my spare time is limited anyway, so I'd prefer you forward only those parts you really can't solve yourself. Please do it via the forum anyway, so other can benefit from the findings. |
Re: Gigabyte dll functions
Liste der Anhänge anzeigen (Anzahl: 2)
For me it returns -1 or false but i dont know for accual users that have gigabyte board.So you may test it
Delphi-Quellcode:
interface
uses Fastmm4,Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; const w83781ddll = 'w83781d.dll'; type TForm1 = class(TForm) Label1: TLabel; procedure FormCreate(Sender: TObject); procedure FormClose(Sender: TObject; var Action: TCloseAction); private { Private declarations } public { Public declarations } end; function LX_IsGigaMainBoard : integer;external 'w83781d.dll'; var Form1: TForm1; hInstdll: THandle; implementation {$R *.dfm} procedure TForm1.FormCreate(Sender: TObject); begin hInstdll := LoadLibrary(w83781ddll); if LX_IsGigaMainBoard=-1 then label1.caption:='you dont have a giga board!' else if LX_IsGigaMainBoard=0 then label1.caption:='you do have a giga board!'; end; procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction); begin FreeLibrary(hInstdll); end; end. |
Re: Gigabyte dll functions
Zitat:
|
Re: Gigabyte dll functions
So other functions can be called in the same way?
LX_IsMSIMainBoard LX_IsQDIMainBoard |
Re: Gigabyte dll functions
I'd have to see those. Perhaps you could send me the DLL in question and a (short!) list of functions you want deciphered (send it via PM in an archive).
|
Re: Gigabyte dll functions
Dll is already attached,you get the short list of functions now!
|
Re: Gigabyte dll functions
Delphi-Quellcode:
function LX_IsQDIMainBoard():LongBool; stdcall; // check against FALSE, same as LX_IsMSIMainBoard
function LX_IsMSIMainBoard():LongBool; stdcall; // check against FALSE, same as LX_IsQDIMainBoard function LX_IsGigaMainBoard():LongBool; stdcall; // check against FALSE Except for LX_IsGigaMainBoard those functions don't do anything. |
Re: Gigabyte dll functions
W_Get_VIDVcore1 can you look what does this function contain(pointers,parameters?)
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 11:15 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz