Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: creating (activex) dll in Visual Basic 6 and then call it from ThinBasic

  1. #1
    Member
    Join Date
    Mar 2009
    Location
    Netherlands
    Age
    49
    Posts
    248
    Rep Power
    37

    creating (activex) dll in Visual Basic 6 and then call it from ThinBasic

    Does somebody has experience with creating a simple .dll in VB6? I never done this before. I'm trying to make a simple DLL for 3 days now and call it in ThinBasic (with declare) but no succes. I think I do something wrong with creating the dll.

    Would be great if somebody can tell me step by step how to do this. Ofcourse I googled on this but still it doesn't work correctly

  2. #2
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    54
    Posts
    8,636
    Blog Entries
    2
    Rep Power
    10

    Re: creating (activex) dll in Visual Basic 6 and then call it from ThinBasic

    Martin,

    thinBasic can use any standard WIN32 dlls.
    But I'm not sure if VB6 can create standard WIN32 dlls.
    Instead it creates ActiveX dll that are something completely different and thinBasic is not able to use them.

    Check this page, maybe it can help: http://www.windowsdevcenter.com/pub/...ll.html?page=1

    To create standard DLLs I suggest to use languages like C, PowerBasic, FreeBasic or other languages able o work with standard DLLs.

    Ciao
    Eros
    www.thinbasic.com | www.thinbasic.com/community/ | psch.thinbasic.com
    Win10Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

  3. #3
    Member
    Join Date
    Mar 2009
    Location
    Netherlands
    Age
    49
    Posts
    248
    Rep Power
    37

    Re: creating (activex) dll in Visual Basic 6 and then call it from ThinBasic

    Hello Eros,

    Ah i see! I am glad that you're telling me that I am wasting my time with VB.

    In that case I will keep my other (slower) solution: using os_shell that runs an .exe (with parameters from commandline)

  4. #4
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    54
    Posts
    8,636
    Blog Entries
    2
    Rep Power
    10

    Re: creating (activex) dll in Visual Basic 6 and then call it from ThinBasic

    Martin,

    if you can tell more about what your dll need to do, I will be happy to try to help. I can create a base DLL using FreeBasic and post here source code so you can go on with it. Of course if you like the idea.

    The above also considering that if you create EXE or DLL in VB6 and distribute them, you should also be sure that your users have VB runtime installed in their computer otherwise they will not be able to use you programs (EXE and/or DLL).

    Ciao
    Eros
    www.thinbasic.com | www.thinbasic.com/community/ | psch.thinbasic.com
    Win10Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

  5. #5
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    54
    Posts
    8,636
    Blog Entries
    2
    Rep Power
    10

    Re: creating (activex) dll in Visual Basic 6 and then call it from ThinBasic

    This is a possible official url where to find VB6 runtime: http://support.microsoft.com/kb/290887
    www.thinbasic.com | www.thinbasic.com/community/ | psch.thinbasic.com
    Win10Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

  6. #6
    Member
    Join Date
    Mar 2009
    Location
    Netherlands
    Age
    49
    Posts
    248
    Rep Power
    37

    Re: creating (activex) dll in Visual Basic 6 and then call it from ThinBasic

    Hi Eros,

    Thanks for your offer! Ofcourse I'll take it (i HATE vb runtime files). But maybe this is also something you could directly build into the module TBASS. What I need is a function that can calculate the BPM of a song. In thinbasic there's already TBASS. But for calculating tempo (Beats Per Minute) you'll need the BASS_FX library.

    I already made an EXE with VB that can do the job. But each time when I run this exe with OS_SHELL in ThinBasic the script slow down because it have to load the exe into memory (i guess). Or maybe I should use %OS_SHELL_ASYNC. But not sure how I should change my script then.

    Greetings,

    Martin

  7. #7
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    54
    Posts
    8,636
    Blog Entries
    2
    Rep Power
    10

    Re: creating (activex) dll in Visual Basic 6 and then call it from ThinBasic

    Ok, I see.

    If you need to calculate BPM very often during the game, shelling an EXE is absolutely not the way to go.

    Yes, I can try to make BPM in TBASS. If you can give me some info on how to do or some few lines of code, it would simplify my job. In any case I will have a look.

    We can also create a wrapper thinBasic native module for FMOD library, I saw you use it in your games.

    I will let you know. I think I will have some spare time during the weekend.

    Ciao
    Eros
    www.thinbasic.com | www.thinbasic.com/community/ | psch.thinbasic.com
    Win10Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

  8. #8
    Member
    Join Date
    Mar 2009
    Location
    Netherlands
    Age
    49
    Posts
    248
    Rep Power
    37

    Re: creating (activex) dll in Visual Basic 6 and then call it from ThinBasic

    Cool!! I will send you a private email with more information and also my unfinished script.
    ps: I never made any game so I think you're confused with someone else. I also find FMOD a little bit complicated. BASS is easier to learn

  9. #9
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    54
    Posts
    8,636
    Blog Entries
    2
    Rep Power
    10

    Re: creating (activex) dll in Visual Basic 6 and then call it from ThinBasic

    Quote Originally Posted by martin
    I never made any game so I think you're confused with someone else.
    sorry, you are right. I was confusing with another user.

    Yes, send me a mail to:
    support at thinbasic dot com
    and I will have a look in the weekend
    www.thinbasic.com | www.thinbasic.com/community/ | psch.thinbasic.com
    Win10Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

  10. #10
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    54
    Posts
    8,636
    Blog Entries
    2
    Rep Power
    10

    Re: creating (activex) dll in Visual Basic 6 and then call it from ThinBasic

    Mail got thanks.
    I will let you know.
    www.thinbasic.com | www.thinbasic.com/community/ | psch.thinbasic.com
    Win10Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

Page 1 of 2 12 LastLast

Similar Threads

  1. Does ThinBasic have a visual-dragDrop-IDE?
    By VernonMarsden in forum thinAir General
    Replies: 3
    Last Post: 30-06-2009, 07:24

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •