Search:

Type: Posts; User: The trick

Page 1 of 13 1 2 3 4

Search: Search took 0.37 seconds.

  1. Replies
    18
    Views
    9,968

    Re: [VB6] - Calling functions by pointer.

    You can read this thread to add the __cdecl support.
  2. Replies
    60
    Views
    1,187

    Re: hao to call Sqlite3.dll with cdecl?

    I don't understand what's the sense to use __stdcall if you anyway use the LoadLibrary/GetProcAddress pair to get a function pointer and use this pointer to call the function.
    If you use a static...
  3. Replies
    60
    Views
    1,187

    Re: hao to call Sqlite3.dll with cdecl?

    xiaoyao i've already suggested TLB and my Add-in which is faster. The other approach https://www.vbforums.com/showthread.php?788413-VB6-Calling-functions-by the pointer but you have to change to...
  4. Replies
    60
    Views
    1,187

    Re: hao to call Sqlite3.dll with cdecl?

    You should prepare trampolin to the stack conversion like that:

    Option Explicit

    Private Const HEAP_CREATE_ENABLE_EXECUTE As Long = &H40000
    Private Const HEAP_NO_SERIALIZE As...
  5. Replies
    60
    Views
    1,187

    Re: hao to call Sqlite3.dll with cdecl?

    georgekar,
    please provide more information: what are parameters, how many ones, what's the function, what should it do?
  6. Replies
    60
    Views
    1,187

    Re: hao to call Sqlite3.dll with cdecl?

    Why do you use so many nops?

    BTW i use OllyDbg for small thunks:

    https://www.youtube.com/watch?v=XCLdBmw5q_8
  7. Replies
    60
    Views
    1,187

    Re: hao to call Sqlite3.dll with cdecl?

    This example uses DispCallFunc to call the dynamic code:

    Option Explicit

    Private Const HEAP_CREATE_ENABLE_EXECUTE As Long = &H40000
    Private Const HEAP_NO_SERIALIZE As Long = &H1...
  8. Replies
    60
    Views
    1,187

    Re: hao to call Sqlite3.dll with cdecl?

    wqweto, you could just save the ret_addr elsewhere like into unused last arg.
    For example:

    BITS 32

    NUM_OF_ARGS equ 4

    pop eax ; get retaddr
    pop ecx ; get pfn
  9. Replies
    60
    Views
    1,187

    Re: hao to call Sqlite3.dll with cdecl?

    You could use http://www.vbforums.com/showthread.php?818999-VB6-Inline-assembler-Add-in to make simple asm trampolins.
  10. Replies
    60
    Views
    1,187

    Re: hao to call Sqlite3.dll with cdecl?

    You can call __cdecl functions directly in the compiled state if you declare __cdecl functions in a tlb without any tricks.
  11. Thread: Multi Use

    by The trick
    Replies
    3
    Views
    301

    Re: The Trick's Multithreading - Paid

    What's the issue you encountered?
  12. Replies
    14
    Views
    11,212

    Re: [VB6] - TrickControls.

    https://drive.google.com/file/d/0B67xv7FAriZdSDVhRzRLWWxiX2c
  13. Re: [VB6] Convert a picture to PNG byte-array in memory

    You could use __vbaCastObj function as well:

    Option Explicit

    Private Declare Function vbaCastObj Lib "msvbvm60" _
    Alias "__vbaCastObj" ( _
    ...
  14. Re: Copy Large File by Chunk with Progress Notification

    https://www.vbforums.com/showthread.php?788397-VB6-Class-for-copying-a-file-in-a-separate-thread-with-display-progress
  15. Re: [VB6] DirectX 11 for VB6 1.0 Type Library

    Very good contribution! Thank you!
  16. Replies
    25
    Views
    926

    Re: IPicture interface methods

    @wqweto,
    https://www.sql.ru/forum/actualutils.aspx?action=gotomsg&tid=862346&msg=10895839
  17. Replies
    25
    Views
    926

    Re: IPicture interface methods

    You could use a metafile with the EMR_ALPHABLEND record. You don't need to do some extra work excepting the conversion to EMF. You can use most of the standard features with EMF including...
  18. Replies
    13
    Views
    578

    Re: Synchronous processing?

    wqweto suggested the good approach. Just i want to add you can use an OBJREF moniker as well.
  19. Re: how can i get the GDI+ declaration functions\types?

    What's about Direct3D? You can render any 3D polygon:

    https://www.youtube.com/watch?v=lamu0XvWPs4
  20. Re: How to call IEnumVARIANT::Next() with DispCallFunc() - Without external TLBs

    wqweto, not all the interfaces has the accessible _NewEnum property. For example an array of controls or scrrun.Dictionary.
  21. Replies
    7
    Views
    2,104

    Re: [ASM] "Hello World" in machine codes.

    sancarn, thank you for the response!
  22. Replies
    9
    Views
    453

    Re: Empty Array of UDT?

    Private Type tMyUdt
    z As String
    b As Long
    c As Variant
    j() As Object
    End Type

    Private Function EmptyMyUdtArr() As tMyUdt()

    End Function
  23. Re: How to call IEnumVARIANT::Next() with DispCallFunc() - Without external TLBs

    Option Explicit

    Private Declare Function vbaForEachCollVar Lib "msvbvm60" Alias "__vbaForEachCollVar" ( _
    ByRef cEnum As IUnknown, _
    ByRef vItem...
  24. Re: How to call IEnumVARIANT::Next() with DispCallFunc() - Without external TLBs

    Option Explicit

    Private Const CC_STDCALL As Long = 4

    Private Declare Function DispCallFunc Lib "oleaut32.dll" ( _
    ByRef pvInstance As Any, _
    ...
  25. Re: How to call IEnumVARIANT::Next() with DispCallFunc() - Without external TLBs

    FYI you can use __vbaForEachCollVar and __vbaNextEachCollVar functions as well.
  26. Replies
    15
    Views
    697

    Re: UpdateLayeredWindow() Drove Me Crazy

    You can firstly prepare alpha things then draw the "holes" and "opaques":
    https://www.vbforums.com/images/ieimages/2020/09/5.png
  27. Replies
    15
    Views
    697

    Re: UpdateLayeredWindow() Drove Me Crazy

    All i wanted to show you can draw using only Form.hdc.
    You can draw using Line/Circle/etc and other GDI functions only you should consider the raster operation. When you use vbCopyPen it means the...
  28. Replies
    15
    Views
    697

    Re: UpdateLayeredWindow() Drove Me Crazy

    https://www.vbforums.com/showthread.php?881289-RESOLVED-vbRichClient-Transparent-SplashScreen&p=5438367&viewfull=1#post5438367
  29. Re: [help] VB6, How to search/replace a pattern in the byte array?

    https://www.vbforums.com/showthread.php?820359-signature-search&p=4994843&viewfull=1#post4994843
  30. Re: [VB6] - Module for working with COM-Dll without registration.

    WithEvents.


    What you tell about?


    This question isn't related to this thread. The answer is Running Object Table.
  31. Replies
    9
    Views
    507

    Re: Drawing an Arc

    https://www.cyberforum.ru/post5937340.html
    https://www.vbforums.com/images/ieimages/2020/09/2.gif
  32. Re: Capturing/detecting MouseDown/MouseUp

    FYI you can use DirectInput as well.
  33. Re: [VB6] - Module for working with multithreading.

    The main restriction you shouldn't pass an object reference between threads. The other point is you should track the data and synchronize access. The rules are the same if you would work in C/C++.
  34. Re: [VB6] - Module for working with multithreading.

    lowe517, you can't call the methods of an object between threads without marshaling. You can pass the socket handle between threads so you can create an auxiliary object which lives in the thread....
  35. Replies
    9
    Views
    6,867

    Re: [VB6] - Multi-line standard tooltip.

    Thank you shagratt!
  36. Re: [VB6] - Module for working with multithreading.

    Please attach the small example.
  37. Thread: c2switches

    by The trick
    Replies
    3
    Views
    362

    Re: c2switches

    -nowarn4715 -cap -nodlp -dlp
    -S -dos -Fo# -H#
    -Zl -Brepro -Bd -Fs#
    -Fa# -FA# -pr ...
  38. Replies
    16
    Views
    7,834

    Re: [VB6] DirectSound.

    Yes you could install a mp3 decoder like lame or ACM decoder but most of the systems have that code preinstalled.
  39. Re: How to change resource file data of an executable?

    You can use BeginUpdateResource, UpdateResource, EndUpdateResource.
  40. Re: can we create a lightweight com IDataObject ?

    @JAAFAR,
    the simple hooker:

    Option Explicit

    Public Const PAGE_EXECUTE_READWRITE As Long = &H40&

    Public Type tHookData
    bOriginal(0 To 13) As Byte
    pfnOriginal As LongPtr
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Click Here to Expand Forum to Full Width