Skip to content
⌘ NSIS Forum Archive

getvalue from external dll call's struct parameters?

3 posts

zendream#

getvalue from external dll call's struct parameters?

I want to use system plugin to call a fuction in a external dll as following, and it stores the result in the struture parameter(HDDINFO). How can i write script to retrieve the value(e.g., HDDINFO.HIVersion) after system::call ?

will someone help me? thanks!

here are the prototypes:

DWORD HIGetInfo(LPHDDINFO lpHDDInfo, LPHDDSYSINFO lpHDDSysInfo)
typedef struct _HDDINFO
{
    CHAR HIVersion[128];
    CHAR HIInstallDate[20];
    DWORD HIComputerType;
    CHAR HIProcessorType[128];
    DWORD DriverStatus;
    DWORD LoaderStatus;
    CHAR HIImagePath[128];
    DWORD HIPortMode;
    DWORD HILPT1;
    DWORD HILPT2;
    DWORD HILPT3;
    CHAR HIServerPath[128];
    CHAR HIServerSwitches[128];
    DWORD HIKeySearch;
} HDDINFO;
typedef HDDINFO FAR *LPHDDINFO;
typedef struct _HDDSYSINFO
{
    DWORD HISystemType;
} HDDSYSINFO;
typedef HDDSYSINFO FAR *LPHDDSYSINFO 
kichik#
Use:

System::Call "*strcut_ptr(parms...)"

For example: