Release 980913
[wine/multimedia.git] / ipc / wine_test_stub.c
blob2229351561e14fbc8e6ffd816182e7203e21c429
1 #include <stdlib.h>
2 #include "dde.h"
3 #include <wintypes.h>
4 #include "global.h"
5 #include <win.h>
6 #define DEBUG_DEFINE_VARIABLES
7 #define DEBUG_ALL
8 #include <debug.h>
10 #define DDE_PROC2WIN(proc_idx) ( (HWND) ~( (proc_idx)+1) )
11 #define DDE_WIN2PROC(win) ( (int) ~(short) ((win)+1) )
12 #define DDE_IsRemoteWindow(win) ( (win)<0xffff && (win)>=(0xffff-DDE_PROCS))
15 char *MessageTypeNames[0x400]={NULL};
16 char *dummy_store_for_debug_msg_name;
18 ldt_copy_entry ldt_copy[LDT_SIZE];
20 int LDT_GetEntry( int entry, ldt_entry *content )
22 return 0;
25 int LDT_SetEntry( int entry, ldt_entry const *content )
27 return 0;
30 void dummy_usage_of_debug_msg_name()
32 dummy_store_for_debug_msg_name=debug_msg_name[0];
35 /* stub */
36 HWND32 GetDesktopWindow32()
38 printf("GetDesktopWindow\n");
39 return 0;
41 /* stub */
42 /* smart stub */
43 LONG SendMessage(HWND a,WORD b,WORD c,LONG d)
45 MSG msg;
46 printf("SendMessage(%04x,%04x,%04x,%04lx)\n",a,b,c,d);
47 if (DDE_IsRemoteWindow(a) || a==(HWND)-1)
48 return 0;
49 if (b!=WM_DDE_INITIATE)
50 return 0;
51 msg.hwnd=c;
52 msg.message= WM_DDE_ACK;
53 msg.lParam= 0;
54 msg.wParam= 0;
55 return DDE_SendMessage(&msg);
57 /* stub */
58 BOOL PostMessage(HWND a,WORD b,WORD c,LONG d)
60 printf("PostMessage(%04x,%04x,%04x,%04lx)\n",a,b,c,d);
61 return 0;
63 /* stub */
64 HWND GetTopWindow(HWND a)
66 printf("GetTopWindow(%04x)\n",a);
67 return 1;
69 /* stub */
70 WORD FreeSelector(WORD a)
72 printf("FreeSelector(%04x)\n",a);
73 return 0;
76 /* stub that partially emulates the true GLOBAL_CreateBlock function */
77 HGLOBAL16 GLOBAL_CreateBlock( WORD flags, void *ptr, DWORD size,
78 HGLOBAL16 hOwner, BOOL isCode,
79 BOOL is32Bit, BOOL isReadOnly,
80 SHMDATA *shmdata )
83 printf("GLOBAL_CreateBlock(flags=0x%x,ptr=0x%08lx, size=0x%x,hOwner=0x%x\n",
84 (int)flags, (long)ptr, (int)size, (int)hOwner);
85 printf("isCode=%d, is32Bit=%d, isReadOnly=%d, \n", isCode, is32Bit,
86 isReadOnly);
87 printf("*shmdata={handle=0x%x,sel=0x%x, shmid=%d})\n",
88 shmdata->handle, shmdata->sel, shmdata->shmid);
89 return 1;
92 /* stub */
93 WND *WIN_FindWndPtr(HWND hwnd)
95 static WND win;
96 printf("WIN_FindWndPtr(%d)\n",hwnd);
97 if (hwnd==0)
98 return NULL;
99 win.next=NULL;
100 win.dwStyle=WS_POPUP;
102 return &win;
105 /* stub */
106 WORD GetCurrentPDB(void)
108 printf("GetCurrentPDB()\n");
110 return 0;
113 /* stub */
114 void Yield(void)