I am not fond of the WIN10 implimentation of the "OPEN WITH" window; so I decided to "roll my own." In an attempt to discover where windows gets its information I first tried the routine presented in the "Programming" topic "PBCC vs. PBWIN"; however, I could never get the routine to function properly in my PBWIN10 although it functioned properly in PBCC6.
Although I am not familiar with "COM" and am not fond of OOP(Object Oriented Programming) I decided to try it in an attempt to get PBWIN10 to properly process the link files in C:\users\public\desktop. As a consequence the attached zip file is my first attempt at using "COM."
On my system it works fairly well; however, the IShellLink.GetArguments method (supposed to return the command line argument of the target app) appears to fail. This may be because (not particularly in this order):
1. I have mis-interpreted what the input should be
2. I have mis-interpreted what the output shold be
3. My registry is somewhat corrupted
4. The method is poorly designed
Another item I have found is that this:
producess a GPF (tried to read an ivalid address) in my PBWIN10 compiler but does not do so in my PBCC6 compiler. According to MS IShellLink is inherited from the base class IUNKNOWN. Therefore the Release method should be callable without a formal Iunknown prototype.
Perhaps one or more of you more knowledgeable persons can point out where I have gone wrong in function FN_GetCmdLine.
PS: Parts of the FN_ code is translated from an example from gethub.
BROWSE_LINKS.ZIP
Thank you.
Although I am not familiar with "COM" and am not fond of OOP(Object Oriented Programming) I decided to try it in an attempt to get PBWIN10 to properly process the link files in C:\users\public\desktop. As a consequence the attached zip file is my first attempt at using "COM."
On my system it works fairly well; however, the IShellLink.GetArguments method (supposed to return the command line argument of the target app) appears to fail. This may be because (not particularly in this order):
1. I have mis-interpreted what the input should be
2. I have mis-interpreted what the output shold be
3. My registry is somewhat corrupted
4. The method is poorly designed
Another item I have found is that this:
Code:
IF Ok <> %S_OK THEN ShlLnk.Release PersFl.Release 'ShlLnk = NOTHING 'PersFl = NOTHING EXIT FUNCTION END IF
Perhaps one or more of you more knowledgeable persons can point out where I have gone wrong in function FN_GetCmdLine.
PS: Parts of the FN_ code is translated from an example from gethub.
BROWSE_LINKS.ZIP
Thank you.
Comment