Jump to content
Sign in to follow this  

Creating Objects From Pointers

Recommended Posts


Hi,I'm trying to create a wrapper to the IContextMenu interface,but it needs an IShellFolder object from the wanted folder.

I want to get it from the desktops folder object(Got as a pointer in a structure passed to SHGetDesktopFolder),but i can't invoke any of it's properties/methods because AU3 does not identify it as an object.

Like in this example:

$tDesktopFolder = DllStructCreate("ptr")

$oDesktopFolder = DllStructGetData($tDesktopFolder,1)
; Pointer was allocated

Local $tPIDL = DllStructCreate("ptr")
;use autoexec.bat because all Win versions have it
$iRet = $oDesktopFolder.ParseDisplayName(0,0,"C:\autoexec.bat",0,DllStructGetPTR($tPIDL),0

Is this possible within AU3?If not,does anybody know an easier way to obtain shell's context menu for a specified file/folder? Thank You.

Share this post

Link to post
Share on other sites

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

Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.