Search:

Type: Posts; User: The trick

Page 1 of 13 1 2 3 4

Search: Search took 0.81 seconds.

  1. 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)

    ...
  2. 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...
  3. 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.
  4. 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")...
  5. Re: Converting ASCII Byte Array to Single or Double ... Fast

    atof
  6. 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.
  7. 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...
  8. Replies
    48
    Views
    1,419

    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).
  9. Replies
    48
    Views
    1,419

    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.
    ...
  10. Replies
    48
    Views
    1,419

    Re: Subclassing At Its Simplest

    Elroy, does mine crash? This should survive both the stop button and end statement.
  11. 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?
  12. 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.
  13. Replies
    48
    Views
    1,419

    Re: Subclassing At Its Simplest

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

    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).
  15. Replies
    48
    Views
    1,419

    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...
  16. Replies
    48
    Views
    1,419

    Re: Subclassing At Its Simplest

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

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

    https://www.vbforums.com/showthread.php?788237-VB6-TrickControls
  19. Replies
    19
    Views
    947

    Re: Capture audio and visualize it

    https://www.vbforums.com/showthread.php?829387-VB6-TrickSound-class-for-working-with-audio
  20. Replies
    200
    Views
    56,089

    Re: Direct2D Typelib+ for VB6

    Thank you so much fafalone! I can't give reputation because forum requires spreading to another user.
  21. Replies
    24
    Views
    984

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

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

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

    by The trick
    Replies
    13
    Views
    973

    Re: Memory Leak?

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

    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
  26. Replies
    4
    Views
    685

    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.
  27. 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...
  28. 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.
  29. Replies
    42
    Views
    2,224

    Re: how use CreateThread() with parameters?

    See this example of the multithreading module. It uses the several threads to draw a portion of the pixels per thread.
  30. Replies
    22
    Views
    1,394

    Re: how work with pointers on VB6?

    ByVal = IUnknown*
    ByRef = IUnknown**
  31. Replies
    22
    Views
    1,394

    Re: how work with pointers on VB6?

    It isn't true.
  32. Re: VBWERX Core Language Extensions - need source code

    You can "decompile" TLB to IDL using OleView.
  33. Replies
    35
    Views
    1,878

    Re: how can i avoid the 'AdressOf'?

    Runtime does cleanup. All the global/static variables (as you already wrote) is isolated so the runtime keeps the track for the last reference in the current thread. When there is no variables it...
  34. Re: Calling an _stdcall ... API (AuthzReportSecurityEvent)

    va_start just points arglist to the first variadic argument after parameter dwCount.
    Each va_arg offsets the arglist by the size of the second argument so the first entry in the stack is 4 bytes...
  35. Replies
    35
    Views
    1,878

    Re: how can i avoid the 'AdressOf'?

    I have a small TLB and create the thread inside Ax-DLL like:

    Public Function ThreadProc( _
    ByRef tData As tThreadData) As Long
    Dim hWnd As Long
    Dim tMsg As MSG
    ...
  36. Re: Calling an _stdcall ... API (AuthzReportSecurityEvent)

    https://learn.microsoft.com/en-us/cpp/cpp/stdcall?view=msvc-170
  37. Re: Calling an _stdcall ... API (AuthzReportSecurityEvent)

    This function is CDECL one with the variable arguments.


    Yes.

    The types with size more than 8 bytes are passed by reference. APT_LogonId, APT_LogonIdWithSid, APT_ObjectTypeList, APT_Luid,...
  38. Re: RunDLL call force-activating DPI awareness in my app

    DeviceProperties_RunDLLW calls SetProcessDPIAware function inside. You can't change this behavior. You could try to call SetProcessDpiAwareness with DPI_AWARENESS_CONTEXT_UNAWARE or...
  39. Replies
    35
    Views
    1,878

    Re: how can i avoid the 'AdressOf'?

    BTW the public projects already have ability to use multithreading. It's enough to create an object in the new thread and the runtime will be initialized.
  40. Re: vb6 how to call .net aot exports dll api, [UnmanagedCallersOnly(EntryPoint = "Ad

    VBDecompiler doesn't decompile well. You can read this topic where i used OllyDbg to decompile all the program instead VBDecompiler because latter had the poor result.
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Click Here to Expand Forum to Full Width