T
the openFace
I am attempting to use the shell to display the properties page for a file,
yet I haven't been able to get it working. I made a class to call
ShellExecute through shown below:
class Win32Shell {
// omitted stuff
public const UInt32 SE_ERR_NOASSOC = 31;
// omitted
[DllImport("shell32.dll")]
public static extern Int32 ShellExecute(Int32 hwnd,
string lpOperation,
string lpFile,
string lpParameters,
string lpDirectory,
Int32 nShowCmd);
}
and later I call it with
Win32Shell.ShellExecute(0, "properties", fileName, dir, null, 1);
but all it does is return 31 qhich is defined in MSDN as "There is no
application associated with the given file name extension." I don't see why
this should be returned at all since the properties page is used for all
files on the system. Other calls, such as "open" using my ShellExecute
method work, so I can't figure this out.
Thanks for any help.
-the openFACE
yet I haven't been able to get it working. I made a class to call
ShellExecute through shown below:
class Win32Shell {
// omitted stuff
public const UInt32 SE_ERR_NOASSOC = 31;
// omitted
[DllImport("shell32.dll")]
public static extern Int32 ShellExecute(Int32 hwnd,
string lpOperation,
string lpFile,
string lpParameters,
string lpDirectory,
Int32 nShowCmd);
}
and later I call it with
Win32Shell.ShellExecute(0, "properties", fileName, dir, null, 1);
but all it does is return 31 qhich is defined in MSDN as "There is no
application associated with the given file name extension." I don't see why
this should be returned at all since the properties page is used for all
files on the system. Other calls, such as "open" using my ShellExecute
method work, so I can't figure this out.
Thanks for any help.
-the openFACE