VC++ in PureBasic with Threads
Posted: Fri Sep 05, 2003 6:21 pm
Got an idea when i saw Tiuri's post about HyperThreading and started to think about how threads could be implemented in a game that I and a few friends are planning.
First of all: is i possible to link stuff written i VC++ and PureBasic, and is i possible to thread a function written in VC++ within Purebasic
Second: Is it possible to have VC++ and PureBasic shareing varibels. (PureBasic reading from the same memory as the VC++ Function)
The second must be realy ugly, but as long as it does not crash.
I was thinking about:
VC++
Threaded Function:
repeat
Variabel = Whatever
forever
Threadreturn Function:
Return Variabel
PureBasic:
CreateThread(@Threaded_,0)
Variabel = Threadreturn_()
First of all: is i possible to link stuff written i VC++ and PureBasic, and is i possible to thread a function written in VC++ within Purebasic
Second: Is it possible to have VC++ and PureBasic shareing varibels. (PureBasic reading from the same memory as the VC++ Function)
The second must be realy ugly, but as long as it does not crash.
I was thinking about:
VC++
Threaded Function:
repeat
Variabel = Whatever
forever
Threadreturn Function:
Return Variabel
PureBasic:
CreateThread(@Threaded_,0)
Variabel = Threadreturn_()