Search:

Type: Posts; User: The trick

Page 1 of 13 1 2 3 4

Search: Search took 0.03 seconds.

  1. Replies
    14
    Views
    510

    Re: Using Sound Effects in VB?

    https://www.vbforums.com/showthread.php?896007-VB6-CWaveFile-class-for-working-with-WAVE-PCM-files&highlight=
  2. Replies
    22
    Views
    623

    Re: C POINT Data Type passed ByRef in x64 ?

    You can use currency instead in the both cases.
  3. Replies
    22
    Views
    623

    Re: C POINT Data Type passed ByRef in x64 ?

    https://www.vbforums.com/showthread.php?865895-ElementFromPoint-UIAutomation&p=5314591&viewfull=1#post5314591
  4. Replies
    11
    Views
    452

    Re: Remove References

    Another project written in VB6 which doesn't use runtime as well.
  5. Re: [twinBASIC] Kernel mode driver for 64-bit Windows

    Great project! Thanks!
  6. Replies
    34
    Views
    16,532

    Re: [VB6] - Kernel mode driver.

    fafalone, thank you to pointing out the issue. The 'default' i meant 'Optimize for Fast Code' entry with all optimizations.
  7. Re: [RESOLVED] How to use program to detect struct is contiguous memory or not ?

    VB6 already has the restricted type description for the private UDTs (it's used for UDT copying) but as far as i remember there is no way to match a type descriptor to the UDT after compilation.
  8. Re: [RESOLVED] How to use program to detect struct is contiguous memory or not ?

    This is a small example of serialization of a public UDT (with the references types) to an array:

    Public Type TMySubUDT
    o As Variant
    b() As Byte
    End Type

    Public Type TMyUDT
    l ...
  9. Re: [RESOLVED] How to use program to detect struct is contiguous memory or not ?

    All the public UDTs fall to typelibraries so you can check all the fields or use the OLE-IRecordInfo implementation to manage UDTs. The same is for the public object-modules/enums.
  10. Re: [RESOLVED] Crashing when reading UNICODE_STRING

    https://www.vbforums.com/showthread.php?894716-RESOLVED-Need-everyone-s-help-Get-the-command-line-of-a-process-on-Windows-7-64-bit&p=5550587&viewfull=1#post5550587
  11. Re: [twinBASIC] x64-compatible port of Event Tracing for Windows File Activity Monito

    Wow, great! I definitely should take a look to TB.
  12. Re: Why is this Windows Service program I wrote not working?

    You should initialize the project context for new threads. You could use this module to using threading as well callbacks in your service.
  13. Re: Pass empty-array to function parameters

    You could use pointer instead array itself (passing ByVal):

    Option Explicit

    Private Const EMPTY_SA As Long = 0 ' // NULL_PTR

    Private Declare Sub PutMemArrPtr Lib "msvbvm60" _
    ...
  14. Replies
    34
    Views
    16,532

    Re: [VB6] - Kernel mode driver.

    There is no difference if you pass UCHAR (a byte) or int (four bytes) in STDCALL convention because the both cases uses 4 bytes in the stack. The proper variant is a byte of course. I don't remember...
  15. Replies
    34
    Views
    16,532

    Re: [VB6] - Kernel mode driver.

    APIs in a typelib fall to import table. So i used a typelib to avoid of runtime usage (DllFunctionCall)
  16. Replies
    35
    Views
    1,493

    Re: Why cant I do this

    Yep.
  17. Replies
    16
    Views
    754

    Re: VB6 QUESTION: Check if API exists

    Elroy, VB6 uses late-binding (LoadLibrary/GetProcAddress pair) for the APIs declared with Declare keyword. It's also possible to use early-binding if you use the APIs declared in a TLB.
  18. Replies
    13
    Views
    736

    Re: sendbroadcast packets to all interface?

    It is possible to write the services in VB6. If you need a dll with the callbacks in different threads you can use this module.
  19. Re: [RESOLVED] How to let call sub more fast ?

    Put your function into a standard module.
  20. Replies
    16
    Views
    754

    Re: VB6 QUESTION: Check if API exists

    The proper way is to use Declare statement and check the error.
  21. Replies
    16
    Views
    778

    Re: GDI+ bitmap vs GDI+ image

    Image can represent multi frame pictures.
  22. Replies
    27
    Views
    1,190

    Re: Thunk for a CopyMemory replacement?

    Yes, of course. Please show me your data and i'll show you how to achieve it.
  23. Replies
    27
    Views
    1,190

    Re: Thunk for a CopyMemory replacement?

    You can map your big dataset to a "window" without copying.
  24. Replies
    27
    Views
    1,190

    Re: Thunk for a CopyMemory replacement?

    You could map an array to an arbitrary memory. It avoids copying.

    https://github.com/thetrik/VbVst/blob/main/VbDebugVst/dll/modules/modMain.bas

    This module uses g_tSharedData array (UDT) which...
  25. Replies
    48
    Views
    2,278

    Re: Arrays in Far Memory

    It isn't required if you don't care about data in the disk.
  26. Replies
    27
    Views
    1,190

    Re: Thunk for a CopyMemory replacement?

    CopyMemory (RtlMoveMemory) is the quite fast function. __vbaCopyBytes is little bit faster. Maybe don't you need to copy data at all?
  27. Replies
    48
    Views
    2,278

    Re: Arrays in Far Memory

    I've described the reason of the error in the MemoryBasedArray class.


    My class is intended for sharing between processes so it requires the atomic access when you change the memory layout.

    ...
  28. Replies
    48
    Views
    2,278

    Re: Arrays in Far Memory

    The error is in CreateSingleItemMapping method. You just check this condition:

    If mpMapView = 0& Or mdwViewHigh <> dwFileOffsetHigh Or mdwViewLow <> dwFileOffsetLow Then
    but you don't consider...
  29. Replies
    48
    Views
    2,278

    Re: Arrays in Far Memory

    You could use this class which provides the ability to alloc dynamic memory in a memory mapped file. You can use variable length strings, UDTs etc.
  30. Re: Good Programming Practice: About "ByVal MyObject"

    My opinion is to use ByRef when you want to return a variable from procedure. This is related to all the variable types (excepting arrays which we can't pass ByVal).
  31. Re: Make hGdipImage, hGraphics, and other GDI+ "objects" into true VB6 COM objects

    I'd hide the "unsafe" things (like setting handle, parent etc) to a private interface (or to friend methods if it's an AxDll) to encapsulate restricted things.
  32. Re: Make hGdipImage, hGraphics, and other GDI+ "objects" into true VB6 COM objects

    C++ has already implemented all the GDI+ entities to the classes which automatically destroys when a class instance has been destroyed. As far as i know there are several implementations of wrappers...
  33. Re: transfer user-defined data types between apps

    I meant Standard EXE, not ActiveX EXE. This is an example:

    UDT (inside an AxDll):

    Public Type TUserType
    sStr As String
    bData() As Byte
    cObj As Object
    End Type
  34. Re: Len vs LenB for specifying API structure lengths, and internal vs end padding

    Sometimes we need that because VB6 doesn't align > 4 bytes. The remaining part is related to different #pragma pack directives.
  35. Replies
    24
    Views
    968

    Re: [RESOLVED] Last Class to Go

    You could make a factory class which instantiates all the GDI+ objects. Every object holds the reference to this factory class so when the last one has destroyed the factory is uninitialized like:
    ...
  36. Re: transfer user-defined data types between apps

    An AxExe is most simpler method. You could also avoid registration issues using the OBJREF moniker and a SxS manifest in Standard EXE project.
  37. Replies
    10
    Views
    496

    Re: IPicture object to hGdipBitmap

    IPicture may contain different types of pictures. Are the bitmap pictures interested or all of types (metafiles etc)? BTW there is a native way to use bitmaps with alpha channel in vb6...
  38. Re: Len vs LenB for specifying API structure lengths, and internal vs end padding

    Len returns the size when you save a variable to a file. When you save a variable to a file there is no padding.
    https://www.vbforums.com/images/ieimages/2022/06/5.png
  39. Re: Get module (or/and) class, but also sub/function names ?

    Do you compile with the debug symbols?
  40. Re: Get module (or/and) class, but also sub/function names ?

    You can walk through call stack using RtlCaptureStackBackTrace function like:

    Private Declare Function RtlCaptureStackBackTrace Lib "kernel32" ( _
    ByVal FramesToSkip As...
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Click Here to Expand Forum to Full Width