Hello
Im coding mp3 encode / ripping tool and because i have licence to realbasic im gonna make user interface with it Technical part im gonna make with akrip.dll and i have develope it more by my own way now. The meaning is use threads for ripping and encode in the same time and i have thinking to use _beginthread function. In the future im gonna develope that tool to use multicore processors. But now the problem is how to design threading because now all functions in the dll are called by their own way from a realbasic so there is no mainthread at all. How it is possible to plan threads to these functions? Or is it necessary make threading in realbasic?
Aleczz 0 Newbie Poster
Recommended Answers
Jump to Posttry this example DLL: I compiled it but didn't test it
#include <windows.h> #include <stdio.h> static DWORD WINAPI myThreadProc(void* parmeter) { while(true) { printf("Hello world!!!\n"); Sleep(1000); } return 0; } __declspec( dllexport ) int WINAPI HelloWorld() { CreateThread(0, 0, myThreadProc, 0, 0, 0); return 0; }
Jump to PostI'm confused -- do you want the threads in RealBasic (whatever that is) or in the DLL? The code I posted will create the threads in the DLL and will work regardless of the language that calls it.
All 7 Replies
Salem 5,265 Posting Sage
Aleczz 0 Newbie Poster
Clockowl 56 Posting Whiz
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
Aleczz 0 Newbie Poster
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
Aleczz 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.