#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <assert.h>
#include <Windows.h>
int main()
{
char *url, *pData;
size_t length;
OpenClipboard(NULL);
HANDLE hData = GetClipboardData(CF_TEXT);
assert(hData!=NULL);
length = GlobalSize(hData);
url = (char*)malloc(length+1);
pData = (char*)GlobalLock(hData);
strcpy(url,pData);
GlobalUnlock(hData);
CloseClipboard();
url[length] = 0;
printf("%s\n",url);
getchar();
}