Search:

Type: Posts; User: sancarn

Page 1 of 2 1 2

Search: Search took 0.43 seconds.

  1. Re: [VB6/VBA] A clipboard management class (currently have issues in x64)

    No difference, always 20 bytes, which makes sense, we use Longs. There should only really be a difference if LongPtr is used.
  2. Re: [VB6/VBA] A clipboard management class (currently have issues in x64)

    Damn, never knew that, that is really useful thanks! Really too bad there isn't a download button for this forums knowledge :P



    That's where copy paste takes you... Thanks as always, should be...
  3. Re: [VB6/VBA] A clipboard management class (currently have issues in x64)

    Yes I realise that indeed, but Ptrsafe declares and LongPtr are concepts added in VBA7, so a check for VBA7 suffices from the point of view of declaration :) But this is why I checked for win64 when...
  4. Re: [VB6/VBA] A clipboard management class (currently have issues in x64)

    Ooo!! Great catch, totally missed that potential issue!



    Interesting idea! I'll certainly give that a go. If not I'll look into constructing a byte array instead :)

    Edit: Just tested and...
  5. [VB6/VBA] A clipboard management class (currently have issues in x64)

    Hi All,

    Thought you might appreciate this clipboard management class. It should work in VB6 assuming I have the declares setup correctly.

    The source code can be found here:

    stdClipboard.cls
  6. Re: How to call IEnumVARIANT::Next() with DispCallFunc() - Without external TLBs

    Wowee! Now I'm gutted I can't seem to use these APIs in VBA... They seem to be weirdly embedded in the VBE7.dll but not accessible... And for whatever reason that means I can't import them from...
  7. Replies
    7
    Views
    1,858

    Re: [ASM] "Hello World" in machine codes.

    This is a really nice article Trick. I'm quite surprised no one has made a ASM-->HEX compiler in VB6 now, as this stuff seems relatively unobscure... Definitely a really worthwhile resource :)
  8. Re: How to call IEnumVARIANT::Next() with DispCallFunc() - Without external TLBs

    So in the end I didn't really come up with a proper solution but I did come up with a solution which is ridiculously ugly but works for what I needed... :lol:

    Behold, the behemoth:



    Sub t()...
  9. Replies
    39
    Views
    1,311

    Re: Load image into STATIC control Win32

    Damn that looks fantastic! I've barely messed around with UI in VBA and have for a long while been yearning for a custom canvas control. Also been wanting to add a "highlight" function to my stdAcc...
  10. Re: How to call IEnumVARIANT::Next() with DispCallFunc() - Without external TLBs

    I had wondered about that, but do you know the declaration specification?
  11. Re: How to call IEnumVARIANT::Next() with DispCallFunc() - Without external TLBs

    Waiiit... The value is multiplied by 4?! Woops... That's the ptr size right?

    I used the vtable order from here:...
  12. Re: How to call IEnumVARIANT::Next() with DispCallFunc() - Without external TLBs

    You may :) It's for a class I am working on which wraps enumerable "things". Currently I only offer a wrapper around IEnumVARIANT i.e.



    For each x in pObject
    '...
    Next


    However I want...
  13. How to call IEnumVARIANT::Next() with DispCallFunc() - Without external TLBs

    Hi All,

    I've been trying for the past few hours to call IEnumVARIANT::Next() on a collection Enum. I would like this as I am building a wrapper for EnumVARIANTs giving them more possibilities.

    ...
  14. Re: Looking to build a HTTP class but what should it be built off of?

    There are some things with WinHTTP which I find unintuitive. So providing a better interface was the main motivation :)

    That said I'd still like to know if anyone knows the key differences /...
  15. Looking to build a HTTP class but what should it be built off of?

    The way I see it, there are 3 options here:


    WinHttp.WinHTTPRequest.5.1 - https://docs.microsoft.com/en-us/windows/win32/winhttp/winhttprequest
    Microsoft.XMLHTTP -...
  16. Re: [VBA] Lambda Syntax - No script control or cheats! Happy for ports to VB6

    Over the past year I've been simultaneously working on a "VBA-Like" to "VBA" transpiler with the intention of making something akin to BabelJS but for VBA. Was also hoping that might be able to...
  17. [VBA] Lambda Syntax - No script control or cheats! Happy for ports to VB6

    Lambda Expressions

    I've already posted this library elsewhere but figured that people on VBForums would find it useful too! This is currently only written to work in VBA but I believe a port to...
  18. Re: [VB6] - Module for working with COM-Dll without registration.

    Google is your friend, this is the wrong thread, but googling WM_GETOBJECT Excel, will help get you on the right track
  19. Why is VariantCopy DLL slower than a Local Implementation?

    Hi All,

    So I've been building an expression parser (mainly for VBA but I'm sure you can use VB6 also :)). In testing that parser we came across a performance issue. One of my suggestions was to...
  20. Re: What does the With statement do internally?

    Yes. All these tests have been done in the VBA environment on both Mac and Windows. If someone could run these over VB6 P-Code and VB6 compiled native code this would be really useful! I will be...
  21. Re: What does the With statement do internally?

    So I made a post on StackOverflow regarding what I learnt from here and ultimately got criticised from mods who, rightly, thought it was all speculation.

    So I actually started to do some analysis...
  22. Re: What does the With statement do internally?

    it took me a while to understand what you meant by member lol, but i see now yes that would make a lot of sense. I more so meant in the case where A is a local variable I.E.



    Sub test
    Dim A...
  23. Re: What does the With statement do internally?

    Interesting so if I have you correct, if I did:



    With A
    .B=1
    .C=2
    .D=3
    End With
  24. What does the With statement do internally?

    Hi All,

    What I know:
    * Using with speeds up developement
    * Using with makes code a lot easier to manage.
    * Using with can make code prettier


    I think "With ... End With" speeds up execution...
  25. Re: [vb6] Getting AddressOf for VB Class/Object Modules

    Right! Size! I forgot about that one, yes I guess you would have to do what many dynamic languages do. E.G. GetPtr(me,1,"PPI","P") for params: String, String, Integer and return type String. That way...
  26. Re: [vb6] Getting AddressOf for VB Class/Object Modules

    Amazing LaVolpe!



    To be fair this is likely one of the reasons why AddressOf was never implemented to work with class functions.

    I'm no expert with making thunks... How easy would it be to...
  27. Re: Pointers, 2D Arrays and Debugging a crash

    I solved the issue after stumbling across this stack overflow post.



    VERSION 1.0 CLASS
    BEGIN
    MultiUse = -1 'True
    END
    Attribute VB_Name = "stdRefArray"
    Attribute VB_GlobalNameSpace =...
  28. Re: Pointers, 2D Arrays and Debugging a crash

    I believe this is the VB6 port (removed LongPtr for Long, and PtrSafe:



    VERSION 1.0 CLASS
    BEGIN
    MultiUse = -1 'True
    END
    Attribute VB_Name = "stdRefArray"
    Attribute VB_GlobalNameSpace =...
  29. [RESOLVED] Pointers, 2D Arrays and Debugging a crash

    I'm trying to make an efficient method of storing a reference to an array for later use, without storing the array itself. This is because many arrays I use are huge.

    To accomplish this I made...
  30. Re: This should be easy but there's clearly something I'm missing...

    Oh my god. I solved it...



    Private Declare Function IECreateRuntime Lib "jscript9.dll" Alias "JsCreateRuntime" ( _
    jsRuntimeAttributes As Integer, _
    jsRuntimeVersion As Long, _
    ...
  31. Re: This should be easy but there's clearly something I'm missing...

    Indeed it's 4 bytes on 32 bit systems and 8 bytes on 64 bit systems correct? I'd be fairly surprised this couldn't be overcome by simply using conditional #if statements..



    Yeah I was...
  32. Re: This should be easy but there's clearly something I'm missing...

    Ah it was from this post on stack overflow:

    https://stackoverflow.com/a/56412578/6302131



    const (
    JsNoError = 0
    JsErrorInvalidArgument = 0x10001
    JsErrorNullArgument = 0x10002
  33. Re: This should be easy but there's clearly something I'm missing...

    I should clarify my statement actually. There is no VB runtime error specifically. Rather, neither IECreateRuntime nor EdgeCreateRuntime return S_OK. They both return 65537 aka 0x10001 which somehow...
  34. This should be easy but there's clearly something I'm missing...

    I'm building a class to instantiate a JScript/Edge JS runtime which should be compatible with both VBA and VB6 etc.

    My project can be found here.

    The only current issue I'm getting an error on...
  35. Replies
    10
    Views
    2,239

    Re: Call VB6 module function dynamically

    I have yeah! I've also looked at a neat example by TheTrick which creates a 'pointer execute' function with some machine code. It's not super ideal, but it is significantly better than what I have...
  36. Re: Has anyone had any success implementing IDispatch / IDispatchEx?

    Lol well that's cheating! :p But indeed you can do that.



    I did not do anything of the sort. On all systems I have used the following code:



    Dim sc as object: set sc =...
  37. Re: Has anyone had any success implementing IDispatch / IDispatchEx?

    Hi Olaf,

    Gotta say your vbFriendlyInterfaces dll does indeed look very nice! That said I'm not sure if you can easily attach methods to your IDispatch implementation without implementing TypeInfo...
  38. Replies
    10
    Views
    2,239

    Re: Call VB6 module function dynamically

    Hi DreamManor,

    I've had several ideas but I havent put any into action as of yet, but generally these ideas require scraping the memory of the application instance. I have already in the past done...
  39. Re: Has anyone had any success implementing IDispatch / IDispatchEx?

    Ah you are totally right! I recall coming across CreateStdDispatch a few weeks ago, remember thinking "Man this looks like it'll do what I need it to". I think I chickened out after seeing the total...
  40. Has anyone had any success implementing IDispatch / IDispatchEx?

    Recently I've found myself wanting to implement the IDispatchEx interface which would allow me to create objects 'on the fly'. The core benefit of which is for syntax sugar:



    Dim person as...
Results 1 to 40 of 45
Page 1 of 2 1 2



Click Here to Expand Forum to Full Width