Search:

Type: Posts; User: The trick

Page 1 of 13 1 2 3 4

Search: Search took 0.07 seconds.

  1. Re: Standard DLL Creation (and Usage) with VB6 (à la, The Trick)

    You can compile a dll directly. Just specify DLL extension in save dialog.
  2. Re: Standard DLL Creation (and Usage) with VB6 (à la, The Trick)

    I don't see your project does any runtime and project initialization. The produced DLLs will be crash in most of cases.
  3. Re: TO: The Trick ... Standard DLL Creation with VB6

    Yes of course! LIB/EXP files are needed for C/C++ if you want to use early binding.
  4. Replies
    27
    Views
    937

    Re: MakeDLL problem

    If you want to create a standard-native-dll you could use this as a starting point. No additional Add-in and dependencies needed.
  5. Re: [VB6] - Module for working with multithreading.

    It's the bad practice to use TerminateThread because there is no resource releasing in this case. It's better to notify a thread (for example PostMessage/PostThreadMessage in certain cases) you want...
  6. Replies
    27
    Views
    937

    Re: MakeDLL problem

    Those dlls won't work properly and have many restrictions. It need to initialize runtime to use DLLs.
  7. Replies
    12
    Views
    534

    Re: How to call a Procedure by Name.

    Only Friend methods, private ones is called using VTable.
  8. Replies
    15
    Views
    858

    Re: Getting C2 to generate a listing file

    You can modify this.
  9. Replies
    15
    Views
    858

    Re: Getting C2 to generate a listing file

    You could make an Add-in to hijack compilation and then replace the command line arguments.
  10. Replies
    3
    Views
    320

    Re: What is IZombie for kind of Interface?

    https://www.vbforums.com/showthread.php?881935-Rules-for-UserControl-getting-grayed-disabled-at-design-time&p=5440319&viewfull=1#post5440319
  11. Re: I have an urge to FULLY remake the oleexp.tlb by Fafalone

    Apparently, one of the main ideas of vb6 passed you by.
  12. Re: Determine Project Type While Running in IDE?

    Yes. That code returns the current startup project type. The following code returns the current executing project.


    Option Explicit

    Private Enum PTR
    [_]
    End Enum

    Private Declare...
  13. Re: [RESOLVED] Determine Project Type While Running in IDE?

    It's quite simple because DLLs have specified export (DllGetClassObect etc.), Standard EXE contains VbHeader.dwThreadsFlag 0x8 bit set.
  14. Re: Determine Project Type While Running in IDE?

    Option Explicit

    Private Enum PTR
    [_]
    End Enum

    Private Declare Function GetModuleHandle Lib "kernel32" _
    Alias "GetModuleHandleW" ( _
    ...
  15. Re: [RESOLVED] Ask: The correct way to create an ActiveX DLL

    Initialization of the runtime is a complex process. It includes the several stages. The runtime requires common initialization for each thread in process that interacts with runtime. It is required...
  16. Re: [RESOLVED] Ask: The correct way to create an ActiveX DLL

    If you want to export functions and call them from any language you should initialize the runtime. There are several methods to do it. The most simpler is to create an public object using Reg-Free...
  17. Re: [RESOLVED] Converting ASCII Byte Array to Single or Double ... Fast

    atof (like Val/CDbl) universal function. It supports whole double range:

    Private Sub Form_Load()
    Dim b() As Byte

    b = StrConv("0.00000000000001" & vbNullChar, vbFromUnicode)

    ...
  18. Re: [RESOLVED] Converting ASCII Byte Array to Single or Double ... Fast

    When you pass an array item to an API (VarPtr) it locks array (SafeArrayLock), calls the API (VarPtr), unlocks array (SafeArrayUnlock). If you need to increase performance you could use a pointer...
  19. Re: [RESOLVED] Converting ASCII Byte Array to Single or Double ... Fast

    You could make like this:


    l = VarPtr(bb(0))
    For i = 1 To 40000000
    d = atof(l)
    Next

    To avoid locking/unlocking array and improve performance.
  20. Re: Converting ASCII Byte Array to Single or Double ... Fast

    VanGoghGaming, install this and


    Option Explicit

    Private Declare Function atof CDecl Lib "msvcrt" (ByRef psz As Any) As Double

    Private Sub Form_Load()
    Debug.Print atof(ByVal "1.2345")...
  21. Re: Converting ASCII Byte Array to Single or Double ... Fast

    atof
  22. Re: [VB6]Hi the trick,how to enumerate all modules and members in a project?

    For P-code you can get the addresses for all the functions. Regarding PDB, you can just remove it after patching the executable.
  23. Re: [VB6]Hi the trick,how to enumerate all modules and members in a project?

    It's possible but you need to create an Add-in. This Add-in should force to produce PDB file and replace Main subroutine in VBHeader.lpSubMain to your initialization procedure which calls all the...
  24. Replies
    48
    Views
    2,066

    Re: Subclassing At Its Simplest

    Thank you but it had a bug related to recursive releasing (just remove UnmapViewOfFile from Class_terminate to avoid this rare case bug).
  25. Replies
    48
    Views
    2,066

    Re: Subclassing At Its Simplest

    Thank you for testing but i think it isn't related to my class. Remove all the subclassing thing and do the same with UserControl_Resize event.
    ...
  26. Replies
    48
    Views
    2,066

    Re: Subclassing At Its Simplest

    Elroy, does mine crash? This should survive both the stop button and end statement.
  27. Re: [VB6]Hi the trick,how to enumerate all modules and members in a project?

    I still don't understand the end goal of this idea. You can enumerate standard modules, moreover you can enumerate functions (if executable has debug symbols) but i don't understand why?
  28. Re: [VB6]Hi the trick,how to enumerate all modules and members in a project?

    You could replace Main subroutine in VBHeader.lpSubMain with your initialization function after compilation but it's better to use predeclared_id objects instead.
  29. Replies
    48
    Views
    2,066

    Re: Subclassing At Its Simplest

    You need to use any compiled code (DLL/Thunk).
  30. Replies
    48
    Views
    2,066

    Re: Subclassing At Its Simplest

    Create a separate thread. As far as i remember you can enumerate standard modules (and their ranges) but can't enumerate functions (only heuristic analysis) in native code (only in p-code).
  31. Replies
    48
    Views
    2,066

    Re: Subclassing At Its Simplest

    I meant we don't need to intercept any msvbvm60 functions (as VanGoghGaming wrote). So if you use an external DLL with a COM object you can use safe subclassing in IDE. Mine uses this approach but...
  32. Replies
    48
    Views
    2,066

    Re: Subclassing At Its Simplest

    This isn't required. You just need to use an COM object which is released when the code stops.
  33. Replies
    10
    Views
    613

    Re: Friend, Private, Public, "exposed"

    https://www.vbforums.com/showthread.php?896322-Code-in-Form-vs-code-in-Module-Why-one-more-the-other&p=5567231&viewfull=1#post5567231
  34. Re: Does a "chip" UI component exist for VB6?

    https://www.vbforums.com/showthread.php?788237-VB6-TrickControls
  35. Replies
    19
    Views
    1,226

    Re: Capture audio and visualize it

    https://www.vbforums.com/showthread.php?829387-VB6-TrickSound-class-for-working-with-audio
  36. Replies
    200
    Views
    57,208

    Re: Direct2D Typelib+ for VB6

    Thank you so much fafalone! I can't give reputation because forum requires spreading to another user.
  37. Replies
    24
    Views
    1,125

    Re: GdipCreateEffect

    https://www.vbforums.com/showthread.php?862205-Direct2D-Typelib-for-VB6&p=5597152&viewfull=1#post5597152

    https://www.vbforums.com/images/ieimages/2023/03/5.png
  38. Re: FAST read number of lines in txt file

    https://www.cyberforum.ru/visual-basic/thread3086025.html#post16785777
  39. Re: C-style array arguments in API to VB

    FOO rgFoo[] = FOO* rgFoo;
    PFOO rgFoo[] = FOO** rgFoo;
  40. Thread: Memory Leak?

    by The trick
    Replies
    13
    Views
    1,078

    Re: Memory Leak?

    You shouldn't ever use TerminareThread because it causes resources leaking.
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Click Here to Expand Forum to Full Width