Results 1 to 32 of 32

Thread: c/c++ code for vb6 multithreading

Hybrid View

  1. #1

  2. #2
    PowerPoster wqweto's Avatar
    Join Date
    May 2011
    Location
    Sofia, Bulgaria
    Posts
    6,203

    Re: c/c++ code for vb6 multithreading

    Quote Originally Posted by The trick View Post
    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>

  3. #3
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    9,017

    Re: c/c++ code for vb6 multithreading

    Quote Originally Posted by The trick View Post
    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.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Dec 2021
    Posts
    144

    Re: c/c++ code for vb6 multithreading

    Quote Originally Posted by The trick View Post
    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
  •  



Click Here to Expand Forum to Full Width