dcsimg

Search:

Type: Posts; User: sancarn

Search: Search took 0.00 seconds.

  1. 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, _
    ...
  2. 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...
  3. 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
  4. 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...
  5. 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...
  6. Replies
    10
    Views
    1,346

    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...
  7. 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 =...
  8. 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...
  9. Replies
    10
    Views
    1,346

    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...
  10. 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...
  11. 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...
  12. Replies
    10
    Views
    1,346

    Re: Call VB6 module function dynamically

    @Zvoni - Though you are correct, I actually forgot to mention in my main post that I'm not interested in CallByName unless I can get a handle to the project itself like The Trick.

    @westconn1 -...
  13. Replies
    10
    Views
    1,346

    Re: Call VB6 module function dynamically

    Sorry, but this call convention you provided is far from dynamic. The real equivalent of what I'm after would be:


    VariantCopy myVariant, runFunc("myProject.vbp","myModule","c")



    Though you...
  14. Replies
    10
    Views
    1,346

    Call VB6 module function dynamically

    I think this is a long shot... But if I have a module named e.g. "mHello":


    Function a() as Variant
    a=1
    End Function
    Function b() as Variant
    b=2
    End Function
    Function c() as Variant
  15. Re: How to set a variant without VB6 default value?

    You are absolutely correct! Thanks!

    @Eduardo - This is for an API. Although you are correct I have this ability I would rather not unless I have to :)
  16. How to set a variant without VB6 default value?

    So I'm making a funky callback class for VBA. One of the core difficulties is getting around the syntax sugar set/let. I.E.

    if vartype(result) = vbObject then
    set FuncReturn = result
    else
    ...
Results 1 to 16 of 16



Featured


Click Here to Expand Forum to Full Width