Changeset 217 for trunk/src/helpers/winh.c
- Timestamp:
- Aug 30, 2002, 1:21:47 AM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/helpers/winh.c
r216 r217 67 67 #define INCL_WINCIRCULARSLIDER 68 68 #define INCL_WINSTDFILE 69 #define INCL_WINCLIPBOARD 69 70 70 71 #define INCL_SPL … … 4705 4706 4706 4707 /* 4708 *@@ winhSetClipboardText: 4709 * sets the clipboard data to the given text, 4710 * replacing the current clipboard contents. 4711 * 4712 *@@added V0.9.21 (2002-08-28) [umoeller] 4713 */ 4714 4715 BOOL winhSetClipboardText(HAB hab, 4716 PCSZ pcsz, 4717 ULONG cbSize) // in: size of buffer INCLUDING null byte 4718 { 4719 BOOL fSuccess = FALSE; 4720 4721 if (WinOpenClipbrd(hab)) 4722 { 4723 PSZ pszDest; 4724 if (!DosAllocSharedMem((PVOID*)&pszDest, 4725 NULL, 4726 cbSize, 4727 PAG_WRITE | PAG_COMMIT | OBJ_GIVEABLE)) 4728 { 4729 memcpy(pszDest, 4730 pcsz, 4731 cbSize); 4732 4733 WinEmptyClipbrd(hab); 4734 4735 fSuccess = WinSetClipbrdData(hab, // anchor-block handle 4736 (ULONG)pszDest, // pointer to text data 4737 CF_TEXT, // data is in text format 4738 CFI_POINTER); // passing a pointer 4739 4740 // PMREF says (implicitly) it is not necessary to call 4741 // DosFreeMem. I hope that is correct. 4742 // V0.9.19 (2002-06-02) [umoeller] 4743 } 4744 4745 WinCloseClipbrd(hab); 4746 } 4747 4748 return fSuccess; 4749 } 4750 4751 /* 4707 4752 *@@category: Helpers\PM helpers\Extended frame windows 4708 4753 */ … … 4953 4998 { 4954 4999 // allocate buffer 4955 pObjClass = (POBJCLASS)malloc(ulSize +1);5000 pObjClass = (POBJCLASS)malloc(ulSize + 1); 4956 5001 // and load the classes into it 4957 5002 WinEnumObjectClasses(pObjClass, &ulSize); 4958 5003 } 4959 5004 4960 return ( (PBYTE)pObjClass);5005 return (PBYTE)pObjClass; 4961 5006 } 4962 5007
Note:
See TracChangeset
for help on using the changeset viewer.