Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

DLLCall Function Definition need help

$
0
0
Hi peoplez,
can someone help me to define the DLLCall for this function:

BOOL
WINAPI
WIMGetMountedImageInfo(
MOUNTED_IMAGE_INFO_LEVELS fInfoLevelId,
PDWORD pdwImageCount,
PVOID pMountInfo,
DWORD cbMountInfoLength,
PDWORD pcbReturnLength
);


Link: http://msdn.microsoft.com/en-us/library/windows/desktop/dd851928.aspx

Used DLL is wimgapi.dll

I have tried this:

[ autoit ]         
; #STRUCTURE# =================================================================================================================== ; Name...........: $tagWIM_MOUNT_INFO_LEVEL1 ; Description ...: Contains information retrieved by the _WIM_GetMountedImageList function. ; Fields ........: WimPath - Specifies the full path to the .wim file. ; MountPath - Specifies the full path to the directory where the image is mounted. ; ImageIndex - Specifies the image index within the .wim file specified in WimPath. ; MountFlags - Specifies the current state of the mount point. ; | $WIM_MOUNT_FLAG_MOUNTED - The image is actively mounted. ; | $WIM_MOUNT_FLAG_MOUNTING - The image is in the process of mounting. ; | $WIM_MOUNT_FLAG_REMOUNTABLE - The image is not mounted, but is capable of being remounted. ; | $WIM_MOUNT_FLAG_INVALID - The image mount point is no longer valid. ; | $WIM_MOUNT_FLAG_NO_WIM - TThe WIM file backing the mount point is missing or inaccessible. ; | $WIM_MOUNT_FLAG_NO_MOUNTDIR - The image mount point has been removed or replaced. ; | $WIM_MOUNT_FLAG_MOUNTDIR_REPLACED - The mount point has been replaced with by a different mounted image. ; | $WIM_MOUNT_FLAG_READWRITE - The image has been mounted with read-write access. ; Author ........: Jonathan Holmgren (Homes32) ; Remarks .......: ; =============================================================================================================================== Global Const $tagWIM_MOUNT_INFO_LEVEL1 = "WCHAR WimPath[260];WCHAR MountPath[260];DWORD ImageIndex;DWORD MountFlags" Local $MOUNTED_IMAGE_INFO_LEVELS = DllStructCreate($tagWIM_MOUNT_INFO_LEVEL1) local $pdwImageCount = DllStructCreate("ptr") Local $pMountInfo = DllStructCreate("ptr") Local $pcbReturnLength = DllStructCreate("ptr") ;~ Local $cbMountInfoLength = DllStructCreate("int") ; Size of buffer in bytes Local $aResult2 = DllCall($ghwimgapi, "bool", "WIMGetMountedImageInfo", _ "ptr", DllStructGetPtr($MOUNTED_IMAGE_INFO_LEVELS), _ "ptr", DllStructGetPtr($pdwImageCount), _ ; [out] A pointer to a DWORD that receives the number of mounted images. "ptr", DllStructGetPtr($pMountInfo), _ ; [out opt] Pointer to a variable that receives the array of mounted image structures. The size of the information written varies depending on the type of structured defined by the fInfoLevelId parameter. "dword", DllStructGetSize($pMountInfo), _ ; [in] The size of the buffer pointed to by the pMountInfo parameter, in bytes. "ptr", DllStructGetPtr($pcbReturnLength)) ; [out] A pointer to a variable in which the function returns the size of the requested information.

Has Someone an idea, how to get this function work please?

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>