- Merge from trunk up to r45543
[reactos.git] / dll / win32 / gdi32 / misc / stubs.c
1 /*
2 * dll/win32/gdi32/misc/stubs.c
3 *
4 * GDI32.DLL Stubs
5 *
6 * When you implement one of these functions,
7 * remove its stub from this file.
8 *
9 */
10
11 #include "precomp.h"
12 #include <debug.h>
13
14 #define SIZEOF_DEVMODEA_300 124
15 #define SIZEOF_DEVMODEA_400 148
16 #define SIZEOF_DEVMODEA_500 156
17 #define SIZEOF_DEVMODEW_300 188
18 #define SIZEOF_DEVMODEW_400 212
19 #define SIZEOF_DEVMODEW_500 220
20
21 /*
22 * @unimplemented
23 */
24 BOOL
25 WINAPI
26 RestoreDC(IN HDC hdc,
27 IN INT iLevel)
28 {
29 /* FIXME Sharememory */
30 return NtGdiRestoreDC(hdc, iLevel);
31 }
32
33 /*
34 * @unimplemented
35 */
36 INT
37 WINAPI
38 SaveDC(IN HDC hdc)
39 {
40 /* FIXME Sharememory */
41 return NtGdiSaveDC(hdc);
42 }
43
44 /*
45 * @implemented
46 */
47 BOOL
48 WINAPI
49 CancelDC(HDC hDC)
50 {
51 PDC_ATTR pDc_Attr;
52
53 if (GDI_HANDLE_GET_TYPE(hDC) != GDI_OBJECT_TYPE_DC &&
54 GDI_HANDLE_GET_TYPE(hDC) != GDI_OBJECT_TYPE_METADC )
55 {
56 PLDC pLDC = GdiGetLDC(hDC);
57 if ( !pLDC )
58 {
59 SetLastError(ERROR_INVALID_HANDLE);
60 return FALSE;
61 }
62 /* If a document has started set it to die. */
63 if (pLDC->Flags & LDC_INIT_DOCUMENT) pLDC->Flags |= LDC_KILL_DOCUMENT;
64
65 return NtGdiCancelDC(hDC);
66 }
67
68 if (GdiGetHandleUserData((HGDIOBJ) hDC, GDI_OBJECT_TYPE_DC, (PVOID) &pDc_Attr))
69 {
70 pDc_Attr->ulDirty_ &= ~DC_PLAYMETAFILE;
71 return TRUE;
72 }
73
74 return FALSE;
75 }
76
77
78 /*
79 * @implemented
80 */
81 int
82 WINAPI
83 DrawEscape(HDC hDC,
84 INT nEscape,
85 INT cbInput,
86 LPCSTR lpszInData)
87 {
88 if (GDI_HANDLE_GET_TYPE(hDC) == GDI_OBJECT_TYPE_DC)
89 return NtGdiDrawEscape(hDC, nEscape, cbInput, (LPSTR) lpszInData);
90
91 if (GDI_HANDLE_GET_TYPE(hDC) != GDI_OBJECT_TYPE_METADC)
92 {
93 PLDC pLDC = GdiGetLDC(hDC);
94 if ( pLDC )
95 {
96 if (pLDC->Flags & LDC_META_PRINT)
97 {
98 // if (nEscape != QUERYESCSUPPORT)
99 // return EMFDRV_WriteEscape(hDC, nEscape, cbInput, lpszInData, EMR_DRAWESCAPE);
100
101 return NtGdiDrawEscape(hDC, nEscape, cbInput, (LPSTR) lpszInData);
102 }
103 }
104 SetLastError(ERROR_INVALID_HANDLE);
105 }
106 return 0;
107 }
108
109
110 /*
111 * @implemented
112 */
113 int
114 WINAPI
115 EnumObjects(HDC hdc,
116 int nObjectType,
117 GOBJENUMPROC lpObjectFunc,
118 LPARAM lParam)
119 {
120 ULONG ObjectsCount;
121 ULONG Size;
122 PVOID Buffer = NULL;
123 DWORD_PTR EndOfBuffer;
124 int Result = 0;
125
126 switch (nObjectType)
127 {
128 case OBJ_BRUSH:
129 Size = sizeof(LOGBRUSH);
130 break;
131
132 case OBJ_PEN:
133 Size = sizeof(LOGPEN);
134 break;
135
136 default:
137 SetLastError(ERROR_INVALID_PARAMETER);
138 return 0;
139 }
140
141 ObjectsCount = NtGdiEnumObjects(hdc, nObjectType, 0, NULL);
142 if (!ObjectsCount) return 0;
143
144 Buffer = HeapAlloc(GetProcessHeap(), 0, ObjectsCount * Size);
145 if (!Buffer)
146 {
147 SetLastError(ERROR_NOT_ENOUGH_MEMORY);
148 return 0;
149 }
150
151 if (!NtGdiEnumObjects(hdc, nObjectType, ObjectsCount * Size, Buffer))
152 {
153 HeapFree(GetProcessHeap(), 0, Buffer);
154 return 0;
155 }
156
157 EndOfBuffer = (DWORD_PTR)Buffer + (ObjectsCount * Size);
158 while ((DWORD_PTR)Buffer < EndOfBuffer)
159 {
160 Result = lpObjectFunc(Buffer, lParam);
161 if (!Result) break;
162 Buffer = (PVOID)((DWORD_PTR)Buffer + Size);
163 }
164
165 HeapFree(GetProcessHeap(), 0, Buffer);
166 return Result;
167 }
168
169 /*
170 * @implemented
171 */
172 UINT
173 WINAPI
174 GetBoundsRect(
175 HDC hdc,
176 LPRECT lprcBounds,
177 UINT flags
178 )
179 {
180 return NtGdiGetBoundsRect(hdc,lprcBounds,flags & DCB_RESET);
181 }
182
183 /*
184 * @unimplemented
185 */
186 UINT
187 WINAPI
188 GetMetaFileBitsEx(
189 HMETAFILE a0,
190 UINT a1,
191 LPVOID a2
192 )
193 {
194 UNIMPLEMENTED;
195 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
196 return 0;
197 }
198
199 /*
200 * @unimplemented
201 */
202 BOOL
203 WINAPI
204 PlayMetaFile(
205 HDC a0,
206 HMETAFILE a1
207 )
208 {
209 UNIMPLEMENTED;
210 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
211 return FALSE;
212 }
213
214 /*
215 * @implemented
216 */
217 UINT
218 WINAPI
219 SetBoundsRect(HDC hdc,
220 CONST RECT *prc,
221 UINT flags)
222 {
223 /* FIXME add check for validate the flags */
224 return NtGdiSetBoundsRect(hdc, (LPRECT)prc, flags);
225 }
226
227 /*
228 * @unimplemented
229 */
230 HMETAFILE
231 WINAPI
232 SetMetaFileBitsEx(
233 UINT size,
234 CONST BYTE *lpData
235 )
236 {
237 const METAHEADER *mh_in = (const METAHEADER *)lpData;
238
239 if (size & 1) return 0;
240
241 if (!size || mh_in->mtType != METAFILE_MEMORY || mh_in->mtVersion != 0x300 ||
242 mh_in->mtHeaderSize != sizeof(METAHEADER) / 2)
243 {
244 SetLastError(ERROR_INVALID_DATA);
245 return 0;
246 }
247
248 UNIMPLEMENTED;
249 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
250 return 0;
251 }
252
253 /*
254 * @unimplemented
255 */
256 BOOL
257 WINAPI
258 PlayMetaFileRecord(
259 HDC a0,
260 LPHANDLETABLE a1,
261 LPMETARECORD a2,
262 UINT a3
263 )
264 {
265 UNIMPLEMENTED;
266 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
267 return FALSE;
268 }
269
270
271 /*
272 * @unimplemented
273 */
274 BOOL
275 WINAPI
276 EnumMetaFile(
277 HDC a0,
278 HMETAFILE a1,
279 MFENUMPROC a2,
280 LPARAM a3
281 )
282 {
283 UNIMPLEMENTED;
284 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
285 return FALSE;
286 }
287
288 /*
289 * @unimplemented
290 */
291 BOOL
292 WINAPI
293 DeleteEnhMetaFile(
294 HENHMETAFILE a0
295 )
296 {
297 UNIMPLEMENTED;
298 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
299 return FALSE;
300 }
301
302 /*
303 * @unimplemented
304 */
305 BOOL
306 WINAPI
307 EnumEnhMetaFile(
308 HDC hdc,
309 HENHMETAFILE hmf,
310 ENHMFENUMPROC callback,
311 LPVOID data,
312 CONST RECT *lpRect
313 )
314 {
315 if(!lpRect && hdc)
316 {
317 SetLastError(ERROR_INVALID_PARAMETER);
318 return FALSE;
319 }
320
321 UNIMPLEMENTED;
322 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
323 return FALSE;
324 }
325
326 /*
327 * @unimplemented
328 */
329 UINT
330 WINAPI
331 GetEnhMetaFileBits(
332 HENHMETAFILE a0,
333 UINT a1,
334 LPBYTE a2
335 )
336 {
337 UNIMPLEMENTED;
338 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
339 return 0;
340 }
341
342
343 /*
344 * @unimplemented
345 */
346 UINT
347 WINAPI
348 GetEnhMetaFileHeader(
349 HENHMETAFILE a0,
350 UINT a1,
351 LPENHMETAHEADER a2
352 )
353 {
354 UNIMPLEMENTED;
355 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
356 return 0;
357 }
358
359 /*
360 * @unimplemented
361 */
362 UINT
363 WINAPI
364 GetEnhMetaFilePaletteEntries(
365 HENHMETAFILE a0,
366 UINT a1,
367 LPPALETTEENTRY a2
368 )
369 {
370 UNIMPLEMENTED;
371 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
372 return 0;
373 }
374
375 /*
376 * @unimplemented
377 */
378 UINT
379 WINAPI
380 GetWinMetaFileBits(
381 HENHMETAFILE a0,
382 UINT a1,
383 LPBYTE a2,
384 INT a3,
385 HDC a4
386 )
387 {
388 UNIMPLEMENTED;
389 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
390 return 0;
391 }
392
393
394 /*
395 * @unimplemented
396 */
397 BOOL
398 WINAPI
399 PlayEnhMetaFile(
400 HDC a0,
401 HENHMETAFILE a1,
402 CONST RECT *a2
403 )
404 {
405 UNIMPLEMENTED;
406 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
407 return FALSE;
408 }
409
410
411 /*
412 * @unimplemented
413 */
414 BOOL
415 WINAPI
416 PlayEnhMetaFileRecord(
417 HDC a0,
418 LPHANDLETABLE a1,
419 CONST ENHMETARECORD *a2,
420 UINT a3
421 )
422 {
423 UNIMPLEMENTED;
424 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
425 return FALSE;
426 }
427
428
429 /*
430 * @unimplemented
431 */
432 HENHMETAFILE
433 WINAPI
434 SetEnhMetaFileBits(
435 UINT a0,
436 CONST BYTE *a1
437 )
438 {
439 UNIMPLEMENTED;
440 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
441 return 0;
442 }
443
444
445 /*
446 * @unimplemented
447 */
448 HENHMETAFILE
449 WINAPI
450 SetWinMetaFileBits(
451 UINT a0,
452 CONST BYTE *a1,
453 HDC a2,
454 CONST METAFILEPICT *a3)
455 {
456 UNIMPLEMENTED;
457 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
458 return 0;
459 }
460
461
462 /*
463 * @unimplemented
464 */
465 BOOL
466 WINAPI
467 GdiComment(
468 HDC hDC,
469 UINT bytes,
470 CONST BYTE *buffer
471 )
472 {
473 #if 0
474 if (GDI_HANDLE_GET_TYPE(hDC) == GDI_OBJECT_TYPE_EMF)
475 {
476 PLDC pLDC = GdiGetLDC(hDC);
477 if ( !pLDC )
478 {
479 SetLastError(ERROR_INVALID_HANDLE);
480 return FALSE;
481 }
482 if (pLDC->iType == LDC_EMFLDC)
483 { // Wine port
484 return EMFDRV_GdiComment( hDC, bytes, buffer );
485 }
486 }
487 #endif
488 return FALSE;
489 }
490
491
492 /*
493 * @unimplemented
494 */
495 BOOL
496 WINAPI
497 SetColorAdjustment(
498 HDC hdc,
499 CONST COLORADJUSTMENT *a1
500 )
501 {
502 UNIMPLEMENTED;
503 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
504 return FALSE;
505 }
506
507 /*
508 * @implemented
509 */
510 BOOL
511 WINAPI
512 UnrealizeObject(HGDIOBJ hgdiobj)
513 {
514 BOOL retValue = TRUE;
515 /*
516 Win 2k Graphics API, Black Book. by coriolis.com
517 Page 62, Note that Steps 3, 5, and 6 are not required for Windows NT(tm)
518 and Windows 2000(tm).
519
520 Step 5. UnrealizeObject(hTrackBrush);
521 */
522 /*
523 msdn.microsoft.com,
524 "Windows 2000/XP: If hgdiobj is a brush, UnrealizeObject does nothing,
525 and the function returns TRUE. Use SetBrushOrgEx to set the origin of
526 a brush."
527 */
528 if (GDI_HANDLE_GET_TYPE(hgdiobj) != GDI_OBJECT_TYPE_BRUSH)
529 {
530 retValue = NtGdiUnrealizeObject(hgdiobj);
531 }
532
533 return retValue;
534 }
535
536
537 /*
538 * @implemented
539 */
540 BOOL
541 WINAPI
542 GdiFlush()
543 {
544 NtGdiFlush();
545 return TRUE;
546 }
547
548
549 /*
550 * @unimplemented
551 */
552 int
553 WINAPI
554 SetICMMode(
555 HDC hdc,
556 int iEnableICM
557 )
558 {
559 /*FIXME: Assume that ICM is always off, and cannot be turned on */
560 if (iEnableICM == ICM_OFF) return ICM_OFF;
561 if (iEnableICM == ICM_ON) return 0;
562 if (iEnableICM == ICM_QUERY) return ICM_OFF;
563
564 UNIMPLEMENTED;
565 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
566 return 0;
567 }
568
569
570 /*
571 * @unimplemented
572 */
573 BOOL
574 WINAPI
575 CheckColorsInGamut(
576 HDC a0,
577 LPVOID a1,
578 LPVOID a2,
579 DWORD a3
580 )
581 {
582 UNIMPLEMENTED;
583 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
584 return FALSE;
585 }
586
587
588 /*
589 * @implemented
590 */
591 BOOL
592 WINAPI
593 GetDeviceGammaRamp( HDC hdc,
594 LPVOID lpGammaRamp)
595 {
596 BOOL retValue = FALSE;
597 if (lpGammaRamp == NULL)
598 {
599 SetLastError(ERROR_INVALID_PARAMETER);
600 }
601 else
602 {
603 retValue = NtGdiGetDeviceGammaRamp(hdc,lpGammaRamp);
604 }
605
606 return retValue;
607 }
608
609 /*
610 * @implemented
611 */
612 BOOL
613 WINAPI
614 SetDeviceGammaRamp(HDC hdc,
615 LPVOID lpGammaRamp)
616 {
617 BOOL retValue = FALSE;
618
619 if (lpGammaRamp)
620 {
621 retValue = NtGdiSetDeviceGammaRamp(hdc, lpGammaRamp);
622 }
623 else
624 {
625 SetLastError(ERROR_INVALID_PARAMETER);
626 }
627
628 return retValue;
629 }
630
631
632 /*
633 * @unimplemented
634 */
635 BOOL
636 WINAPI
637 ColorMatchToTarget(
638 HDC a0,
639 HDC a1,
640 DWORD a2
641 )
642 {
643 UNIMPLEMENTED;
644 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
645 return FALSE;
646 }
647
648 /* === AFTER THIS POINT I GUESS... =========
649 * (based on stack size in Norlander's .def)
650 * === WHERE ARE THEY DEFINED? =============
651 */
652
653 /*
654 * @unimplemented
655 */
656 DWORD
657 WINAPI
658 IsValidEnhMetaRecord(
659 DWORD a0,
660 DWORD a1
661 )
662 {
663 UNIMPLEMENTED;
664 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
665 return 0;
666
667 }
668
669 /*
670 * @unimplemented
671 */
672 DWORD
673 WINAPI
674 IsValidEnhMetaRecordOffExt(
675 DWORD a0,
676 DWORD a1,
677 DWORD a2,
678 DWORD a3
679 )
680 {
681 UNIMPLEMENTED;
682 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
683 return 0;
684
685 }
686
687 /*
688 * @unimplemented
689 */
690 DWORD
691 WINAPI
692 GetGlyphOutlineWow(
693 DWORD a0,
694 DWORD a1,
695 DWORD a2,
696 DWORD a3,
697 DWORD a4,
698 DWORD a5,
699 DWORD a6
700 )
701 {
702 UNIMPLEMENTED;
703 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
704 return 0;
705 }
706
707 /*
708 * @unimplemented
709 */
710 DWORD
711 WINAPI
712 gdiPlaySpoolStream(
713 DWORD a0,
714 DWORD a1,
715 DWORD a2,
716 DWORD a3,
717 DWORD a4,
718 DWORD a5
719 )
720 {
721 UNIMPLEMENTED;
722 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
723 return 0;
724 }
725
726 /*
727 * @implemented
728 */
729 HANDLE
730 WINAPI
731 AddFontMemResourceEx(
732 PVOID pbFont,
733 DWORD cbFont,
734 PVOID pdv,
735 DWORD *pcFonts
736 )
737 {
738 if ( pbFont && cbFont && pcFonts)
739 {
740 return NtGdiAddFontMemResourceEx(pbFont, cbFont, NULL, 0, pcFonts);
741 }
742 SetLastError(ERROR_INVALID_PARAMETER);
743 return NULL;
744 }
745
746 /*
747 * @unimplemented
748 */
749 int
750 WINAPI
751 AddFontResourceTracking(
752 LPCSTR lpString,
753 int unknown
754 )
755 {
756 UNIMPLEMENTED;
757 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
758 return 0;
759 }
760
761
762
763 /*
764 * @unimplemented
765 */
766 HBITMAP
767 WINAPI
768 ClearBitmapAttributes(HBITMAP hbm, DWORD dwFlags)
769 {
770 UNIMPLEMENTED;
771 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
772 return 0;
773 }
774
775 /*
776 * @unimplemented
777 */
778 HBRUSH
779 WINAPI
780 ClearBrushAttributes(HBRUSH hbm, DWORD dwFlags)
781 {
782 UNIMPLEMENTED;
783 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
784 return 0;
785 }
786
787 /*
788 * @unimplemented
789 */
790 BOOL
791 WINAPI
792 ColorCorrectPalette(HDC hDC,HPALETTE hPalette,DWORD dwFirstEntry,DWORD dwNumOfEntries)
793 {
794 UNIMPLEMENTED;
795 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
796 return 0;
797 }
798
799 /*
800 * @unimplemented
801 */
802 BOOL
803 WINAPI
804 GdiArtificialDecrementDriver(LPWSTR pDriverName,BOOL unknown)
805 {
806 UNIMPLEMENTED;
807 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
808 return 0;
809 }
810
811 /*
812 * @implemented
813 */
814 BOOL
815 WINAPI
816 GdiCleanCacheDC(HDC hdc)
817 {
818 if (GDI_HANDLE_GET_TYPE(hdc) == GDILoObjType_LO_DC_TYPE)
819 return TRUE;
820 SetLastError(ERROR_INVALID_HANDLE);
821 return FALSE;
822 }
823
824 /*
825 * @implemented
826 */
827 HDC
828 WINAPI
829 GdiConvertAndCheckDC(HDC hdc)
830 {
831 PLDC pldc;
832 ULONG hType = GDI_HANDLE_GET_TYPE(hdc);
833 if (hType == GDILoObjType_LO_DC_TYPE || hType == GDILoObjType_LO_METADC16_TYPE)
834 return hdc;
835 pldc = GdiGetLDC(hdc);
836 if (pldc)
837 {
838 if (pldc->Flags & LDC_SAPCALLBACK) GdiSAPCallback(pldc);
839 if (pldc->Flags & LDC_KILL_DOCUMENT) return NULL;
840 if (pldc->Flags & LDC_STARTPAGE) StartPage(hdc);
841 return hdc;
842 }
843 SetLastError(ERROR_INVALID_HANDLE);
844 return NULL;
845 }
846
847 /*
848 * @unimplemented
849 */
850 HENHMETAFILE
851 WINAPI
852 GdiConvertEnhMetaFile(HENHMETAFILE hmf)
853 {
854 UNIMPLEMENTED;
855 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
856 return 0;
857 }
858
859 /*
860 * @unimplemented
861 */
862 BOOL
863 WINAPI
864 GdiDrawStream(HDC dc, ULONG l, VOID *v) // See Bug 4784
865 {
866 UNIMPLEMENTED;
867 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
868 return 0;
869 }
870
871 /*
872 * @implemented
873 */
874 BOOL
875 WINAPI
876 GdiIsMetaFileDC(HDC hDC)
877 {
878 if (GDI_HANDLE_GET_TYPE(hDC) != GDI_OBJECT_TYPE_DC)
879 {
880 if (GDI_HANDLE_GET_TYPE(hDC) == GDI_OBJECT_TYPE_METADC)
881 return TRUE;
882 else
883 {
884 PLDC pLDC = GdiGetLDC(hDC);
885 if ( !pLDC )
886 {
887 SetLastError(ERROR_INVALID_HANDLE);
888 return FALSE;
889 }
890 if ( pLDC->iType == LDC_EMFLDC) return TRUE;
891 }
892 }
893 return FALSE;
894 }
895
896 /*
897 * @implemented
898 */
899 BOOL
900 WINAPI
901 GdiIsMetaPrintDC(HDC hDC)
902 {
903
904 if (GDI_HANDLE_GET_TYPE(hDC) != GDI_OBJECT_TYPE_DC)
905 {
906 if (GDI_HANDLE_GET_TYPE(hDC) == GDI_OBJECT_TYPE_METADC)
907 return FALSE;
908 else
909 {
910 PLDC pLDC = GdiGetLDC(hDC);
911 if ( !pLDC )
912 {
913 SetLastError(ERROR_INVALID_HANDLE);
914 return FALSE;
915 }
916 if ( pLDC->Flags & LDC_META_PRINT) return TRUE;
917 }
918 }
919 return FALSE;
920 }
921
922 /*
923 * @implemented
924 */
925 BOOL
926 WINAPI
927 GdiIsPlayMetafileDC(HDC hDC)
928 {
929 PLDC pLDC = GdiGetLDC(hDC);
930 if ( pLDC )
931 {
932 if ( pLDC->Flags & LDC_PLAY_MFDC ) return TRUE;
933 }
934 return FALSE;
935 }
936
937 /*
938 * @implemented
939 */
940 BOOL
941 WINAPI
942 GdiValidateHandle(HGDIOBJ hobj)
943 {
944 PGDI_TABLE_ENTRY Entry = GdiHandleTable + GDI_HANDLE_GET_INDEX(hobj);
945 if ( (Entry->Type & GDI_ENTRY_BASETYPE_MASK) != 0 &&
946 ( (Entry->Type << GDI_ENTRY_UPPER_SHIFT) & GDI_HANDLE_TYPE_MASK ) ==
947 GDI_HANDLE_GET_TYPE(hobj) )
948 {
949 HANDLE pid = (HANDLE)((ULONG_PTR)Entry->ProcessId & ~0x1);
950 if(pid == NULL || pid == CurrentProcessId)
951 {
952 return TRUE;
953 }
954 }
955 return FALSE;
956
957 }
958
959 /*
960 * @unimplemented
961 */
962 DWORD
963 WINAPI
964 GetBitmapAttributes(HBITMAP hbm)
965 {
966 UNIMPLEMENTED;
967 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
968 return 0;
969 }
970
971 /*
972 * @unimplemented
973 */
974 DWORD
975 WINAPI
976 GetBrushAttributes(HBRUSH hbr)
977 {
978 UNIMPLEMENTED;
979 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
980 return 0;
981 }
982
983 /*
984 * @implemented
985 */
986 ULONG
987 WINAPI
988 GetEUDCTimeStamp(VOID)
989 {
990 return NtGdiGetEudcTimeStampEx(NULL,0,TRUE);
991 }
992
993 /*
994 * @implemented
995 */
996 ULONG
997 WINAPI
998 GetFontAssocStatus(HDC hdc)
999 {
1000 ULONG retValue = 0;
1001
1002 if (hdc)
1003 {
1004 retValue = NtGdiQueryFontAssocInfo(hdc);
1005 }
1006
1007 return retValue;
1008 }
1009
1010 /*
1011 * @implemented
1012 */
1013 BOOL
1014 WINAPI
1015 GetTextExtentExPointWPri(HDC hdc,
1016 LPWSTR lpwsz,
1017 ULONG cwc,
1018 ULONG dxMax,
1019 ULONG *pcCh,
1020 PULONG pdxOut,
1021 LPSIZE psize)
1022 {
1023 return NtGdiGetTextExtentExW(hdc,lpwsz,cwc,dxMax,pcCh,pdxOut,psize,0);
1024 }
1025
1026 /*
1027 * @unimplemented
1028 */
1029 DWORD
1030 WINAPI
1031 QueryFontAssocStatus(VOID)
1032 {
1033 UNIMPLEMENTED;
1034 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1035 return 0;
1036 }
1037
1038 /*
1039 * @implemented
1040 */
1041 BOOL
1042 WINAPI
1043 RemoveFontMemResourceEx(HANDLE fh)
1044 {
1045 if (fh)
1046 {
1047 return NtGdiRemoveFontMemResourceEx(fh);
1048 }
1049 SetLastError(ERROR_INVALID_PARAMETER);
1050 return FALSE;
1051 }
1052
1053 /*
1054 * @unimplemented
1055 */
1056 int
1057 WINAPI
1058 RemoveFontResourceTracking(LPCSTR lpString,int unknown)
1059 {
1060 UNIMPLEMENTED;
1061 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1062 return 0;
1063 }
1064
1065 /*
1066 * @unimplemented
1067 */
1068 HBITMAP
1069 WINAPI
1070 SetBitmapAttributes(HBITMAP hbm, DWORD dwFlags)
1071 {
1072 UNIMPLEMENTED;
1073 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1074 return 0;
1075 }
1076
1077 /*
1078 * @unimplemented
1079 */
1080 HBRUSH
1081 WINAPI
1082 SetBrushAttributes(HBRUSH hbm, DWORD dwFlags)
1083 {
1084 UNIMPLEMENTED;
1085 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1086 return 0;
1087 }
1088
1089 /*
1090 * @implemented
1091 */
1092 int
1093 WINAPI
1094 StartFormPage(HDC hdc)
1095 {
1096 return StartPage(hdc);
1097 }
1098
1099 /*
1100 * @unimplemented
1101 */
1102 VOID
1103 WINAPI
1104 UnloadNetworkFonts(DWORD unknown)
1105 {
1106 UNIMPLEMENTED;
1107 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1108 }
1109
1110 /*
1111 * @unimplemented
1112 */
1113 BOOL
1114 WINAPI
1115 GdiRealizationInfo(HDC hdc,
1116 PREALIZATION_INFO pri)
1117 {
1118 // ATM we do not support local font data and Language Pack.
1119 return NtGdiGetRealizationInfo(hdc, pri, (HFONT) NULL);
1120 }
1121
1122 /*
1123 * @implemented
1124 */
1125 BOOL
1126 WINAPI
1127 GetETM(HDC hdc,
1128 EXTTEXTMETRIC *petm)
1129 {
1130 BOOL Ret = NtGdiGetETM(hdc, petm);
1131
1132 if (Ret && petm)
1133 petm->emKernPairs = GetKerningPairsA(hdc, 0, 0);
1134
1135 return Ret;
1136 }
1137
1138 /*
1139 * @unimplemented
1140 */
1141 int
1142 WINAPI
1143 Escape(HDC hdc, INT nEscape, INT cbInput, LPCSTR lpvInData, LPVOID lpvOutData)
1144 {
1145 int retValue = SP_ERROR;
1146 HGDIOBJ hObject = hdc;
1147 UINT Type = 0;
1148 LPVOID pUserData = NULL;
1149
1150 Type = GDI_HANDLE_GET_TYPE(hObject);
1151
1152 if (Type == GDI_OBJECT_TYPE_METADC)
1153 {
1154 /* FIXME we do not support metafile */
1155 UNIMPLEMENTED;
1156 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1157 }
1158 else
1159 {
1160 switch (nEscape)
1161 {
1162 case ABORTDOC:
1163 /* Note Winodws check see if the handle have any user data for ABORTDOC command
1164 * ReactOS copy this behavior to be compatible with windows 2003
1165 */
1166 if ( (!GdiGetHandleUserData(hObject, (DWORD)Type, (PVOID) &pUserData)) ||
1167 (pUserData == NULL) )
1168 {
1169 GdiSetLastError(ERROR_INVALID_HANDLE);
1170 retValue = FALSE;
1171 }
1172 else
1173 {
1174 retValue = AbortDoc(hdc);
1175 }
1176 break;
1177
1178 case DRAFTMODE:
1179 case FLUSHOUTPUT:
1180 case SETCOLORTABLE:
1181 /* Note 1: DRAFTMODE, FLUSHOUTPUT, SETCOLORTABLE is outdated and been replace with other api */
1182 /* Note 2: Winodws check see if the handle have any user data for DRAFTMODE, FLUSHOUTPUT, SETCOLORTABLE command
1183 * ReactOS copy this behavior to be compatible with windows 2003
1184 */
1185 if ( (!GdiGetHandleUserData(hObject, (DWORD)Type, (PVOID) &pUserData)) ||
1186 (pUserData == NULL) )
1187 {
1188 GdiSetLastError(ERROR_INVALID_HANDLE);
1189 }
1190 retValue = FALSE;
1191 break;
1192
1193 case SETABORTPROC:
1194 /* Note : Winodws check see if the handle have any user data for DRAFTMODE, FLUSHOUTPUT, SETCOLORTABLE command
1195 * ReactOS copy this behavior to be compatible with windows 2003
1196 */
1197 if ( (!GdiGetHandleUserData(hObject, (DWORD)Type, (PVOID) &pUserData)) ||
1198 (pUserData == NULL) )
1199 {
1200 GdiSetLastError(ERROR_INVALID_HANDLE);
1201 retValue = FALSE;
1202 }
1203 retValue = SetAbortProc(hdc, (ABORTPROC)lpvInData);
1204 break;
1205
1206 case GETCOLORTABLE:
1207 retValue = GetSystemPaletteEntries(hdc, (UINT)*lpvInData, 1, (LPPALETTEENTRY)lpvOutData);
1208 if ( !retValue )
1209 {
1210 retValue = SP_ERROR;
1211 }
1212 break;
1213
1214 case ENDDOC:
1215 /* Note : Winodws check see if the handle have any user data for DRAFTMODE, FLUSHOUTPUT, SETCOLORTABLE command
1216 * ReactOS copy this behavior to be compatible with windows 2003
1217 */
1218 if ( (!GdiGetHandleUserData(hObject, (DWORD)Type, (PVOID) &pUserData)) ||
1219 (pUserData == NULL) )
1220 {
1221 GdiSetLastError(ERROR_INVALID_HANDLE);
1222 retValue = FALSE;
1223 }
1224 retValue = EndDoc(hdc);
1225 break;
1226
1227
1228 case GETSCALINGFACTOR:
1229 /* Note GETSCALINGFACTOR is outdated have been replace by GetDeviceCaps */
1230 if ( Type == GDI_OBJECT_TYPE_DC )
1231 {
1232 if ( lpvOutData )
1233 {
1234 PPOINT ptr = (PPOINT) lpvOutData;
1235 ptr->x = 0;
1236 ptr->y = 0;
1237 }
1238 }
1239 retValue = FALSE;
1240 break;
1241
1242 case GETEXTENDEDTEXTMETRICS:
1243 retValue = (int) GetETM( hdc, (EXTTEXTMETRIC *) lpvOutData) != 0;
1244 break;
1245
1246 case STARTDOC:
1247 {
1248 DOCINFOA *pUserDatalpdi;
1249 DOCINFOA lpdi;
1250
1251 /* Note : Winodws check see if the handle have any user data for STARTDOC command
1252 * ReactOS copy this behavior to be compatible with windows 2003
1253 */
1254 if ( (!GdiGetHandleUserData(hObject, (DWORD)Type, (PVOID) &pUserDatalpdi)) ||
1255 (pUserData == NULL) )
1256 {
1257 GdiSetLastError(ERROR_INVALID_HANDLE);
1258 retValue = FALSE;
1259 }
1260
1261 lpdi.cbSize = sizeof(DOCINFOA);
1262
1263 /* NOTE lpszOutput will be store in handle userdata */
1264 lpdi.lpszOutput = 0;
1265
1266 lpdi.lpszDatatype = 0;
1267 lpdi.fwType = 0;
1268 lpdi.lpszDocName = lpvInData;
1269
1270 /* NOTE : doc for StartDocA/W at msdn http://msdn2.microsoft.com/en-us/library/ms535793(VS.85).aspx */
1271 retValue = StartDocA(hdc, &lpdi);
1272
1273 /* StartDocA fail */
1274 if (retValue < 0)
1275 {
1276 /* check see if outbuffer contain any data, if it does abort */
1277 if ( (pUserDatalpdi->lpszOutput != 0) &&
1278 ( (*(WCHAR *)pUserDatalpdi->lpszOutput) != UNICODE_NULL) )
1279 {
1280 retValue = SP_APPABORT;
1281 }
1282 else
1283 {
1284 retValue = GetLastError();
1285
1286 /* Translate StartDocA error code to STARTDOC error code
1287 * see msdn http://msdn2.microsoft.com/en-us/library/ms535472.aspx
1288 */
1289 switch(retValue)
1290 {
1291 case ERROR_NOT_ENOUGH_MEMORY:
1292 retValue = SP_OUTOFMEMORY;
1293 break;
1294
1295 case ERROR_PRINT_CANCELLED:
1296 retValue = SP_USERABORT;
1297 break;
1298
1299 case ERROR_DISK_FULL:
1300 retValue = SP_OUTOFDISK;
1301 break;
1302
1303 default:
1304 retValue = SP_ERROR;
1305 break;
1306 }
1307 }
1308 }
1309 }
1310 break;
1311
1312
1313
1314
1315 default:
1316 UNIMPLEMENTED;
1317 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1318 }
1319 }
1320
1321 return retValue;
1322 }
1323
1324 /*
1325 * @unimplemented
1326 */
1327 BOOL
1328 WINAPI
1329 GdiAddGlsRecord(HDC hdc,
1330 DWORD unknown1,
1331 LPCSTR unknown2,
1332 LPRECT unknown3)
1333 {
1334 UNIMPLEMENTED;
1335 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1336 return 0;
1337 }
1338
1339 /*
1340 * @unimplemented
1341 */
1342 HANDLE
1343 WINAPI
1344 GdiConvertMetaFilePict(HGLOBAL hMem)
1345 {
1346 UNIMPLEMENTED;
1347 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1348 return 0;
1349 }
1350
1351 /*
1352 * @implemented
1353 */
1354 DEVMODEW *
1355 WINAPI
1356 GdiConvertToDevmodeW(DEVMODEA *dmA)
1357 {
1358 DEVMODEW *dmW;
1359 WORD dmW_size, dmA_size;
1360
1361 dmA_size = dmA->dmSize;
1362
1363 /* this is the minimal dmSize that XP accepts */
1364 if (dmA_size < FIELD_OFFSET(DEVMODEA, dmFields))
1365 return NULL;
1366
1367 if (dmA_size > sizeof(DEVMODEA))
1368 dmA_size = sizeof(DEVMODEA);
1369
1370 dmW_size = dmA_size + CCHDEVICENAME;
1371 if (dmA_size >= FIELD_OFFSET(DEVMODEA, dmFormName) + CCHFORMNAME)
1372 dmW_size += CCHFORMNAME;
1373
1374 dmW = HeapAlloc(GetProcessHeap(), 0, dmW_size + dmA->dmDriverExtra);
1375 if (!dmW) return NULL;
1376
1377 MultiByteToWideChar(CP_ACP, 0, (const char*) dmA->dmDeviceName, CCHDEVICENAME,
1378 dmW->dmDeviceName, CCHDEVICENAME);
1379 /* copy slightly more, to avoid long computations */
1380 memcpy(&dmW->dmSpecVersion, &dmA->dmSpecVersion, dmA_size - CCHDEVICENAME);
1381
1382 if (dmA_size >= FIELD_OFFSET(DEVMODEA, dmFormName) + CCHFORMNAME)
1383 {
1384 MultiByteToWideChar(CP_ACP, 0, (const char*) dmA->dmFormName, CCHFORMNAME,
1385 dmW->dmFormName, CCHFORMNAME);
1386 if (dmA_size > FIELD_OFFSET(DEVMODEA, dmLogPixels))
1387 memcpy(&dmW->dmLogPixels, &dmA->dmLogPixels, dmA_size - FIELD_OFFSET(DEVMODEA, dmLogPixels));
1388 }
1389
1390 if (dmA->dmDriverExtra)
1391 memcpy((char *)dmW + dmW_size, (const char *)dmA + dmA_size, dmA->dmDriverExtra);
1392
1393 dmW->dmSize = dmW_size;
1394
1395 return dmW;
1396 }
1397
1398 /*
1399 * @unimplemented
1400 */
1401 HENHMETAFILE
1402 WINAPI
1403 GdiCreateLocalEnhMetaFile(HENHMETAFILE hmo)
1404 {
1405 UNIMPLEMENTED;
1406 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1407 return 0;
1408 }
1409
1410 /*
1411 * @unimplemented
1412 */
1413 METAFILEPICT *
1414 WINAPI
1415 GdiCreateLocalMetaFilePict(HENHMETAFILE hmo)
1416 {
1417 UNIMPLEMENTED;
1418 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1419 return 0;
1420 }
1421
1422 /*
1423 * @unimplemented
1424 */
1425 HDC
1426 WINAPI
1427 GdiGetDC(HANDLE SpoolFileHandle)
1428 {
1429 UNIMPLEMENTED;
1430 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1431 return 0;
1432 }
1433
1434 /*
1435 * @unimplemented
1436 */
1437 HANDLE
1438 WINAPI
1439 GdiGetPageHandle(HANDLE SpoolFileHandle,
1440 DWORD Page,
1441 LPDWORD pdwPageType)
1442 {
1443 UNIMPLEMENTED;
1444 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1445 return 0;
1446 }
1447
1448 /*
1449 * @unimplemented
1450 */
1451 BOOL
1452 WINAPI
1453 GdiStartDocEMF(HANDLE SpoolFileHandle,
1454 DOCINFOW *pDocInfo)
1455 {
1456 UNIMPLEMENTED;
1457 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1458 return 0;
1459 }
1460
1461 /*
1462 * @unimplemented
1463 */
1464 BOOL
1465 WINAPI
1466 GdiStartPageEMF(HANDLE SpoolFileHandle)
1467 {
1468 UNIMPLEMENTED;
1469 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1470 return 0;
1471 }
1472
1473 /*
1474 * @unimplemented
1475 */
1476 BOOL
1477 WINAPI
1478 GdiPlayPageEMF(HANDLE SpoolFileHandle,
1479 HANDLE hemf,
1480 RECT *prectDocument,
1481 RECT *prectBorder,
1482 RECT *prectClip)
1483 {
1484 UNIMPLEMENTED;
1485 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1486 return 0;
1487 }
1488
1489 /*
1490 * @unimplemented
1491 */
1492 BOOL
1493 WINAPI
1494 GdiEndPageEMF(HANDLE SpoolFileHandle,
1495 DWORD dwOptimization)
1496 {
1497 UNIMPLEMENTED;
1498 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1499 return 0;
1500 }
1501
1502 /*
1503 * @unimplemented
1504 */
1505 BOOL
1506 WINAPI
1507 GdiEndDocEMF(HANDLE SpoolFileHandle)
1508 {
1509 UNIMPLEMENTED;
1510 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1511 return 0;
1512 }
1513
1514 /*
1515 * @unimplemented
1516 */
1517 BOOL
1518 WINAPI
1519 GdiGetDevmodeForPage(HANDLE SpoolFileHandle,
1520 DWORD dwPageNumber,
1521 PDEVMODEW *pCurrDM,
1522 PDEVMODEW *pLastDM)
1523 {
1524 UNIMPLEMENTED;
1525 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1526 return 0;
1527 }
1528
1529 /*
1530 * @unimplemented
1531 */
1532 BOOL
1533 WINAPI
1534 GdiResetDCEMF(HANDLE SpoolFileHandle,
1535 PDEVMODEW pCurrDM)
1536 {
1537 UNIMPLEMENTED;
1538 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1539 return 0;
1540 }
1541
1542 /*
1543 * @unimplemented
1544 */
1545 ULONG *
1546 WINAPI
1547 XLATEOBJ_piVector(XLATEOBJ *XlateObj)
1548 {
1549 return XlateObj->pulXlate;
1550 }
1551
1552 /*
1553 * @unimplemented
1554 */
1555 BOOL
1556 WINAPI
1557 GdiPlayEMF(LPWSTR pwszPrinterName,
1558 LPDEVMODEW pDevmode,
1559 LPWSTR pwszDocName,
1560 EMFPLAYPROC pfnEMFPlayFn,
1561 HANDLE hPageQuery
1562 )
1563 {
1564 UNIMPLEMENTED;
1565 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1566 return 0;
1567 }
1568
1569 /*
1570 * @unimplemented
1571 */
1572 BOOL
1573 WINAPI
1574 GdiPlayPrivatePageEMF(HANDLE SpoolFileHandle,
1575 DWORD unknown,
1576 RECT *prectDocument)
1577 {
1578 UNIMPLEMENTED;
1579 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1580 return 0;
1581 }
1582
1583 /*
1584 * @unimplemented
1585 */
1586 VOID WINAPI GdiInitializeLanguagePack(DWORD InitParam)
1587 {
1588 UNIMPLEMENTED;
1589 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1590 }
1591
1592 /*
1593 * @implemented
1594 */
1595 BOOL
1596 WINAPI
1597 GdiGradientFill(
1598 IN HDC hdc,
1599 IN PTRIVERTEX pVertex,
1600 IN ULONG nVertex,
1601 IN PVOID pMesh,
1602 IN ULONG nMesh,
1603 IN ULONG ulMode)
1604 {
1605 /* FIXME some part need be done in user mode */
1606 return NtGdiGradientFill(hdc, pVertex, nVertex, pMesh, nMesh, ulMode);
1607 }
1608
1609 /*
1610 * @implemented
1611 */
1612 BOOL
1613 WINAPI
1614 GdiTransparentBlt(IN HDC hdcDst,
1615 IN INT xDst,
1616 IN INT yDst,
1617 IN INT cxDst,
1618 IN INT cyDst,
1619 IN HDC hdcSrc,
1620 IN INT xSrc,
1621 IN INT ySrc,
1622 IN INT cxSrc,
1623 IN INT cySrc,
1624 IN COLORREF TransColor
1625 )
1626 {
1627 /* FIXME some part need be done in user mode */
1628 return NtGdiTransparentBlt(hdcDst, xDst, yDst, cxDst, cyDst, hdcSrc, xSrc, ySrc, cxSrc, cySrc, TransColor);
1629 }
1630
1631 /*
1632 * @unimplemented
1633 */
1634 BOOL
1635 WINAPI
1636 GdiPrinterThunk(
1637 IN HUMPD humpd,
1638 DWORD *status,
1639 DWORD unuse)
1640 {
1641 /* FIXME figout the protypes, the HUMPD are a STRUCT or COM object */
1642 /* status contain some form of return value that being save, what it is I do not known */
1643 /* unsue seam have zero effect, what it is for I do not known */
1644
1645 // ? return NtGdiSetPUMPDOBJ(humpd->0x10,TRUE, humpd, ?) <- blackbox, OpenRCE info, and api hooks for anylaysing;
1646 return FALSE;
1647 }
1648
1649 /*
1650 * @unimplemented
1651 *
1652 */
1653 HBITMAP
1654 WINAPI
1655 GdiConvertBitmapV5(
1656 HBITMAP in_format_BitMap,
1657 HBITMAP src_BitMap,
1658 INT bpp,
1659 INT unuse)
1660 {
1661 /* FIXME guessing the prototypes */
1662
1663 /*
1664 * it have create a new bitmap with desired in format,
1665 * then convert it src_bitmap to new format
1666 * and return it as HBITMAP
1667 */
1668
1669 return FALSE;
1670 }
1671
1672 /*
1673 * @implemented
1674 *
1675 */
1676 int
1677 WINAPI
1678 GetClipBox(HDC hdc,
1679 LPRECT lprc)
1680 {
1681 return NtGdiGetAppClipBox(hdc, lprc);
1682 }
1683
1684 /*
1685 * @implemented
1686 *
1687 */
1688 DWORD
1689 WINAPI
1690 GetFontData(HDC hdc,
1691 DWORD dwTable,
1692 DWORD dwOffset,
1693 LPVOID lpvBuffer,
1694 DWORD cbData)
1695 {
1696 if (!lpvBuffer)
1697 {
1698 cbData = 0;
1699 }
1700 return NtGdiGetFontData(hdc, dwTable, dwOffset, lpvBuffer, cbData);
1701 }
1702
1703 INT
1704 WINAPI
1705 NamedEscape(HDC hdc,
1706 PWCHAR pDriver,
1707 INT iEsc,
1708 INT cjIn,
1709 LPSTR pjIn,
1710 INT cjOut,
1711 LPSTR pjOut)
1712 {
1713 /* FIXME metadc, metadc are done most in user mode, and we do not support it
1714 * Windows 2000/XP/Vista ignore the current hdc, that are being pass and always set hdc to NULL
1715 * when it calls to NtGdiExtEscape from NamedEscape
1716 */
1717 return NtGdiExtEscape(NULL,pDriver,wcslen(pDriver),iEsc,cjIn,pjIn,cjOut,pjOut);
1718 }
1719
1720 /*
1721 * @unimplemented
1722 */
1723
1724 /* FIXME wrong protypes, it is a fastcall api */
1725 DWORD
1726 WINAPI
1727 cGetTTFFromFOT(DWORD x1 ,DWORD x2 ,DWORD x3, DWORD x4, DWORD x5, DWORD x6, DWORD x7)
1728 {
1729 UNIMPLEMENTED;
1730 SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
1731 return 0;
1732 }
1733