public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* creating shortcuts.. question
@ 2001-12-07 12:43 Laszlo Vecsey
  2001-12-07 13:27 ` Larry Hall (RFK Partners, Inc)
  0 siblings, 1 reply; 4+ messages in thread
From: Laszlo Vecsey @ 2001-12-07 12:43 UTC (permalink / raw)
  To: cygwin

I'm using the CreateLink example from the platform sdk but I'm having
trouble getting it to work. I checked the archives and there were three
posts related to this but not enough to help me, I need some clarification
on one of them too.

I've made a short example of where I'm left running into trouble -- this is
run against the latest cygwin for windows as I've just upgraded it with
setup again this morning.

--
#include <windows.h>
#include <shlobj.h>

int main() {

     IShellLink* psl;

        psl->SetPath("testing");
        psl->SetDescription("string");

        }

--
gcc conf1.c -o conf1 -lshell32
conf1.c: In function 'main':
conf1.c:8: structure has no member named 'SetPath'
conf1.c:9: structure has no member named 'SetDescription'

I checked the include files and they do show STDMETHOD wrappers within the
IShellLinkA and IShellLinkW structures. I compiled with -save-temps as well
and they show up in the conf1.i file as follows:

 HRESULT(__attribute__((__stdcall__))   * Resolve ) (IShellLinkA  *,
HWND,DWORD)  ;
 HRESULT(__attribute__((__stdcall__))   * SetPath ) (IShellLinkA  *,
LPCSTR)  ;

Does everything look correct? I realize the above C example won't do
anything functional however I'm confused as to whats causing it to fail
compiling.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: creating shortcuts.. question
  2001-12-07 12:43 creating shortcuts.. question Laszlo Vecsey
@ 2001-12-07 13:27 ` Larry Hall (RFK Partners, Inc)
  2001-12-07 13:44   ` Laszlo Vecsey
  0 siblings, 1 reply; 4+ messages in thread
From: Larry Hall (RFK Partners, Inc) @ 2001-12-07 13:27 UTC (permalink / raw)
  To: Laszlo Vecsey, cygwin

At 03:13 PM 12/7/2001, Laszlo Vecsey wrote:
>I'm using the CreateLink example from the platform sdk but I'm having
>trouble getting it to work. I checked the archives and there were three
>posts related to this but not enough to help me, I need some clarification
>on one of them too.
>
>I've made a short example of where I'm left running into trouble -- this is
>run against the latest cygwin for windows as I've just upgraded it with
>setup again this morning.
>
>--
>#include <windows.h>
>#include <shlobj.h>
>
>int main() {
>
>      IShellLink* psl;
>
>         psl->SetPath("testing");
>         psl->SetDescription("string");
>
>         }
>
>--
>gcc conf1.c -o conf1 -lshell32
>conf1.c: In function 'main':
>conf1.c:8: structure has no member named 'SetPath'
>conf1.c:9: structure has no member named 'SetDescription'
>
>I checked the include files and they do show STDMETHOD wrappers within the
>IShellLinkA and IShellLinkW structures. I compiled with -save-temps as well
>and they show up in the conf1.i file as follows:
>
>  HRESULT(__attribute__((__stdcall__))   * Resolve ) (IShellLinkA  *,
>HWND,DWORD)  ;
>  HRESULT(__attribute__((__stdcall__))   * SetPath ) (IShellLinkA  *,
>LPCSTR)  ;
>
>Does everything look correct? I realize the above C example won't do
>anything functional however I'm confused as to whats causing it to fail
>compiling.



Why don't you look at the Cygwin DLL source and see how it's done there?



Larry Hall                              lhall@rfk.com
RFK Partners, Inc.                      http://www.rfk.com
838 Washington Street                   (508) 893-9779 - RFK Office
Holliston, MA 01746                     (508) 893-9889 - FAX


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: creating shortcuts.. question
  2001-12-07 13:27 ` Larry Hall (RFK Partners, Inc)
@ 2001-12-07 13:44   ` Laszlo Vecsey
  2001-12-07 14:22     ` Larry Hall (RFK Partners, Inc)
  0 siblings, 1 reply; 4+ messages in thread
From: Laszlo Vecsey @ 2001-12-07 13:44 UTC (permalink / raw)
  To: cygwin


----- Original Message -----
From: "Larry Hall (RFK Partners, Inc)" <lhall@rfk.com>
>
>
> Why don't you look at the Cygwin DLL source and see how it's done there?
>
>

Theres really no place in the cygwin dll where it would exist, and I just
checked to be sure. I'm looking to create the ~700byte windows shortcut .lnk
files and not a symbolic link.. I should have made pointed that out in my
first message :)



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: creating shortcuts.. question
  2001-12-07 13:44   ` Laszlo Vecsey
@ 2001-12-07 14:22     ` Larry Hall (RFK Partners, Inc)
  0 siblings, 0 replies; 4+ messages in thread
From: Larry Hall (RFK Partners, Inc) @ 2001-12-07 14:22 UTC (permalink / raw)
  To: Laszlo Vecsey, cygwin

At 04:36 PM 12/7/2001, Laszlo Vecsey wrote:

>----- Original Message -----
>From: "Larry Hall (RFK Partners, Inc)" <lhall@rfk.com>
> >
> >
> > Why don't you look at the Cygwin DLL source and see how it's done there?
> >
> >
>
>Theres really no place in the cygwin dll where it would exist, and I just
>checked to be sure. I'm looking to create the ~700byte windows shortcut .lnk
>files and not a symbolic link.. I should have made pointed that out in my
>first message :)



So you're saying that the code which Cygwin uses to make it's symbolic 
links via the Windows shortcut mechanism is not specific enough for your
situation?  If so, then you probably want to look to the Microsoft site 
(i.e. the MSDN).  And actually, this is really off-topic for this list, 
considering that you're trying to create something using MS APIs for a 
purpose unrelated to Cygwin.




Larry Hall                              lhall@rfk.com
RFK Partners, Inc.                      http://www.rfk.com
838 Washington Street                   (508) 893-9779 - RFK Office
Holliston, MA 01746                     (508) 893-9889 - FAX


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-12-07 21:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-07 12:43 creating shortcuts.. question Laszlo Vecsey
2001-12-07 13:27 ` Larry Hall (RFK Partners, Inc)
2001-12-07 13:44   ` Laszlo Vecsey
2001-12-07 14:22     ` Larry Hall (RFK Partners, Inc)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).