How to use clipboard in WINCE600 device driver. RRS feed

  • Question

  • Hi all,

    I have one question.

    I used clipboard in stream driver of WINCE500.

    Clipboard was working well.

    I change my platform to WINCE600 from WINCE500, but driver code are almost not changed.

    At this time, clipboard doesn't work.

    I used same code in WINCE500 and WINCE600.

    Code is like below.

    	TCHAR szTemp[MAX_PATH] = _T("1234567890");
    	TCHAR *str;
    		clipbuffer = GlobalAlloc(GHND, MAX_PATH);
    		str = (TCHAR *) GlobalLock(clipbuffer);
    		wcscpy(str, szTemp);
    		if(SetClipboardData(CF_UNICODETEXT, clipbuffer))			
    			RETAILMSG(DBGZ, (_T("[BCD0]	SetClipboardData(SUCCESS)\r\n")));
    			RETAILMSG(DBGZ, (_T("[BCD0]	SetClipboardData(FAIL : %#X)\r\n"), GetLastError()));
    		keybd_event(VK_CONTROL, MapVirtualKey(VK_CONTROL, 0), KEYEVENTF_SILENT, 0);
    		keybd_event('V', MapVirtualKey('V', 0), KEYEVENTF_SILENT, 0);
    		keybd_event(VK_CONTROL, MapVirtualKey(VK_CONTROL, 0), KEYEVENTF_KEYUP, 0);

    When I called SetClipboardData function, the function return FAIL(GetLastError is ERROR_OUTOFMEMORY).

    I guess WINCE600 have user and kernel mode so it's cause of error.

    Of course, same code work well in application level.(I tested via VS2005).

    I don't know what are difference of WINCE500 and WINCE600.

    I have no idia of how to use clipboard in device driver of WINCE600.


    Regards / Jin.

    Monday, February 20, 2012 7:44 AM

All replies

  • Are you running the WINCE600 driver in kernel mode or in user mode? 

    Luca Calligaris lucaDOTcalligarisATeurotechDOTcom Check my blog:

    Monday, February 20, 2012 1:53 PM
  • Sorry, My reply too late.

    Driver running on kernel mode.

    Tuesday, February 21, 2012 1:06 AM
  • Try running it in user mode if it's possible modifying the .bib and .reg files

    Luca Calligaris lucaDOTcalligarisATeurotechDOTcom Check my blog:

    Tuesday, February 21, 2012 7:04 AM
  • I changed .reg and .bib for user mode, but driver did not activated.

    .reg file changed like below.




    "Index"=dword:1 "Order"=dword:25


    "Flags"=dword:00000010 ;change flags

    "UserProcGroup"=dword:00000003 ; allocate user group

    .bib file changed like below.


    If i have some misstake, please let mo know.

    Thank for your advice.

    • Edited by Jin.Lee Tuesday, February 21, 2012 9:31 AM
    Tuesday, February 21, 2012 9:29 AM

    is equivalent to




    Try only


    Luca Calligaris lucaDOTcalligarisATeurotechDOTcom Check my blog:

    Tuesday, February 21, 2012 10:03 AM
  • Dear Luca.

    Thank for your kindly advice.

    The driver running on user mode at then clipboard working well.

    Thank you.

    Tuesday, February 21, 2012 12:55 PM