|
-
Jan 22nd, 2022, 04:05 AM
#1
Re: c/c++ code for vb6 multithreading
You shouldn't use GetMem4 and another memory access functions because C/C++ already has pointers features. I don't know how to explain you all because you have the troubles with this elementary things. When you begin with threading you'll have much more troubles/deadlocks/etc.
-
Jan 22nd, 2022, 04:50 AM
#2
Re: c/c++ code for vb6 multithreading
 Originally Posted by The trick
You shouldn't use GetMem4 and another memory access functions because C/C++ already has pointers features.
And this is a very polite way of saying it :-))
When I first saw the code my WТF-per-minute metric sky-rocketed and I immediately jotted a reply with a lot of WТFs, LOLs and smilies but then just discarded it when my head cooled down.
Everyone has been there. . . Starting from multi-threading in a public forum can be a humiliating experience so patience (or silence) is a virtue here.
cheers,
</wqw>
-
Jan 22nd, 2022, 05:18 AM
#3
Re: c/c++ code for vb6 multithreading
 Originally Posted by The trick
I don't know how to explain you all because you have the troubles with this elementary things. When you begin with threading you'll have much more troubles/deadlocks/etc.
Actually, I disagree. The wizardry of making multi-threading work in VB6 is way and I mean way over my head. It looks like something God would write. It's just incomprehensible to me and other mere mortals. However, I have zero problems with nuances of writing multi-threaded applications like deadlocks and synchronization.
I think the real problem here is that people are out there in the world seeing what others are doing in other languages. I mean take Python. It's dead simple to write multi-threaded code in that language. Then you have languages like JavaScript make it easy to write asynchronous code. And of course .Net makes it very easy to write all kinds of multi-threaded and asynchronous code. Programmers are out there seeing these things and think they can just come to VB6 and do the same thing. VB6 is 20+ years old. You can't expect to do these things with the same ease. You're going to have to get your hands dirty by getting down into the plumbing.
A lot of people think I hate VB6 because of the things I say especially with regards to how it compares to .Net and other modern languages. No, it's not hate. Threads like this are the reason why. You're going to really struggle in VB6 if you're trying to do stuff like this without a low level understanding of COM, VB6, it's runtime along with other low levels stuff like pointers and memory allocation. Like you really have to know what you're doing.
Anyways, don't mind me. Just felt like ranting a little bit. Kinda tipsy right now. 
It just pains me so much to see developers way over their heads like this for no reason. Would it hurt so bad to give VB.Net a try where this would be easy as pie?
Last edited by Niya; Jan 22nd, 2022 at 05:25 AM.
-
Jan 22nd, 2022, 05:24 AM
#4
Thread Starter
Addicted Member
Re: c/c++ code for vb6 multithreading
 Originally Posted by The trick
You shouldn't use GetMem4 and another memory access functions because C/C++ already has pointers features. I don't know how to explain you all because you have the troubles with this elementary things. When you begin with threading you'll have much more troubles/deadlocks/etc.
Hello The Trick,
Thankyou for the response.
Firehacker has explained about his c/c++ dll for vb6 multithreading which he gave awesome explanation.
So I tried that in c/c++ in a simple way for which you showed a link but in vb6.So I was trying to achieve atleast some part of it
in c/c++.Since I donot want to disturb you again and again I shall be happy if could provide me a simple c/c++ dll demo atleast with limited features
which exports a vbCreateThread function which can be used in vb6 std exe so that I can understand CreateIExprSrvObj,GetMem4(RtlMoveMemory),
CreateVBHeaderCopy and VBDllGetClassObject in order to improve my knowledge in vb6 as well as c/c++ for which I am indebted to you.
Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|