annotate loader/qtx/list.c @ 26429:fac5790e3ff7

synced with r26460
author ptt
date Fri, 18 Apr 2008 17:26:00 +0000
parents 96ce0ca753ff
children 75c404032a70
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5209
591e470e805b simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff changeset
1 /* to compile:
5210
ba800cb05b94 comments on compiling
arpi
parents: 5209
diff changeset
2 edit ../win32.c, change the #if 0 to 1 at line 1326 to enabel quicktime fix!
5209
591e470e805b simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff changeset
3 */
591e470e805b simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff changeset
4
591e470e805b simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff changeset
5 #include <stdio.h>
591e470e805b simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff changeset
6 #include <stdlib.h>
591e470e805b simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff changeset
7 #include <string.h>
591e470e805b simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff changeset
8
591e470e805b simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff changeset
9 #include "qtxsdk/components.h"
591e470e805b simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff changeset
10 #include "qtxsdk/select.h"
591e470e805b simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff changeset
11
18889
e60c8c7399d2 get_path as const, patch by Stefan Huehner, stefan AT huehner-org
reynaldo
parents: 5211
diff changeset
12 char* get_path(const char* x){ return strdup(x);}
5209
591e470e805b simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff changeset
13 void* LoadLibraryA(char* name);
591e470e805b simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff changeset
14 void* GetProcAddress(void* handle,char* func);
591e470e805b simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff changeset
15
591e470e805b simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff changeset
16 #define __stdcall __attribute__((__stdcall__))
591e470e805b simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff changeset
17 #define __cdecl __attribute__((__cdecl__))
591e470e805b simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff changeset
18 #define APIENTRY
591e470e805b simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff changeset
19
591e470e805b simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff changeset
20 int main(int argc, char *argv[]){
591e470e805b simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff changeset
21 void *handler;
591e470e805b simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff changeset
22 ComponentDescription desc;
591e470e805b simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff changeset
23 Component (*FindNextComponent)(Component prev,ComponentDescription* desc);
591e470e805b simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff changeset
24 long (*CountComponents)(ComponentDescription* desc);
5211
fc9ccaa09006 InitializeQTML(0) added
arpi
parents: 5210
diff changeset
25 OSErr (*InitializeQTML)(long flags);
fc9ccaa09006 InitializeQTML(0) added
arpi
parents: 5210
diff changeset
26 OSErr (*EnterMovies)(void);
fc9ccaa09006 InitializeQTML(0) added
arpi
parents: 5210
diff changeset
27 OSErr ret;
5209
591e470e805b simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff changeset
28
591e470e805b simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff changeset
29 Setup_LDT_Keeper();
25593
96ce0ca753ff /usr/lib/win32 --> /usr/local/lib/codecs
diego
parents: 25592
diff changeset
30 handler = LoadLibraryA("/usr/local/lib/codecs/qtmlClient.dll");
5211
fc9ccaa09006 InitializeQTML(0) added
arpi
parents: 5210
diff changeset
31 printf("***************************\n");
fc9ccaa09006 InitializeQTML(0) added
arpi
parents: 5210
diff changeset
32 InitializeQTML = 0x1000c870; //GetProcAddress(handler, "InitializeQTML");
fc9ccaa09006 InitializeQTML(0) added
arpi
parents: 5210
diff changeset
33 EnterMovies = 0x10003ac0; //GetProcAddress(handler, "EnterMovies");
fc9ccaa09006 InitializeQTML(0) added
arpi
parents: 5210
diff changeset
34 FindNextComponent = 0x1000d5f0; //GetProcAddress(handler, "FindNextComponent");
fc9ccaa09006 InitializeQTML(0) added
arpi
parents: 5210
diff changeset
35 CountComponents = 0x1000d5d0; //GetProcAddress(handler, "CountComponents");
fc9ccaa09006 InitializeQTML(0) added
arpi
parents: 5210
diff changeset
36 // = GetProcAddress(handler, "");
fc9ccaa09006 InitializeQTML(0) added
arpi
parents: 5210
diff changeset
37 printf("handler: %p, funcs: %p %p %p, %p\n", handler, InitializeQTML, EnterMovies, FindNextComponent,CountComponents);
fc9ccaa09006 InitializeQTML(0) added
arpi
parents: 5210
diff changeset
38
fc9ccaa09006 InitializeQTML(0) added
arpi
parents: 5210
diff changeset
39 ret=InitializeQTML(0);
fc9ccaa09006 InitializeQTML(0) added
arpi
parents: 5210
diff changeset
40 printf("InitializeQTML->%d\n",ret);
fc9ccaa09006 InitializeQTML(0) added
arpi
parents: 5210
diff changeset
41 ret=EnterMovies();
fc9ccaa09006 InitializeQTML(0) added
arpi
parents: 5210
diff changeset
42 printf("EnterMovies->%d\n",ret);
5209
591e470e805b simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff changeset
43
591e470e805b simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff changeset
44 memset(&desc,0,sizeof(desc));
5211
fc9ccaa09006 InitializeQTML(0) added
arpi
parents: 5210
diff changeset
45 desc.componentType= (((unsigned char)'S')<<24)|
fc9ccaa09006 InitializeQTML(0) added
arpi
parents: 5210
diff changeset
46 (((unsigned char)'V')<<16)|
fc9ccaa09006 InitializeQTML(0) added
arpi
parents: 5210
diff changeset
47 (((unsigned char)'Q')<<8)|
fc9ccaa09006 InitializeQTML(0) added
arpi
parents: 5210
diff changeset
48 (((unsigned char)'5'));
5209
591e470e805b simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff changeset
49 desc.componentSubType=0;
591e470e805b simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff changeset
50 desc.componentManufacturer=0;
591e470e805b simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff changeset
51 desc.componentFlags=0;
591e470e805b simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff changeset
52 desc.componentFlagsMask=0;
591e470e805b simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff changeset
53
591e470e805b simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff changeset
54 printf("Count = %d\n",CountComponents(&desc));
591e470e805b simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff changeset
55
591e470e805b simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff changeset
56 Restore_LDT_Keeper();
591e470e805b simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff changeset
57 exit(0);
591e470e805b simple sample proggy, using qtmlClient.dll to access QT components
arpi
parents:
diff changeset
58 }