This is the mail archive of the cygwin@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Clipboard from Cygwin?


Dear Cygwin list,


    A while back Oliver Nittka sent me the C sourcecode of a Cygwin unix
command to grab the Windows clipboard.  He suggested I  compile  it  and
try  it out.  I would very much prefer not get involved in the headaches
of setting up the ability to actually _compile_ stuff  under  Cygwin  (I
just  want  the  power  of  the Unix tools on Windows, as a command line
user).  I have not been able to get a reply from Nittka recently, he may
be on holiday.


    Could  someone  instead  suggest  where  I  can  download this (or a
similar)  command,  pre-compiled?   Also,  how  does  one  use  Nittka's
'probe'?  Would it be for example,


        $ probe > clipboard.txt ?


With kind regards,


Sandy


P.S.  The source he originally sent:

------------------------------------------------------------- probe.c --
#include <stdio.h>
#include <windows.h>

int main() {
    HGLOBAL hglb; 
    LPSTR lpstr; 

    OpenClipboard(0);
    hglb = GetClipboardData(CF_TEXT); 
    lpstr = GlobalLock(hglb); 
 
    printf("%s",lpstr);
    GlobalUnlock(hglb); 
    CloseClipboard();
    return(0);
}
-- eof ------------------------------------------------------ probe.c --

-- 
Alexander Anderson

mailto :     lists  at  almide period demon period co dot uk
bud-nav:     http://www.explosive-alma-services-bolts.co.uk/
pgp-sig:  1B5A DF3D A3D9 B932 39EB  3F1B 981F 4110 27E1 64A4


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]