Search:

Type: Posts; User: The trick

Page 1 of 13 1 2 3 4

Search: Search took 0.33 seconds.

  1. 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...
  2. Replies
    7
    Views
    379

    Re: MakeDLL problem

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

    Re: How to call a Procedure by Name.

    Only Friend methods, private ones is called using VTable.
  4. Replies
    13
    Views
    687

    Re: Getting C2 to generate a listing file

    You can modify this.
  5. Replies
    13
    Views
    687

    Re: Getting C2 to generate a listing file

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

    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
  7. Re: I have an urge to FULLY remake the oleexp.tlb by Fafalone

    Apparently, one of the main ideas of vb6 passed you by.
  8. 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...
  9. 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.
  10. Re: Determine Project Type While Running in IDE?

    Option Explicit

    Private Enum PTR
    [_]
    End Enum

    Private Declare Function GetModuleHandle Lib "kernel32" _
    Alias "GetModuleHandleW" ( _
    ...
  11. 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...
  12. 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...
  13. 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)

    ...
  14. 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...
  15. 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.
  16. 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")...
  17. Re: Converting ASCII Byte Array to Single or Double ... Fast

    atof
  18. 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.
  19. 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...
  20. Replies
    48
    Views
    1,962

    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).
  21. Replies
    48
    Views
    1,962

    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.
    ...
  22. Replies
    48
    Views
    1,962

    Re: Subclassing At Its Simplest

    Elroy, does mine crash? This should survive both the stop button and end statement.
  23. 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?
  24. 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.
  25. Replies
    48
    Views
    1,962

    Re: Subclassing At Its Simplest

    You need to use any compiled code (DLL/Thunk).
  26. Replies
    48
    Views
    1,962

    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).
  27. Replies
    48
    Views
    1,962

    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...
  28. Replies
    48
    Views
    1,962

    Re: Subclassing At Its Simplest

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

    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
  30. Re: Does a "chip" UI component exist for VB6?

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

    Re: Capture audio and visualize it

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

    Re: Direct2D Typelib+ for VB6

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

    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
  34. Re: FAST read number of lines in txt file

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

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

    by The trick
    Replies
    13
    Views
    1,070

    Re: Memory Leak?

    You shouldn't ever use TerminareThread because it causes resources leaking.
  37. Replies
    4
    Views
    773

    Re: Drawing a "page curl" effect

    https://learn.microsoft.com/ru-ru/archive/msdn-magazine/2013/august/directx-real-time-realistic-page-curling-with-directx-c-and-xaml
  38. Replies
    4
    Views
    773

    Re: Drawing a "page curl" effect

    You could do this using Direct3D if you need true bending. It's quite simple to do a fake (without curve bending) in GDI/GDI+ using rotations.
  39. Re: Programmatically determine handle type index on Win7/earlier?

    Open NUL device, query handle information through ZwQuerySystemInformation SYSTEM_HANDLE_INFORMATION. Search for your handle in the list. SYSTEM_HANDLE_INFORMATION.ObjectTypeIndex contains the type...
  40. Re: Programmatically determine handle type index on Win7/earlier?

    http://vbstreets.ru/VB/Articles/66343.aspx
    http://vbstreets.ru/VB/Articles/66404.aspx

    Just open NUL device and get the type number through NtQueryObject.
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Click Here to Expand Forum to Full Width