Hi..
I am using the SHObjectProperties. I have written the code as:
public partial class Form1 : Form{
[
DllImport("shell32.dll", EntryPoint = "SHObjectProperties", CharSet = CharSet.Auto)] public static extern bool CallPropDialog(IntPtr hwnd, GetProperties dwType, string szObject, string szPage); public enum GetProperties{
SHOP_PRINTERNAME = 0x00000001,
// lpObject points to a printer friendly nameSHOP_FILEPATH = 0x00000002,
// lpObject points to a fully qualified path+file nameSHOP_VOLUMEGUID = 0x00000004
// lpObject points to a Volume GUID};
private void Form1_Load(object sender, EventArgs e)
{
CallPropDialog ( this.Handle , GetProperties.SHOP_FILEPATH , "c:\\Windows",null);
}
}
I am getting an error as : Unable to find an entry point named 'SHObjectProperties' in DLL 'shell32.dll'.
Could anyone please help in correcting this error..

Unable to find SHObjectProperties
Mike Hadlow
Steve Jackson
What it does is open the Properties window.
EisenB
Just replace the 3rd parameter with:
System.Reflection.Assembly.GetExecutingAssembly().Location
Starfish2000
I am using windows 2000 professional service pack 4.
I have one more query. Does the SHObjectProperties return the folder name, size,Type,location, and created informations as we see in the property
2006
Hi..
I tried the same code in windows xp machine and it worked properly. Thank you.
I have a small query., I used the code:
CallPropDialog ( this.Handle , GetProperties.SHOP_FILEPATH , "c:\\Windows\\notepad.exe",null);
which got the notepad's property. Is it possible to pass my application's exe, rather than "c:\\windows\\notepad.exe" , so that it opens my application, in which i have some other functionalities added .
losdude
Can you also verify the version numbers of the following libraries:
Both should be higher than version 5 as well if I am not mistaken.
kcchesnut
martin.kolarik
Can you look at the version number of the shell32.dll file in your %windir%\system32\ folder It should be version 5 at least (Starting with Windows 2000).