aboutsummaryrefslogtreecommitdiffhomepage
path: root/loader/qtx
diff options
context:
space:
mode:
authorGravatar arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-03-20 01:36:41 +0000
committerGravatar arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-03-20 01:36:41 +0000
commit7824552bad42539d6ddc598cbd978b41276065d1 (patch)
tree08b696e09eae3323bc6849a4451526c7d375da2b /loader/qtx
parentb70ac58b8edca1533f1d18d1d43c6df0da3ce9a0 (diff)
simple sample proggy, using qtmlClient.dll to access QT components
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5210 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'loader/qtx')
-rw-r--r--loader/qtx/list.c43
1 files changed, 43 insertions, 0 deletions
diff --git a/loader/qtx/list.c b/loader/qtx/list.c
new file mode 100644
index 0000000000..8ab8947a39
--- /dev/null
+++ b/loader/qtx/list.c
@@ -0,0 +1,43 @@
+/* to compile:
+ gcc -o list list.c ../libloader.a -lpthread -ldl -lm -ggdb ../../cpudetect.o
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "qtxsdk/components.h"
+#include "qtxsdk/select.h"
+
+char* get_path(char* x){ return strdup(x);}
+void* LoadLibraryA(char* name);
+void* GetProcAddress(void* handle,char* func);
+
+#define __stdcall __attribute__((__stdcall__))
+#define __cdecl __attribute__((__cdecl__))
+#define APIENTRY
+
+int main(int argc, char *argv[]){
+ void *handler;
+ ComponentDescription desc;
+ Component (*FindNextComponent)(Component prev,ComponentDescription* desc);
+ long (*CountComponents)(ComponentDescription* desc);
+
+ Setup_LDT_Keeper();
+ handler = LoadLibraryA("/usr/lib/win32/qtmlClient.dll");
+ FindNextComponent = GetProcAddress(handler, "FindNextComponent");
+ CountComponents = GetProcAddress(handler, "CountComponents");
+ printf("handler: %p, funcs: %p, %p\n", handler, FindNextComponent,CountComponents);
+
+ memset(&desc,0,sizeof(desc));
+ desc.componentType=0;
+ desc.componentSubType=0;
+ desc.componentManufacturer=0;
+ desc.componentFlags=0;
+ desc.componentFlagsMask=0;
+
+ printf("Count = %d\n",CountComponents(&desc));
+
+ Restore_LDT_Keeper();
+ exit(0);
+}