Search:

Type: Posts; User: Niya

Page 1 of 13 1 2 3 4

Search: Search took 0.79 seconds.

  1. Thread: TwinBasic

    by Niya
    Replies
    482
    Views
    41,707

    Re: TwinBasic

    That is still a ways off. It still needs a GUI engine which is in the works but not completed yet. However, it is already fully capable of executing non-GUI VB6 code. It just cannot yet read VB6's...
  2. Replies
    7
    Views
    177

    Re: Timed Loops to Simulate Hertz

    I wouldn't go this far yet. While, the .Net GC is unpredictable and can cause unpredictable stutters, I think the OS itself also has a major role to play in this. The OS has to share the CPU between...
  3. Re: Here's how to execute any arbitrary x86 machine code from a VB6 program.

    Also, the reason the Trick's method is so highly performant is because, it actually gives you the full benefits of statically compiled function calls. The very little I do understand about this...
  4. Thread: flippin bits

    by Niya
    Replies
    23
    Views
    556

    Re: flippin bits

    Actually dilettante is onto something. Two's complement and endianness are not implemented by compilers, which is what is implied when you used the term "languages". They are implemented by the CPU...
  5. Replies
    8
    Views
    297

    Re: Migrate VB6 to .NET

    The VB6 converter tool is absolution garbage. VB6 and VB.Net are far too different for migration to be automated. Doing it the hard way is the only choice until someone figures out how to get one of...
  6. Re: Here's how to execute any arbitrary x86 machine code from a VB6 program.

    I'd be surprised if there wasn't significantly more overhead. I would never expect this to outperform statically compiled functions and function calls where everything is resolved at compile time. It...
  7. Replies
    7
    Views
    177

    Re: Timed Loops to Simulate Hertz

    I don't want to say it's impossible but my instinct is that it is impossible. I am assuming that you are running on Windows. Thing is, Windows is a pre-emptive multi-tasking operating system that is...
  8. Re: Here's how to execute any arbitrary x86 machine code from a VB6 program.

    I decided to tidy up the code and release it in the CodeBank. I also linked your post and your invoke sample Olaf, hope you don't mind.
  9. Executing assembly language functions in VB6 using DispCallFunc.

    Yes, I know this has been done to death on these forums but one more couldn't hurt. :bigyello:

    This is yet another sample showing how to call function pointers in VB6. In this sample I wrote 3...
  10. Re: Here's how to execute any arbitrary x86 machine code from a VB6 program.

    I wasn't even aware of that post existed. The article I found was the first or second one that Google got when I searched for information on how to use DispCallFunc.



    Yea this one had me...
  11. Re: Here's how to execute any arbitrary x86 machine code from a VB6 program.

    It seems there is a little bug in the CallFunctionPointer function I wrote. It doesn't work correctly sometimes when variables are used to pass arguments to the function pointer. It works fine when...
  12. Replies
    10
    Views
    280

    VS 2019 Re: Debugging Setting Help

    Wow. That is a lot. Unfortunately, at this point you know more than I do. I've tried numerous times to actually enable the behavior you're trying to get rid of, ie stepping into framework code. I...
  13. Thread: PicServer problem

    by Niya
    Replies
    7
    Views
    268

    Re: PicServer problem

    It is more efficient to close a connection as soon as possible if stateless information is being exchanged. Think about it. If I queried a server for some information on Karen like her date of birth...
  14. Replies
    9
    Views
    341

    Re: Peekmessage (API) instead of Subclassing

    In that case, what you're doing should be safe. The most important thing is that the VB6's runtime's own message loop gets to process the message in the end.
  15. Re: Here's how to execute any arbitrary x86 machine code from a VB6 program.

    And finally we come full circle. I've refactored the DispCallFunc method into a function that can call any function with any amount of parameters and with any return value just like Eduardo wanted....
  16. Re: Here's how to execute any arbitrary x86 machine code from a VB6 program.

    Ok I got it. Turns out, it's not really that difficult at all:-

    Option Explicit
    '*******************************************************************
    'Additional Credit for this method...
  17. Re: Here's how to execute any arbitrary x86 machine code from a VB6 program.

    I just looked into this. How can this be used to call a simple x86 assembly function blob? It seems to want a COM interface instance and it seems to wants the parameters to be passed as VARIANTS. For...
  18. Replies
    9
    Views
    341

    Re: Peekmessage (API) instead of Subclassing

    Yes, your PeekMessage loop is in effect what DoEvents does. But what I'm saying is, the actual DoEvents function and the runtime's message loop could very well be doing other "book keeping" stuff...
  19. Thread: TwinBasic

    by Niya
    Replies
    482
    Views
    41,707

    Re: TwinBasic

    Well remember, Microsoft wanted VB6 developers to use VB.Net instead so the extra hassle of having to import it might have been off-putting which is why it is imported by default. They wanted to make...
  20. Re: Here's how to execute any arbitrary x86 machine code from a VB6 program.

    I had no clue how that worked so I had no idea what I was doing wrong. That's why I called it sorcery earlier, that method was just too far beyond my understanding. I just tried to follow along what...
  21. Re: Here's how to execute any arbitrary x86 machine code from a VB6 program.

    This is precisely why calling conventions exist. There is no risk of stack corruption or unwanted register pollution as long as all function calls in the call chain respect the calling conventions....
  22. Replies
    8
    Views
    264

    Re: Adding Animated Icon to Form TitleBar

    A Timer is pretty straightforward. What kind of solution were you actually hoping for?
  23. Re: Here's how to execute any arbitrary x86 machine code from a VB6 program.

    Well. I'm not aware of any Win32 function besides CallWindowProc that can do this. I believe Dilettante might know a way using some kind of COM wizardry and The Trick also has a method that uses a...
  24. Re: Here's how to execute any arbitrary x86 machine code from a VB6 program.

    Oh you could definitely do that. You just have to go about it correctly. Me and Olaf had one of our usual back and forth over VB6/VB.Net and I actually brought this up. We both ended up posting...
  25. Replies
    8
    Views
    264

    Re: Adding Animated Icon to Form TitleBar

    I'm curious. Why don't you want to use a Timer?
  26. Re: Here's how to execute any arbitrary x86 machine code from a VB6 program.

    The code being executed by a processor is determined by something called the instruction pointer. This value resides in the EIP register. Unlike traditional registers like EAX, you cannot directly...
  27. Replies
    8
    Views
    264

    Re: Adding Animated Icon to Form TitleBar

    I think this is the thread you're talking about. Might be quite involved for something so simple but it's a solution. Could be what OP actually needs.
  28. Replies
    9
    Views
    341

    Re: Peekmessage (API) instead of Subclassing

    Oh yes. It's much safer.

    But a game engine errrr...I mean games engines might be different though. Usually when writing a game engine, the engine tends to end up being the program itself instead...
  29. Replies
    9
    Views
    341

    Re: Peekmessage (API) instead of Subclassing

    One question though....why PeekMessage and not GetMessage?
  30. Replies
    9
    Views
    341

    Re: Peekmessage (API) instead of Subclassing

    To be honest, I really don't like the idea of this message loop at all. It assumes that the VB6's runtime's own message loop isn't doing anything important before dispatching messages. The above code...
  31. Replies
    8
    Views
    264

    Re: Adding Animated Icon to Form TitleBar

    You could use a loop with DoEvents. However, DoEvents as a solution to a problem is a bad idea 90% of the time because of potential reentrancy issues.

    Another option would be an animated GIF but...
  32. Replies
    10
    Views
    280

    VS 2019 Re: Debugging Setting Help

    Yea, issues like that are common in Visual Studio. I wish Microsoft would simplify some of these settings.
  33. Replies
    6
    Views
    326

    Re: It's ok if you know

    I jumped right into .Net directly using my knowledge of VB6 to be able to write code immediately in VB.Net. From there I just used the online MSDN documentation and Google to discover what was in the...
  34. Replies
    10
    Views
    280

    VS 2019 Re: Debugging Setting Help

    I had some recent struggles trying to get the Disassembly window and the window for registers and memory. A lot of my time was spent dumping settings, importing settings, resetting ect. When...
  35. Replies
    10
    Views
    280

    VS 2019 Re: Debugging Setting Help

    Did you try resetting Visual Studio?

    It's done through Tools -> Import and Export Settings. Then from there, you have options to reset Visual Studio or import settings etc.
  36. Thread: flippin bits

    by Niya
    Replies
    23
    Views
    556

    Re: flippin bits

    This is where we disagree. I believe religiously that it's better to be explicit in all cases where it doesn't significantly impact productivity which in this case it won't since we are just talking...
  37. Thread: flippin bits

    by Niya
    Replies
    23
    Views
    556

    Re: flippin bits

    Also let me address this:-



    I don't despise VB6. I just think it's a terrible idea to choose it over VB.Net in nearly all cases. Also, what I actually despise is all of the unwarranted attacks...
  38. Re: RC6 - New encrypt option for Sqlite DB: SqlCipher

    I guess not. ;)
  39. Thread: flippin bits

    by Niya
    Replies
    23
    Views
    556

    Re: flippin bits

    This is exactly what I'm talking about.

    You wanted specifics Olaf? Here is an example that can trip someone up if they are not careful:-


    Private Declare Sub memcpy Lib "kernel32" Alias...
  40. Re: Why is VB.Net/C#/XAML + VS2019 is better than VB6? Here's why.....

    Private Sub Form2_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    Task.Run(Sub()
    For i = 1 To 10
    Threading.Thread.Sleep(500)
    ...
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Click Here to Expand Forum to Full Width